Custom PowerVC cloud-init modules
You can enable and configure cloud-init
custom modules
and control the way cloud-init
sets your host name by modifying the
cloud.cfg
file as described in this topic.
The cloud.cfg
is available here: /etc/cloud/cloud.cfg
.
set_hostname_from_dns module
To change the host name after deployment, remove - update_hostname
from the
list of cloud_init_modules. If you do not remove - update_hostname
from the list of modules,
when the system is restarted, cloud-init
resets the host name to the original value
from when the virtual machine was captured. You can specify to set the host name from DNS or you can
specify that cloud-init sets the host name:
- Set host name from DNS: The set_hostname_from_dns module
allows you to set your virtual machine's host name by using the host name value that you have
configured in your DNS server. To enable this module, perform the following steps:
- Remove these lines from the
cloud_init_modules
section of the cloud.cfg file:- set_hostname - update_hostname
-
Add these lines in the
cloud_final_modules
section of the /etc/cloud/cloud.cfg file:- set_hostname_from_dns
Changing these lines instructs cloud-init to use the IPv4 or IPv6 address of the first network interface (eth0) to do a reverse DNS lookup and set the fully qualified domain name as the host name. If the reverse lookup fails, the module uses the virtual machine name to set the host name. This is the same way the host name is set as when the module is not enabled.
The module's behavior can be further configured with the following options. These options can be set in cloud.cfg outside of any modules sections. They can also be passed in as cloud-config activation input during a deployment.
The set_hostname_from_dns module must be added after adding reset_rmc module.
- Remove these lines from the
reset-rmc module
This module automatically resets RMC. It is enabled by default.
restore non-rootVG volume groups
If you want to restore non rootVG volume groups from the captured virtual machine on AIX®, run the following script on the virtual machine before each capture:/opt/freeware/lib/cloud-init/create_pvid_to_vg_mappings.sh
The
cloud-init restore-volume-groups module will then run during deploy. This module is enabled by
default.set multipath hcheck interval
To use AIX cloud-init to set the multipath hcheck interval, the module 'set-multipath-hcheck-interval' is enabled by default. The default value (in seconds) for hcheck interval is 60. To set a different interval, pass the following value as user data when deploying an image. You can specify this on the PowerVC user interface Deploy page under :#cloud-config multipath_hcheck_interval : n
,
where n is the number of seconds for the interval. update-bootlist module
This module removes the temporary virtual optical device, which is used to send configuration information to the virtual machine, from the virtual machine's bootlist. This is enabled by default.