Guest Customization Using cloud-init

You can customize certain settings in a Linux guest operating system with the help of the vSphere Web Services SDK. The cloud-init utility is a standardized way to initialize a virtual machine when you deploy it in a cloud environment.
Guest operating systems can be customized in one of several ways, depending on certain cloud-init configuration flags and on the subtype of the
identity
property of the
CustomizationSpec
data object. The following table shows the combinations needed to achieve raw data cloud-init customization, LinuxPrep with traditional customization, or LinuxPrep with cloud-init customization. Other combinations are not allowed.
Enabling Guest Customization Types
Flags
CustomizationSpec.identity
Result
allow_raw_data: true
or absent (default=
true
)
CloudInitPrep
VMware Tools will work with cloud-init to customize the guest with the unprocessed
metadata
and
userdata
from
CloudinitPrep
.
disable_vmware_customization: true
or absent (default=
true
)
LinuxPrep
VMware Tools will do traditional customization on the guest.
disable_vmware_customization: false
LinuxPrep
VMware Tools will work with cloud-init to customize the guest with configuration derived from
LinuxPrep
.
Use the following procedures to apply settings to a virtual machine by passing raw configuration data to the cloud-init utility. You will use the
CustomizeVM_Task
method with a
CustomizationSpec
that contains configuration data compatible with the cloud-init standard.