Prepare a Virtual Machine Template for Raw
Data cloud-init CustomizationLast Updated December 16, 2024
The following steps prepare a virtual machine template for customization with raw
cloud-init data.
- In the guest operating system, install open-vm-tools version 11.3.0 or later. Configure the Linux guest to run open-vm-tools services when the guest operating system starts.Example for an Ubuntu 20.04 guest operating system:
- In the guest operating system, install cloud-init version 21.1 or later. Configure the Linux guest to run cloud-init services when the guest operating system starts.Example for an Ubuntu 20.04 guest operating system:
- Configure cloud-init to accept the OVF data source for VMware raw cloud-init configuration.Edit the cloud-init configuration file in/etc/cloud/cloud.cfgor in/etc/cloud/cloud.cfg.d/*, depending on the Linux distribution. AddOVFto the list of datasources accepted by cloud-init.Example line for cloud-init version 21.3:
- Configure cloud-init to enable VMware customization with raw cloud-init data.Edit the cloud-init configuration file in/etc/cloud/cloud.cfgor in/etc/cloud/cloud.cfg.d/*, depending on the Linux distribution. Set the flagdisable_vmware_customizationtotrueand set the flagallow_raw_datatotrue. If customization time-out is an issue, you can set the value ofvmware_cust_file_max_wait(default: 15 seconds).Example lines for cloud-init version 21.3:
- Run the cloud-init clean step to remove any artifacts from previous configuration failures.
- Power off the virtual machine template.