Automate VM first boot with configuration drive for cloud-init

To work with first-boot automation, create a VM by selecting a template with automation configured. Your administrator may have already added a default bootstrap script and variables.

To connect to your VM in public cloud, you must have your SSH public key in your user account. To add an SSH public key, see Configure your user account.

 

To configure a VM for first boot automation:

  1. Go to myCloud and edit a VM

  2. Go to General

  3. Enter the VM Name. Some hypervisors require unique VM names, so the platform may rename your VM if the name already exists

  4. Optionally, before you deploy, enter a Fully qualified domain name (FQDN). If you don’t enter one, the platform may define one based on the configuration options

  5. In private cloud, VCD, AWS, and Azure, the platform will send you the initial password for your VM if the if the Guest initial password checkbox is selected

     VM General configuration for guest setup
    VM General configuration for guest setup
  6. Go to Variables. Optionally, enter or edit Keys and/or Values

     Configuration of VM variables for guest setup
    Configuration of VM variables for guest setup
  7. If you are using Cloud-init or similar, you can enter a startup script or configuration. Go to Bootstrap script. Enter a configuration definition for cloud-init or another compatible script. It can use the VM Variables. The following example is adapted from: All cloud config examples - cloud-init 24.4 documentation

  8. Click Save

The platform saves the bootstrap script configuration and variables in the VM metadata.

You can also manage cloud-init metadata using the Abiquo API. See Manage virtual machine metadata via API

When you deploy the VM, the template's guest setup process will run and it will configure the VM according to your guest setup options and definition.

 

Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved