VM affinity or anti-affinity rules go a level down from the group level affinity to a virtual machine level rule. The objective is to ensure that virtual machines are tied together or repel each other. This feature comes into play in situations where you may have two load balancer VMs that you want to keep apart, so that in the event of an underlying host failure the other instance is unaffected. Similarly, any clustering-based VMs would need to be kept separate to ensure both are not impacted by the same failures. In this recipe, we will walk through an example of ensuring that VMs run together.
Creating VM affinity or anti-affinity rules
Getting ready
These rules are created for VMs that are in a DRS-enabled ESXi cluster...