Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

This page describes the configuration to enable users to automate VM first boot with cloud-init or similar.

In private cloud and VCD, the platform implements cloud-init with configuration drive. See Configuration drive.

In public cloud, the platform uses cloud provider metadata. Please check your provider documentation about metadata security.

For Windows in AWS, the platform supports guest setup with CLOUDBASE_INIT, EC2LAUNCH_V2, EC2LAUNCH, and EC2CONFIG.

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

    • User data on Configuration drive or cloud provider metadata

    • Network configuration injection (when DHCP is not present)

  • User bootstrap script and variables

Provider support for guest initial passwords

This table describes the priority of remote access credentails for the public cloud providers at the time of writing. Always check your cloud provider documentation for the latest information.

...

Provider

...

Operating system

...

Password priority

...

Azure

...

Windows

...

Guest initial password > Password

...

Other

...

SSH public key > Guest initial password > Password

...

AWS

...

All

...

SSH public key > Guest initial password

...

GCP

...

Windows

...

Password

...

Other

...

SSH public key

...

OCI

...

Windows

...

Password provided by OCI

...

Other

...

SSH public key

Configure guest initial password

...

Configure FQDN

...

Prepare templates for cloud-init

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.

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.

  1. 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.

    Code Block
    datasource:
      ConfigDrive:
    datasource_list: [ConfigDrive]
  2. In the case of Ubuntu 18+, disable any default network configuration utility.

    1. Remove /etc/cloud/cloud.conf.d/subiquity-disable-cloudinit-networking.cfg

    2. Remove /etc/netplan/00-installer-config.yml

To prepare Windows templates for public cloud, see the following pages.

Edit a VM template for guest setup

...

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.

Tip

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 setupImage Added
  6. Go to Variables. Optionally, enter or edit Keys and/or Values

     Configuration of VM variables for guest setupImage Added
  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: https://cloudinit.readthedocs.io/en/latest/topics/examples.html

     Configuration of bootstrap script for guest setupImage Added
  8. Click Save

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

Tip

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.