[vRealize Automation Cloud] Preparing a vSphere VM to Receive a cloud-init Script
search cancel

[vRealize Automation Cloud] Preparing a vSphere VM to Receive a cloud-init Script

book

Article ID: 320397

calendar_today

Updated On:

Products

VMware Aria Suite VMware Cloud on AWS

Issue/Introduction

A guide on how to setup a Debian-based Linux VM so that cloud-init scripts can be passed through vRealize Automation Cloud.


Resolution

The first step in preparing a VM to receive a cloud-init scripts is to make sure that the cloud-init package has been installed on the template VM that will be used. Certain distros will include the cloud-init package with the OS ISO, whereas others require a manual installation.

 

For Debian Based systems:

 ​sudo apt-get -y update

 ​sudo apt-get -y install cloud-init

 

Once the package is installed, reconfigure the package so that it only accepts inputs from OVF sources. This step will greatly decrease the time required to execute the cloud-init script.

 

Execute sudo dpkg-reconfigure cloud-init

 

At this point, finalize the template VM's state by installing any additional packages or making any required configuration changes to the OS.

 

The final step before converting to a template is to clean out the cloud-init logs.

 

Execute sudo cloud-init clean --logs.

 

Power off the VM, right click edit settings, change the CD/DVD drive 1 to Client Device with Device Mode Passthrough CD-ROM

 

The final step is to convert the VM to a template to be used for vRAC deployments.

With all of these steps followed, the VM is now prepared to receive cloud-init configurations from vRAC.


Additional Information

Cloud-init examples

Impact/Risks:

This guide is only applicable to Debian-based Linux VMs.