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 5 Next »

This document describes the specific steps to configure VMs that are related to guest setup.
For details of how to fully configure a VM, see Configure virtual machines
For more details of Abiquo automation features, see Cloud VM automation guide

To get the most out of guest setup on your cloud platform, before you deploy your VM, create the following configuration.

Prepare your user account for VM guest setup

The cloud platform may inject your SSH public key for remote access and it may send your VM initial password by email or SMS.

To edit your user account and prepare for guest setup:

  1. In the bottom-left corner of the screen, open the User icon menu

  2. Select Edit user account

  3. On the General info tab, check that your email address and phone number are correct

  4. Go to Advanced and enter your SSH public key

  5. Click Save

General configuration

On the General tab, you can enter the FQDN and select the option to send a Guest initial password.

  1. Enter the fully qualified domain name (FQDN) of the VM. You can edit this value before you deploy the VM. If you don't enter a FQDN, the platform will automatically generate one. The hostname will be the VM name (format ABQ-uuid) or another Abiquo identifier (format ABQ-id).
    The domain will be the domain value of the private or external networks that the VM belongs to, or localdomain. After you deploy the VM, if you change the value in the operating system, then Abiquo will synchronize and obtain the new value.

  2. Select the checkbox to Generate an initial root or Administrator password for the VM and email it to the owner. You can select/deselect this checkbox before you deploy the VM.

Bootstrap scripts

On the Bootstrap tab, you can enter a startup script to automate first boot.

Before you begin:

  1. Create your VM with a template that is compatible with cloud-init version 0.7.9 or above, or cloudbase-init, or a similar system

  2. In private cloud, the platform will create an ISO disk for Configuration drive

To add a VM bootstrap configuration or script in private or public cloud:

  1. Create or edit a VM, and go to Bootstrap script

  2. Paste your configuration or script in the Bootstrap script text box

  3. Continue to configure the VM or click Save to finish

 Edit a VM and add a bootstrap script

Notes about bootstrap in private cloud

  1. If the user does not enter the FQDN on the General tab when editing the VM, the platform will try to set the FQDN using the name or ID attribute of the VM, and the domain of the VM's networks, or the localhost domain

  2. If your datacenter does not use DHCP, the VM can also get its network configuration from cloud-init, so you do not need to configure the network or allow access to the VM

  3. Abiquo uses the ConfigDrive DataSource for cloud-init. Reference: https://cloudinit.readthedocs.io/en/latest/topics/datasources/configdrive.html

Notes about startup scripts in AWS

  1. In Amazon Web Services you must always select a guest setup option

  2. In AWS, for Windows, depending on the template and its guest setup option, the script format is:

    1. cloudbase_init: cloud-init or shellscript

    2. ec2launch and ec2config: you must have the following format

      1. batch script: put a <script> tag at the start, and a </script> tag at the end of the script

      2. powershell script: put a <powershell>tag at the start, and a </powershell> tag at the end of the script

    3. ec2launch v2: use YAML. See https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-windows-user-data.html#user-data-yaml-scripts.
      If your script format is invalid, AWS will try ec2launch and ec2config format. See: https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-windows-user-data.html

Notes about startup scripts in OCI

  1. The Windows templates provided by Oracle Cloud Infrastructure include cloudbase-init.
    See https://docs.oracle.com/en-us/iaas/releasenotes/changes/595afbb7-de0c-4934-8074-5b1ed6be1b56/

Related pages

Variables

Add VM variables

Before you deploy a VM, you can set guest variables to pass user data to your VM. This functionality uses cloud-init and requires appropriate templates. In private cloud, the templates must have the guest setup flag set to cloud init. The administrator can add default variables for the VM template.

This functionality is available through the API. The platform stores variables in the VirtualMachine variables attribute, which is a dictionary of keys and values. See “Update a virtual machine” in VirtualMachinesResource

You can modify VM variables before you deploy the VM

Check your cloud providers' documentation for their recommendations about confidential information in variables

To add VM variables:

  1. Go to Virtual datacenters and edit a VM that is not deployed

  2. Go to Variables

  3. Enter a Key and Value

    1. The length of these can be up to 255 characters each 

  4. Click Add

     Edit a VM and add variables
  5. Add more variables as required

  6. To delete a variable click the trash can symbol beside the Key. To edit the Value of a variable, click the pencil edit button beside the Value

  7. To apply changes to variables, and other changes to the VM, click Save


Read guest variables

The location of the variable will depend on the method of guest setup that you are using for your VM.
Here are some general guidelines.

Cloud

Method

Variable location

Private

Cloud-init

  • On the cloud-init ISO, which has the label config-2.

  • The variables file is openstack/latest/vm-variables.rc

Private

Hypervisor tools

On ESXi, run this command on the guest to get the value of a variable:
vmtoolsd --cmd "info-get guestinfo.abiquo.<variable-name>"

Private

Hypervisor tools

For vCloud Director, hypervisor tools does not support variables

Public

Cloud-init

The variables are stored in the /opt/abiquo-env.rc file

Amazon

Cloudbase-init
ec2launchv2
ec2lanch
ec2config

On Windows, the variables are stored in the
C:\ProgramData\Abiquo\abiquo-env.rc file

Azure

Cloud-init

On Windows, according to the Azure documentation on custom data

Custom data is placed in
%SYSTEMDRIVE%\AzureData\CustomData.bin
as a binary file, but it is not processed. If you wish to process
this file, you will need to build a custom image, and write code to process the CustomData.bin..

On Linux, use cloud-init to read the variables from custom data.

  • No labels