Nutanix VM affinity rule | Nutanix Community
Skip to main content

Cluster configured RF2 with 3 nodes.

I have Created VM with Affinity Rule.

If we configured RF2 to maintain 2 numbers of data copies in the cluster.

If the Host down, Affinity rule VM also Down.

Affinity VMs ⇒ How many data copies are maintained in these VMs. If it's maintained, Why?

Note : Affinity rule applied some application licensing, host resources (such as available CPU cores or CPU gigahertz speed), available RAM or RAM speed, or local SSD capacity.

If the virtual machine is stored on a storage container with Replication Factor 2 then there are 2 copies of the data stored. If the host goes down with a virtual machine with affinity rules for that specific host, then the virtual machine stays down. You have to remove the affinity rule to get the machine started again. Best practice is to set affinity rule to at least 2 hosts so the vm will migrate when lcm or maintenance is done. 


Afinity rules are totally independent from data copies (replication factor).

A VM with or without affinity rules simply resides on Node X. VM Data copies will reside on Nodes X and Y (RF2).


Affinity rules are not depended on Replication Factor. 

Incase if you want to change the Replication Factor for certain VMs then you can create a separate containers like a RF#2 , RF#3 container and plan the VM as per the requirements 


Hello @Shield07 

If you choose to apply the VM-host affinity policy, it limits Acropolis HA and Acropolis Dynamic Scheduling (ADS) in such a way that a virtual machine cannot be powered on or migrated to a host that does not conform to requirements of the affinity policy as this policy is enforced mandatorily.

That’s related to VM placement not VM data, VM data still use data locality and data copy is distributed on all nodes.


Hello @Shield07 

If you choose to apply the VM-host affinity policy, it limits Acropolis HA and Acropolis Dynamic Scheduling (ADS) in such a way that a virtual machine cannot be powered on or migrated to a host that does not conform to requirements of the affinity policy as this policy is enforced mandatorily.

That’s related to VM placement not VM data, VM data still use data locality and data copy is distributed on all nodes.

Thank You, Moustafa