Documentation

Skip to end of metadata
Go to start of metadata

This page describes how to configure virtual machines in datacenters and public cloud regions. After you create your virtual appliance and add virtual machines, you can configure virtual machines before deployment or reconfigure after deployment. To toggle the tabs on and off, click the Tab view button at the top of this wiki page. 

Prepare to configure a virtual machine

Abiquo 3.8.1 introduces hot-add and hot-reconfigure of virtual machines on ESXi hypervisors. If your virtual machine template and VM operating system support hot-add and hot-reconfigure, you can configure the virtual machine while it is powered on.

 

After deployment, power off the virtual machine before you reconfigure. Abiquo recommends that you configure the network before you deploy. You can configure captured virtual machines in the same way as virtual machines created in Abiquo.

  1. If the virtual appliance is deployed, select the virtual machine and power it off by clicking the shutdown button on the control panel. If your guest supports graceful shutdown, for example, if you have installed the guest tools, select the Shut down option.

    Otherwise, you can connect directly to the virtual machine and perform a graceful shutdown. Or if this option is not successful, or your virtual machine is already prepared with all services shut down, you can select the Power off option.
  2. When the virtual machine is powered off, its status bar should turn red.
  3. Click the edit button to modify the virtual machine configuration.

    Edit the configuration as described in this manual. Note that some of the virtual machine configuration tabs may or may not be visible, depending on your datacenter configuration and privileges.
  4. After you make your changes click Save. The cloud platform orchestrator will reconfigure the virtual machine. 
  5. Deploy or power on the virtual machine.
Virtual machine names and power on order

Virtual machines will be powered on in ascending alphanumerical order. Thus it may be helpful to number your virtual machines in front of the their names. As an example, 1_WebServer will power on before 2_Database. You should remember that although the virtual machines will be powered on in this order, there is no guarantee that the machines will finish powering on in the same order.

Infrastructure updates

The periodic infrastructure check will detect direct changes to the virtual machines (CPU, RAM and hard disk) and these changes will be reflected in platform statistics and accounting, as well as the VM general configuration page.

 

Configure Network

Configure Storage

Configure Virtual Machine Backups

Configure Bootstrap Scripts

In Abiquo you can insert UNIX bootstrap scripts to execute on first boot of your UNIX virtual machines in public cloud. You can use this feature if you have the "Edit virtual appliance details" privilege.
Cloud provider support

The bootstrap script feature is available in all public cloud providers supported by Abiquo.

VM support

(tick) Bootstrap scripts can be used on all UNIX VMs
(error) Windows virtual machines are not yet supported

VM access

You must open port 22 on the virtual machine. In the cloud providers that support Firewalls (such as AWS, HP Cloud and Google Compute Engine), you can use the Abiquo firewalls feature to allow access. 

Abiquo will connect to the virtual machine via SSH and upload the bootstrap script before running it.  If you have a public SSH key configured in Abiquo, it will also be installed on the virtual machine to allow easy access to it.

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

The only requirement is that the virtual machines that are being configured have a public IP address (or a reachable IP address) and have a running SSH server and the port 22 accessible. Abiquo will use an SSH connection to the virtual machine to run the bootstrap script on it.

Add a bootstrap script for a virtual machine

Edit the virtual machine, 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 http://www.abiquo.com/2014/05/14/abiquo-dynamic-inventory-plugin-for-ansible/

Implementation

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 virtual machine 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).

 

Assign Firewalls

Configure Chef

Chef is an infrastructure automation product that uses configuration recipes. You can use Abiquo Chef Integration to deploy a virtual machine that will then configure itself using Chef recipes and roles. Chef-enabled virtual machines are marked with the Chef logo .

Configure Chef Recipes and Roles

The Chef tab is enabled if the enterprise is Chef-enabled and the virtual machine template is Chef-enabled. Before the virtual machine is deployed, you can select from the available roles and recipes. These will be added to the machine's runlist. When the machine is deployed it will download the roles and recipes, and run them in order. Click the Chef tab. By default on this tab you can select roles. Mark the "Select individual components" checkbox to select individual recipes too. The selected recipes will be added to the Virtual Appliance's runlist in order of selection.

To change the order of the runlist, click on the pencil button beside a role or recipe, then edit the order number, then click OK.

Change the Order of Roles and Recipes After Deployment

To change the runlist order after deployment click on the pencil button, then edit the order number, then click OK. The Abiquo Chef Agent will connect to the Chef Server and update the runlist.

See also Configuring and Using Abiquo Chef Integration in the Abiquo HOWTOs and Troubleshooting Abiquo Chef Integration in the Administrator's Guide.

Configure Chef Attributes

