An administrator is designing a blueprint for a multi-tier application. The application requires that a specific shell script be executed on the virtual machine (VM) during the initial boot process to register the instance with an internal security dashboard.
Which construct should the administrator include in the blueprint to achieve this?
In VCF 9.0 Automation, the standard and most reliable method for executing scripts inside a guest OS during the initial boot is using cloud-init via the cloudConfig stanza. By embedding the script within the cloudConfig section of the Cloud.Machine resource in the YAML blueprint, the automation engine passes this data to the vSphere metadata service. During the first boot, the cloud-init agent (which must be pre-installed on the VM template) retrieves and executes the script with root/administrator privileges. This occurs entirely within the guest OS, making it the ideal solution for registration tasks that require local OS context. While ABX (Option A) or Orchestrator (Option C) can perform 'outside-in' management, they do not run scripts during the boot process as natively or as early as cloud-init, which is specifically designed for the 'Day 0' configuration of cloud instances.
Currently there are no comments in this discussion, be the first to comment!