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:
In the bottom-left corner of the screen, open the User icon menu
Select Edit user account
On the General info tab, check that your email address and phone number are correct
Go to Advanced and enter your SSH public key
Click Save
General configuration
On the General tab, you can enter the FQDN and select the option to send a Guest initial password.
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, orlocaldomain
. After you deploy the VM, if you change the value in the operating system, then Abiquo will synchronize and obtain the new value.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:
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
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:
Create or edit a VM, and go to Bootstrap script
Paste your configuration or script in the Bootstrap script text box
Continue to configure the VM or click Save to finish
Notes about bootstrap in private cloud
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
domainIf 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
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
In Amazon Web Services you must always select a guest setup option
In AWS, for Windows, depending on the template and its guest setup option, the script format is:
cloudbase_init: cloud-init or shellscript
ec2launch and ec2config: you must have the following format
batch script: put a
<script>
tag at the start, and a</script>
tag at the end of the scriptpowershell script: put a
<powershell>
tag at the start, and a</powershell>
tag at the end of the script
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
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
To add a bootstrap script with the API, use VM metadata. See Manage virtual machine metadata via API
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:
Go to Virtual datacenters and edit a VM that is not deployed
Go to Variables
Enter a Key and Value
The length of these can be up to 255 characters each
Click Add
Add more variables as required
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
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 |
|
Private | Hypervisor tools | On ESXi, run this command on the guest to get the value of a variable: |
Private | Hypervisor tools | For vCloud Director, hypervisor tools does not support variables |
Public | Cloud-init | The variables are stored in the |
Amazon | Cloudbase-init | On Windows, the variables are stored in the |
Azure | Cloud-init | On Windows, according to the Azure documentation on custom data
On Linux, use cloud-init to read the variables from custom data. |