The Abiquo Chef integration now supports Chef attributes.  Abiquo can pass configuration attributes to Chef for your recipes. You can find out what attributes are available from the Chef recipe configuration files. See http://docs.opscode.com/chef/essentials_node_object.html 
  • Edit the virtual machine 
  • Open the Chef tab at the Attributes page.
  • Enter the parameters for each recipe in JSON format. 
    • The Chef attributes must be enclosed in "{ }". You must enter a valid JSON document and in version 3.8.5+, Abiquo will validate this.
    • Abiquo does not validate these attributes, so check them carefully.
  • Click Save
    • Note: this will save the entire virtual machine configuration

Assign Load Balancers

To assign a virtual machine to a load balancer, select the load balancer from the list.

Configure Metrics

If you have the privilege to Manage virtual machine monitoring and it is configured in your virtual datacenter, you can enable the option to fetch builtin metrics from the hypervisor or public cloud region.

Enable Monitoring and Metrics

To enable virtual machine monitoring and metrics, work with a virtual machine that is powered off or undeployed.

Edit the virtual machine and go to the Monitoring tab.

Mark the fetch metrics checkbox. This will retrieve all metrics for the virtual machine.

Select from the available options, for example, for AWS, you can select detailed or basic monitoring.

The functionality and list of available metrics depend on the underlying virtualization technology and the platform configuration.

Select the individual metrics you would like to display for your virtual machine. Abiquo will always retrieve all metrics, so you can change the metrics to display at any time. And you can use any metric for alarms and alerts, even you do not display it.

Display Metrics for a Virtual Machine

On the virtual machine icon, click the Monitoring symbol to display the metrics. 

The metrics panel will open.

Select the refresh button  to update the display of a metric.

Select the filter button  to configure the display of the metric.

Set the

  • Granularity, which is how often the metric is sampled
  • Statistic, which determines how the raw values will be processed over time
  • "Last" period, which is how long the display will look behind at the processed data.
  • Metric dimensions
    • For metrics with more than one possible element being monitored, for example, multiple hard disks, you can display metric dimensions, which are metrics for separate elements.
    • To view metric dimensions, click Get dimensions. Select a dimension.
      • If no dimension is selected, the default value is the average of all dimensions

Click Accept to save the values.

To view the exact metric values in a call-out box, mouse over the monitoring graph line.

To create a highlight point, click on the metric graph line.

To simultaneously view the data for more than one virtual machine, use the virtual appliance monitoring view.

Configure Alarms

Configure Variables

You can set guest variables to pass user data to your virtual machines and Docker workloads before deployment.

Support for variables

This feature depends on the support of the hypervisor, cloud provider or Docker. Full support is available in all cloud providers, hypervisors and Docker, with the exception of KVM, which uses metadata, and Hyper-V.

This functionality is available through the Abiquo API. Variables are stored in the VirtualMachine variables attribute, which is a dictionary of variable keys and values. You can create variables for virtual machines when you create a virtual machine, and update or delete them by updating the virtual machine. See VirtualMachineResource

Default template variables

Your administrator may have added variables to your template. Before you deploy the virtual machine, you can add new variables, edit existing variables and remove them.

Add variables

You can only add guest variables to machines that are undeployed.

To add Guest Variables through the UI, edit the virtual machine or container, and go to the Variables tab.

Enter the Key and Value, then click Add. 

The maximum length for VM variables is a key of 50 characters and value of 255 characters.


Edit variable values

To edit a value, click the pencil edit button next to the value.

Delete variables

To delete a variable, click the X in the left column beside the variable name.

To save the virtual machine or container with the variables added or deleted, click Save. The virtual machine will be reconfigured.

Read Guest Variables

Reading VM variables in ESX guests:
The guest must have the VmWare Tools installed. Then you can run the following command in the guest to get the value of a variable:
vmtoolsd --cmd "info-get guestinfo.abiquo.<variable-name>"

Reading VM variables in XenServer:
The guest must have the XenServer Tools installed. The you can retrieve the variables as follows:
In Windows guests, you can use the WMI interface as explained here: http://support.citrix.com/article/CTX136422?_ga=1.183130470.1771169273.1424347211
In Unix guests, you can run the command: xenstore-ls vm-data

Reading VM variables in AMAZON:
The variables are stored on the virtual machine filesystem in ~/vm-variables.rc 

Reading VM variables in Azure:
Azure will populate the variables to the templates that support Cloud Init. You can read them as follows:
In Windows VMs: You’ll find the variables in the file: %SYSTEMDRIVE%\AzureData\CustomData.bin
In Linux hosts, data is available in: /var/lib/waagent/ovf-env.xml
The data in those files is encoded in Base64 so you’ll have to decode it first. In some Linux images, though, data is already decoded and available in: /var/lib/waagent/CustomData
For more info see: http://azure.microsoft.com/blog/2014/04/21/custom-data-and-cloud-init-on-windows-azure/

Reading VM variables in DigitalOcean
See https://www.digitalocean.com/community/tutorials/an-introduction-to-droplet-metadata

Reading VM variables in GCE
See https://cloud.google.com/compute/docs/metadata