VM-VM Anti Afinity configuration | Nutanix Community
Skip to main content

Hi,

I would like to configure anti-afinity on on the VMs. I checked this only able to configure thru command. To configure the rules, does the VMs need to be powered down?

Hi @swee han, you can do this also from the UI. Select the VM, click update, scroll down till you see VM Host Affinity and click + Set Affinity.

This can be done online, no need to power down the VM


Hi, @PDAABI the setting I need to perform is VM-VM anti affinity, not VM host Affinity.  


@swee han, my bad, I misread your post. Indeed you need to enable this via the CLi, but the VMs do not need to be powered down. It just takes some time before the ADS (Acropolis Dynamic Scheduler) kicks in


Hi swee han,

That’s a good question. Powering off the VM is not a pre-requisite for the anti-affinity however the rule will take effect upon the VM power on task which is when the VM is scheduled with a particular host. Or as PDAABI mentioned above, you can wait.

Just in case you need the instructions: AHV Admin Guide: Affinity Policies for AHV


How many VMs can be in the VM-VM anti affinity group?


Hi swee han,

There is no limit on the number of VMs in the anti-affinity group. The main thing to look at is the amount of resources on your cluster. If the cluster can tolerate that many VMs (whatever is the number that you are considering to add into the group) then you should be able to do so. Also, please remember that you while anti-affinity rules have their uses and purpose, you don't have to configure them if you do not have particular requirements (clustered applications, licensing or else).