Skip to end of metadata
Go to start of metadata

The VM bootstrap script functionality varies between public cloud and private cloud. In private cloud, the bootstrap script can be used to add a configuration for cloud init and configuration drive, and you will need templates that support cloud-init services or cloudbase-init services or similar. In public cloud, you can add a bash script or other UNIX bootstrap script.

Bootstrap with Configuration drive in private cloud

To automate configuration at first boot in private cloud, add a configuration definition for your virtual machine. Abiquo will add the configuration definition to an ISO disk on your virtual machine, making it available to configuration systems on first boot for use with cloud-init templates and similar. You can use this feature if you have the "Edit virtual appliance details" privilege. 

Abiquo versions 3.10.5 and 4.0.2 introduce support for adding a fully qualified domain name (FQDN) using configuration drive and cloud-init. The user can edit the virtual machine and enter the FQDN on the General tab. If Abiquo detects that first boot automation is available, it may automatically set the FQDN using the name attribute of the virtual machine obtained from the Abiquo API, with the format ABQ-uuid and the domain of the virtual machine's networks, or the localhost domain.

The virtual machine templates determine the support for the bootstrap format and the virtual machine configuration. Check your provider's documentation before working with this feature

VM support

If your platform supports the bootstrap feature:

  • Abiquo creates an ISO disk on the VM, so your virtual machine must have fewer than four IDE disks attached before you begin
  • If there is bootstrap data, Abiquo creates an ISO disk 
    1. Abiquo will check that there are fewer than 4 IDE drives before attaching the ISO because that is the maximum number you can attach to the VM 
    2. The ISO disk has the label "config-2"
    3. Abiquo adds the following files to the folder "openstack/latest"
      1. user_data: Abiquo virtual machine Bootstrap script
      2. vm-variables.rc:  Abiquo virtual machine variables that are in 'key'='value'
      3. meta_data.json: Abiquo VirtualMachineIdentifier. The meta_data.json file is in the following format:

      4. If DHCP is not used in your environment, the network configuration of the VM will be placed in network_data.json file

    • You must obtain or create a template that runs cloud-init services or cloudbase-init services (for Windows), or a similar system. The template that you use will determine what the virtual machine will do with the configuration data.
  • VM access
    • You do not need to allow any type of access to the VM because the virtual machine can pull its own configuration from the Configuration drive.


Add a bootstrap script for a virtual machine

Edit the virtual machine, and open the Bootstrap tab. Paste your configuration definition in the text box.

You can also add VM variables on the Variables tab and Abiquo will add them to the vm-variables.rc file. And Abiquo will automatically add metadata for the virtual machine, but you can overwrite this in the Bootstrap data.

Bootstrap scripts in public cloud

In Abiquo you can insert UNIX bootstrap scripts to execute on first boot of your UNIX VMs in public cloud. You can use this feature if you have the "Edit virtual appliance details" privilege. The bootstrap script feature is available in all public cloud providers supported by Abiquo.

VM support

(tick) UNIX VMs support bootstrap scripts
(error) Windows VMs do not support bootstrap scripts yet

VM access

On AWS the platform adds the bootstrap script to the VM with user data. On providers that do not support user data, supply a reachable (e.g. public) IP address and open port 22 on the VM. In the cloud providers that support firewalls (such as Google Compute Engine), you can use the Abiquo firewalls feature to allow access. 

The platform will use connect to the VM via SSH and upload the bootstrap script before running it. If you have a public SSH key configured in your user account, the platform will also install it on the VM.

Depending on the features supported by the cloud provider, Abiquo might create a key pair to be used to access the VM, or might use the default (well known) credentials for the image.

Add a bootstrap script for a VM

Edit the VM, and open the Bootstrap script tab. Paste your script in the text box.

Do not use any headers, such as #!/bin/sh, because your script will be included in an Abiquo wrapper bash script

With this feature you can use your own scripts or tools such as Ansible to configure your virtual infrastructure. See also


Abiquo will wrap the user's bootstrap script in another bash script. This is done to provide a way to store the output and the errors that the script might generate, so users can troubleshoot it if something does not work as expected. Therefore you should not include script headers because they are already included in the wrapper script. Abiquo names the wrapper script  "abiquo-bootstrap". Abiquo will upload the script to the VM and leave a symbolic link to the script location in the user's home directory. 

Check script status and output

From your home directory, use the following commands to see the output and  status of the script:

  • ./abiquo-bootstrap status - Shows the PID of the bootstrap process (or nothing if it has finished).
  • ./abiquo-bootstrap stdout - Shows the full standard output for the bootstrap process.
  • ./abiquo-bootstrap stderr - Shows the full error output for the bootstrap process.
  • ./abiquo-bootstrap tail - Shows the last lines of the standard output for the bootstrap process.
  • ./abiquo-bootstrap tailerr - Shows the last lines of the error output for the bootstrap process.
  • ./abiquo-bootstrap exitstatus - Shows the exit code of the bootstrap process (0 usually means success).



  • No labels