Abiquo easily enables users to automate VM first boot with cloud-init (private and public cloud) or hypervisor tools (private cloud). This page walks through Abiquo's first-boot automation with cloud init.
For information about how to use hypervisor tools in Abiquo, see Guest setup.
In private cloud and VCD, Abiquo implements cloud-init with configuration drive. For details of configuration drive in Abiquo, see Configuration drive.
Cloud-init in Abiquo
Abiquo supports two main kinds of first boot automation with cloud-init:
Abiquo built-in functionality
Guest initial password
Fully qualified domain name (FQDN)
SSH key injection
Configuration drive data (when Configuration drive is used)
Network configuration injection (in private cloud when DHCP is not present)
User bootstrap script and variables
Prepare template OS for network configuration with cloud init
For VMware (vCenter hosts, vCenter clusters, VCD) and other private cloud hypervisors, where cloud-init uses a configuration drive, you might need to prepare the operating system of your VM templates for this configuration.
Edit the cloud config installer file. The location of this file will vary by operating system. For example, /etc/cloud/cloud.conf.d/99-installer.cfg. Set the datasource to ConfigDrive as shown here.
datasource: ConfigDrive: datasource_list: [ConfigDrive]
In the case of Ubuntu 18+, disable any default network configuration utility.
Remove /etc/cloud/cloud.conf.d/subiquity-disable-cloudinit-networking.cfg
Remove /etc/netplan/00-installer-config.yml
Preparing templates
To enable users to work with cloud init, the administrator prepares VM templates that will run cloud-init services or cloudbase-init services (for Windows) or similar. The compatible version of cloud-init is version 0.7.9 or above, or cloudbase-init.
In public cloud:
You can generally assume that all templates will work with cloud-init.
In AWS, you must select an appropriate guest setup option for your template and add startup script in the corresponding format.
In private cloud:
Edit the cloud-init templates in the platform and go to the Advanced tab.
For the Guest setup option select cloud-init.
Optionally, choose to Set initial guest password. We recommend that you perform some additional configuration, to ensure that the user receives their password by SMS or email. See Guest setup#Set initial guest password.
Optionally, set a startup script for a template. See Modify a VM template#AddabootstrapscripttoaVMtemplate
Optionally, set predefined variables for a template. See Modify a VM template#EditVMtemplatevariables
You can then share this template with users in different cloud tenants by setting scopes that contain these tenants (enterprise access lists).
User VMs
To enable you to easily connect to your VM, the guest setup process will inject the SSH key from your user account into the VM. See Edit your user account details.
To work with first-boot automation, create a VM by selecting the template as usual.
To define a fully qualified domain name (FQDN) before deploying the VM, enter it on the General tab. Otherwise, the platform may define one based on the configuration options. See Guest setup#Set fully qualified domain name.
Screenshot: Entering the VM Name and FQDN
You can also enter a configuration definition for cloud-init or another compatible script on the Abiquo VM Bootstrap script tab.
Screenshot: An example of a cloud-config script for cloud-init.
You can additionally enter and edit Keys and/or Values on the Variables tab.
Screenshot: Enter or edit VM variables
For more information, see VM variables.
When you save the VM, Abiquo stores the bootstrap script configuration and variables in the Abiquo VM metadata. Note that there may be a bootstrap script or VM variables that the administrator has predefined in the template. See Modify a VM template#Variables tab.
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 cloud-init process will run and it will configure the VM according to your guest setup options and definition.