Documentation

Skip to end of metadata
Go to start of metadata

A virtual machine instance is a copy of the selected disks of a virtual machine at a given time that is registered in Abiquo as a virtual machine template. The instance functionality varies slightly depending on the type of datacenter or public cloud region in which an instance is created.

What is an Instance?

An instance is a copy of the selected disks of a virtual machine at a given time. It is stored in the Appliance Library with a copy of the virtual machine template definition that you created the virtual machine from. When you drag a template into a virtual appliance, you can select an instance to create a virtual machine with the snapshot of the disks and the template definition based on a copy of the original template definition. 

When you deploy a standard virtual machine, the Abiquo platform uses virtual machine templates from the Appliance Library for the enterprise and datacenter. The deploy process copies the template disk from the Appliance Library to the target hypervisor and configures the virtual machine based on the template definition and your configuration. This means that when you undeploy a virtual appliance, all changes that you made to the standard disks will be lost because the next time you deploy, the empty disks will be recreated and the template files will be copied again from the Appliance Library to the target hypervisor.

Creating an instance does not save the configuration of the virtual machine. The instance will always use the instance's copy of the original VM template definition to create a new VM. You can edit the instance template definition and it will not affect the original VM template. 

  • To persist VM configuration, create persistent virtual machine templates (see Manage Persistent Virtual Machine Templates) and then deploy them as persistent virtual machines (see Create Persistent Virtual Machines in Datacenters). The virtual machine configuration and changes to the system disk will be maintained after you undeploy the virtual machine.
  • To create complex virtual machine configurations and preparing a set of virtual machines to meet user needs, create a virtual appliance with the desired configuration and

See Saving Changes to Virtual Machines and How VM instances work for more information about instances.

Functionality Diagram

The following diagram shows the differences between an Abiquo instance in a regular Abiquo datacenter (left) and in an Abiquo public datacenter with Amazon (right). The regular Abiquo instance copies the VM definition from the original template and is linked to the master template. This is a simple example of a VM template with only one disk.

Create Instances for Hypervisors

Creating Virtual Machine Instances

Prerequisites

You must deploy virtual machines before you can create instances. The machines must be deployed and stopped (powered off).

In Abiquo 3.4 and above, you can select the virtual machine disks to include in the instance

To create instances of virtual machines, open the virtual appliance where the virtual machines are located, then select each virtual machine and power it off.

Then click the Create instance button at the top left of the Virtual machines pane.

A popup will appear with a list of all the virtual machines that can be selected to create an instance. 

On this popup, you can:

  1. Select "Mark all" to select all virtual machines of the current virtual appliance.
  2. Select individual virtual machines
    1. Edit the name of the instance to create
    2. Select the disks to copy in the instance

When you rename an instance, you should keep a note of the name of the original template that the virtual machine was deployed from. This will help you to find your instance in the future. You should also note the Creation date and Creation user.

Click the edit link. Enter a new name, then click Accept.

Then click Select disks. A dialog will open with a list of the Virtual machine disks.

When you have selected all the virtual machines you wish to instance, and selected their disks, click Create instance to start the instance process.


The progress of your instances will be shown in the Virtual machines pane.

Create a Template from a Captured Virtual Machine

When you capture an external virtual machine into Abiquo, the captured virtual machine does not have a virtual machine template. This means that if you undeploy the virtual machine, you will not be able to recreate it again from a template. To store a copy of the virtual machine disk as a template in the Apps library, create an Abiquo instance of the virtual machine.

Deploy Virtual Machine Instances

When you add virtual machine templates to a virtual appliance, if the template to add has instances, the following dialog is shown so you can select an instance and/or the master template. Abiquo shows the name you gave the instance, the creation user and the creation date and time.

Remember that the virtual machine created from an instance will have a copy of the original virtual machine definition from the master template (not from the virtual machine). You can edit the Instance template to change the VM definition.

After you create an instance, the master template will be marked in the Appliance library with an "M" in the top right-hand corner. Click the master template to view its instances.

Locate Your Instance in the Apps Library

