Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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

In private cloud and VCD, Abiquo implements cloud-init with configuration drive. 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 including VM variables as user data

    • Network configuration injection (when DHCP is not present)

  • User bootstrap script and variables


Configure guest initial password

Unable to render {include} The included page could not be found.

Configure FQDN

Abiquo can set a hostname and fully qualified domain name (FQDN) before the VM is deployed.

If a user enters an FQDN when they configure the VM, this will override the defaults because it is the highest priority FQDN

If the user does not enter an FQDN, Abiquo uses the following default:

  • Abiquo database ID (on Windows) or the VM_uuid (on Linux); and

  • VM network domain name (from the network of the VM’s NIC or the VDC default network) or localdomain

To change the default to always generate the automatic VM name from the database ID:

  1. Login to the Abiquo API Server as administrator

  2. Edit the abiquo.properties file and set the following property

# Generate VM name from database ID. If false use VM_uuid on Linux and VM_database ID on Windows  
abiquo.api.experimental.hostname13charsFromVirtualMachineDatabaseId=true

After the user deploys the VM, the user can change the FQDN in the VM operating system. In this case, Abiquo will update the FQDN stored in the platform.

Prepare templates for cloud-init in private cloud

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.

    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


Edit templates for cloud-init in Abiquo

To use cloud-init in private cloud:

  1. Edit a cloud-init template in the platform

  2. Go to the Advanced tab

    1. For the Guest setup option select Cloud-init

    2. Optionally, choose to Set initial guest password.
      The platform will log in with the template User and Password and change the password to an initial password as configured. The platform will send the initial password to the user via mail or SMS as configured. It does not store the initial password. It is possible to display the initial password using the key button in the Abiquo UI

    3. Select the Operating system and enter an optional Version

    4. For the User, enter a user in the template. For Windows enter “Administrator” or for Linux, enter a user with password access to sudo to change the password

    5. For the Password enter the default password of the user on the VM template.

  3. Optionally, go to Bootstrap and paste your configuration or script in the Bootstrap script text box. This can be a cloud configuration, for examples see https://cloudinit.readthedocs.io/en/latest/topics/examples.html, or another startup script that is compatible with cloud init.

  4. Optionally, go to Variables and set predefined variables for the template. The configuration process may use the variables, it will also make them available through the configuration drive as user data or as VM metadata.

To share this template with users in different cloud tenants, go to Scopes and select scopes that contain the required tenants. See Share VM templates

  • No labels