PowerVM

Power Virtualization

Learn about the virtualization technologies designed specifically for IBM Power including #PowerVM, #PowerVC, #VM Recovery Manager#HCM/CMC, and more.


#Power
#TechXchangeConferenceLab

 View Only
Expand all | Collapse all

cloud-init isn't running script in per-instance directory

  • 1.  cloud-init isn't running script in per-instance directory

    Posted Tue October 17, 2023 12:36 AM

    I have just installed a new version of cloud-init (cloud-init-22.1-5.noarch) and captured the AIX 7.3.1.2 image with our post customization script placed in /var/lib/cloud/scripts/per-instance/ directory, complete with execute permissions. However upon deployment, this script never gets called, at all.  I have checked the cloud-init log files, and there are no ERRORs reported there. There are some WARNINGS though:

    # grep WARNING cloud-init-output.log

    2023-10-16 12:57:24,065 - util.py[WARNING]: find_source:  ds_names: ['DataSourceConfigDrive'], ds_list: [<class 'cloudinit.sources.DataSourceConfigDrive.DataSourceConfigDrive'>]

    2023-10-16 12:57:24,578 - networking.py[WARNING]: Not all expected physical devices present: {'fa:61:3f:20:d2:20', 'fa:61:3f:20:d2:21'}

    2023-10-16 12:57:24,614 - __init__.py[WARNING]: apply_network_config is not currently implemented for distribution '<class 'cloudinit.distros.aix.Distro'>'.  Attempting to use apply_network

    2023-10-16 12:57:37,495 - __init__.py[WARNING]: Unhandled non-multipart (text/x-not-multipart) userdata: 'b'Project Name : AIX 7312 '...'

    2023-10-16 12:57:45,706 - cc_restore_volume_groups.py[WARNING]: Physical volume ID to volume group mapping file "/opt/freeware/etc/cloud/pvid_to_vg_mappings" does not exist or permission to read the file does not exist. Ensure that the file exists and the permissions for it are correct.

    Any idea what I need to check next?



    ------------------------------
    Mackey Morgan
    ------------------------------

    #PowerVC


  • 2.  RE: cloud-init isn't running script in per-instance directory

    Posted Thu October 26, 2023 05:23 PM

    It turns out that this issue had a very simple solution. The new cloud-init that I am using is RPM based and uses the following directory:

    /opt/freeware/var/lib/cloud/scripts/per-instance

    Instead of:

    /var/lib/cloud/scripts/per-instance/

    as in the old AIX LPP based package.



    ------------------------------
    Mackey Morgan
    ------------------------------