After you create an instance, it will be stored in the Apps library, with the original virtual machine template, which is a master template. A master template is marked with an "M" in the top right-hand corner. Click on a master template to view its instances.

By default, an instance has the same name as your virtual machine. By default, your virtual machine has the same name as the virtual machine template it is created from. Abiquo recommends that if you rename the virtual machine or the instance, you should keep a record of your changes to assist you in locating the virtual machine instances in the Apps Library.

You can manage instance templates in the same way as other appliance library templates. Templates that are in use cannot be deleted. Click on a different template to close the instances view.

Promote Virtual Machine Instances

If you have permission to modify virtual machine templates in the Apps Library, you can Promote an Instance to a Master Template. This creates a new master template that includes a copy of the instance disk image the template definition. You can modify the definition in order to change the base configuration when you deploy a virtual machine with the copy of the instance disk image. After you promote an instance, you can delete the original instance and template if there are no virtual machines deployed with it. In the following screenshot, the m0n0wall_03 instance has been promoted to a master template.

Create Instances in Public Cloud Regions and Docker

Create a Template from a Virtual Machine

When you copy a virtual machine system disk to create a virtual machine template, the new template is called an Abiquo instance. An Abiquo instance in public cloud is independent of the original virtual machine template.

AWS
  • An Abiquo instance of an Amazon virtual machine is a private EBS image
  • The virtual machine must be deployed from an EBS image
  • Abiquo does not support Abiquo instances of virtual machines deployed from S3 images because of the customized bundle process that is required to create these images
Azure
  • An Abiquo instance of an Azure virtual machine is based on a snapshot
  • Abiquo will 
    • Create a snapshot of the VM primary VHD disk
    • Create a new blob from the snapshot in user's Azure storage account
    • Create a new template with this blob
  • Abiquo only uses Azure storage accounts with a "locally redundant" configuration
  • The name will be in the format INSTANCE_NAME_IN_ABIQUO + '_abqinstance_' + AZURE_TEMPLATE_ORIGINAL_NAME

 


Create an Abiquo Instance

To create an Abiquo instance in public cloud, the process is the same as for an Abiquo instance in a datacenter.

First, power off the virtual machines.

Power off virtual machines to create EBS images

In AWS, it is possible to create an EBS image from an Amazon virtual machine that is powered on, but Amazon recommends that you power off the virtual machine first. This is because a running instance is not captured at a specific point in time, so changes on the hard disk during image creation could lead to loss of data or corruption of the image. For this reason, with Abiquo you can only create an EBS image from a powered off virtual machine.

 

 

Click Create instance

 

From the popup list, choose the virtual machines you wish to instance.

Click the edit link and rename the machines, then click Accept and Create Instance.

For each machine:

  • When you click the pencil icon and enter a new name for your instance
    • In AWS, this name will be set as the AMI Name, which cannot be changed
    • In Azure, the name will be in the format INSTANCE_NAME_IN_ABIQUO + '_abqinstance_' + AZURE_TEMPLATE_ORIGINAL_NAME
      • For example:  1b7e3d60-68cb-486c-af9b-1e1e783a6397-snapshot-2b171e93f07c4903bcad35bda10acf22-abqinstance-CoreOS-Stable-494.3.0
    • Always enter a new name for each instance because two templates may share the same name and description
      • Templates are displayed in the Apps library in creation order
  • After you enter the name, click Accept
  • Tick the checkbox to indicate that you wish to instance the virtual machine

Click Create Instance at the bottom of the popup

When the instance is complete, remember to power on the virtual machine again (especially if you are using Elastic IPs!).

To find your template in the Apps library, move the mouse over the templates to check their names.

Create an Abiquo instance of a Docker container

You can create an instance of a Docker container. This copy of the Docker container will be stored in the Docker registry with a copy of the original template's virtual machine configuration.

The instance will be displayed in your enterprise's Apps library view, in the Instances panel beneath the master template.

A remote search of the Docker registry does not show the instances, because Abiquo filters these snapshots in the remote search to avoid exposing tenant-specific instances to other tenants.

A docker instance cannot be promoted.