Create Anti-Affinity Rules – Nutanix

In this example i will be adding an anti-affinity group called Jordan-Group-Anti and adding the vms Jord-web1 and jord-web2 to it

Log into any CVM in the cluster

acli vm_group.create Jordan-Group-Anti

Get Group list

acli vm_group.list

Add the two VMs to this group

acli vm_group.add_vms Jordan-Group-Anti vm_list=Jord-web1, Jord-web2

Verify VMs have been added to group successfully

acli vm_group.list_vms Jordan-Group-Anti

Apply anti-affinity rule to group

acli vm_group.antiaffinity_set Jordan-Group-Anti