XenCenter

Manage VM groups

Note:

This feature is available in XenServer 8 and later pools. It is not available in pools running Citrix Hypervisor 8.2 Cumulative Update 1.

You can assign your VMs to VM groups that are started on hosts in your pool according to the placement rules of the group. The available placement types are “anti-affinity” and “normal”.

VM groups with normal placement do not have any special behavior.

VM groups with anti-affinity placement have the following rules:

  1. No single host is the only place all VMs in a particular group are running.
  2. The count of VMs within the group for each host is as even as possible.

When a VM in a VM group with anti-affinity placement rules is started or evacuated from a host, XenServer chooses to place the VM on a host that enables the VM group to follow these anti-affinity placement rules as closely as possible. If the VM start or host evacuate cannot be done without breaching the placement rules, XenServer prioritizes completing the action over following the placement rules.

If the anti-affinity rules are breached, you receive an alert. Alerts are generated if all the running VMs in an anti-affinity group reside on a single host. If this changes, the alert is cleared. This alert is not generated if only one of the VMs in the group is running or no VMs in the group are running. For more information, see XenCenter Alerts.

In the following scenarios the VM group placement rules do not take effect:

  • In pools with Workload Balancing (WLB) enabled, the VM group is not used for starting, restarting, resuming, or migrating the VM. Instead, Workload Balancing nominates the best server for the VM by analyzing XenServer resource pool metrics and by recommending optimizations. These recommendations can cause the VM anti-affinity rules to be breached.
  • If the VM has a home server defined, this setting takes priority over the VM group setting.

Considerations when using VM groups:

  • Only 5 anti-affinity groups per pool are supported.
  • When you clone a VM that is in a VM group, the new VM is not added to the same VM group. You must explicitly set the VM group for the new VM.
  • If you revert a VM to a previous snapshot, the VM retains its current VM group setting. This setting does not change to the value it had when you took the snapshot.
  • Exporting a VM does not retain the VM group setting. If you import this VM again, it is not added to a VM group. You must explicitly set the VM group for the imported VM.

Manage VM groups dialog

In this dialog, you can create, delete, and update VM groups.

You can open the Manage VM group dialog from one of the following places:

  • In the Resources view, right-click on the pool and select Manage VM Groups….
  • In the XenCenter main menu, you can select Pool > Manage VM groups. For more information, see Manage VM groups.

The window lists the VM groups in your pool and for each of them shows:

  • The user-defined group name
  • The type of placement this group uses
  • An optional description of the group
  • The number of VMs in the group

Select a VM group to display the list of VMs in that group in the right panel.

Create a VM group

Note:

If you try to create more than 5 anti-affinity groups, XenCenter displays a warning that this operation is not supported.

To create a new VM group:

  1. In the Manage VM group dialog, click New VM group. The New VM group wizard opens.

  2. In the Name panel, specify the following:

    • The Name for the VM group.
    • (Optional) A Description for the group.
    • The type of Placement to use. The option “anti-affinity” is selected by default.

    Click Next.

  3. In the Virtual Machines panel, choose the VMs to add to the new group.

    If a VM is already a member of an existing group, XenCenter shows a warning that adding the VM to this group removes it from the existing group. A VM cannot be in more than one VM group. Click Yes to continue with this move and No to leave the VM in its current group.

    Click Next to continue.

  4. In the Finish panel, review the settings you specified. If they are correct, click Finish.

Delete a VM group

To delete a VM group:

  1. In the Manage VM group dialog, select the group you want to delete.
  2. Click Delete.
  3. XenCenter shows a warning that you are deleting a VM group. To confirm the deletion, click Yes.

If you delete a VM group that has VMs in it, the VMs are no longer associated with a group, but are not otherwise affected.

Update the properties of a VM group

  1. In the Manage VM group dialog, select the group you want to edit.
  2. Click Properties.
  3. In the Name panel, you can update the Name and Description of the group. Placement cannot be updated.
  4. In the Virtual Machines panel, you can add and remove VMs in the group.
  5. Click OK.
Manage VM groups