In Abiquo 2.6, this functionality is not available in public datacenters
This feature only ensures that the virtual appliance's layers are deployed to different hosts. It does not enable the high availability of the host. A virtual machine can belong to one layer only. Abiquo does not support layers that are intersections of other layers. For example, this means that if you have two layers, a virtual machine in the second layer may deploy on the same physical machine as a virtual machine in the first layer.
Ideally you should design and implement your layers before you deploy your virtual machines.
The following diagram shows a possible anti-affinity layers use case of a simple web stack.
In Abiquo, the web stack would look as in the following screenshot. This section gives an example of how to implement this use case.
Before you create a layer:
To add a new layer, click the "Add Layer" button. Enter the layer name.
Create all the layers you require for your virtual appliance.
Add virtual machine templates or virtual machines to the layer using drag and drop. Remember that the virtual datacenter must have a separate hypervisor (of the same type) for each machine in a layer.
Layers ensure that virtual machines deploy on separate hypervisors, so the following rules apply:
|Layer with deployed VMs|
Save the changes to your virtual appliance.
Deploy the virtual appliance. If the deploy fails, it may be because there are not enough physical machines available in your virtual datacenter.
If you have the View datacenter details privilege, you can see the remote access address on the virtual machine details panel. A quick way of checking that the virtual machines are deployed on separate physical machines is to check the remote access address of the virtual machine, which should be different for each physical machine.
The following screenshots of Infrastructure view show the virtual machines in layers deployed on physical machines in Abiquo.
Screenshot 1: Physical machine 1 (BC_KVM_21) contains Tomcat App server, MariaDB Database, and Apache servers.
Screenshot 2: Physical machine 2 (BC_KVM_23) contains: Tomcat App Server, MariaDB Database, m0n0wall firewall.
As the above screenshots show, the virtual machines in layers (Database and App Server) are deployed on separate hypervisors.
You cannot make changes to layers that may compromise anti-affinity while your virtual machines are deployed or running.
To change the name of the layer, first check that no machines in the layer are deployed. This means that all the virtual machines in the layer should be not deployed. This means that they are in the not allocated state. For example, virtual machines that are newly created in a virtual appliance that is deployed or part of a virtual appliance that has been undeployed.
Check that you have saved your changes to the virtual appliance. After saving, the virtual machines that are not deployed will be marked with aplus icon.
Move the mouse over the layer and click the configuration button.
Enter the new layer name
Save changes to the virtual appliance.
To remove a virtual machine that is not deployed from an anti-affinity layer:
Save the changes to the virtual appliance.
To remove a deployed virtual machine from a layer:
To remove multiple deployed virtual machines from a layer:
if you do not power off all the machines first, after removing each machine, you will have to save the virtual appliance to re-enable the power button on the control panel
Asynchronous Power Off
You do not have to wait for a virtual machine to power off fully before powering off other machines. After clicking the power button, you can close the virtual machine control panel and then go to the next virtual machine in the layer and power it off too.
Layers with deployed virtual machines must be deleted differently to layers with no deployed virtual machines.
If none of the virtual machines in a layer are deployed, you can delete the layer directly.
Move the mouse over the layer and click the layer delete button.
The layer will be deleted and the virtual machines will be moved to the general virtual machine area and marked with an asterisk ( * ) to show that they have been changed.
Save the virtual appliance to apply the changes, or undo the changes as described in Undo Changes to Layers.
To delete a layer that contains deployed virtual machines:
Delete a Layer Before it is Empty
You can delete a layer if only one virtual machine remains, even if the virtual machine is deployed and powered on. The virtual machine will remain powered on and it will be moved to the general virtual machine area.
Changes to layers will not be applied until you save the virtual appliance. Individual virtual machines with changes are marked with an asterisk beside the machine name.
To undo changes to a single virtual machine, move the mouse over the virtual machine and click theundo button.
To undo changes to all virtual machines and layers in the virtual appliance, click the Discard Changes button.
You cannot move a deployed machine directly from one layer to another.
To move a deployed machine to a different layer:
To discard changes to a virtual appliance, click the Discard Changes button. This button will only appear when you have unsaved changes, and save time by allowing you to discard multiple changes to a virtual appliance.
The following screenshot shows some examples of changes that will be undone when you click the Discard Changes button.