Recently a customer asked if host-vm affinity rules and VM-VM anti-affinity rules can be combined and what the impact and caveats are of this particular configuration.
Example scenario
In this scenario two virtual machines run an application that is clustered at application level. Virtual machine 1 and 2 provide the service of App-cluster1, similar clusters are configured on VM3-VM4 and VM5-VM6. The compute cluster contains 6 ESXi hosts. The customer requires each app-cluster contained on its own hosts, during normal operations no app-cluster should share an ESXi host. The virtual machine within the app cluster cannot share the same ESXi host.
Virtual Machine to Host affinity groups
The first step is to create and configure the VM-Host affinity groups. A virtual machine DRS group is created for each App-cluster and a host DRS group is created that contain the hosts on which the app cluster will run. Lets zoom in to the configuration used for App-Cluster1.
Step 1: Create virtual machine DRS group add VM1 aContinue reading “Combining affinity rule types”