To set up anti-affinity rule to keep two Microsoft Cluster virtual machines on separate hosts, you must edit the DRS cluster.
To edit the DRS cluster using the vSphere Client:
- Navigate to Rules > Add.
- Click Add.
- Click the DRS Groups Manager tab.
- Click Add under Host DRS Groups to create a new Host DRS Group containing half of the ESX/ESXi hosts in the cluster. Create a second Host DRS Group containing the remaining hosts.
- Click Add under Virtual Machine DRS Groups to create a Virtual Machine DRS Group for each anti-affinity virtual machine.
- Click the Rule tab.
- Select Virtual Machines to Hosts from the Type dropdown.
- Navigate to Cluster Vm Group > Must run on hosts in group.
- Select the first virtual machine from Cluster VM Group.
- Select a host from the Cluster Host Group.
- Click Must run hosts in group.
- Select the second virtual machine from Cluster VM Group.
- Select the second host from the Cluster Host Group and click OK.
To edit the DRS cluster using the vSphere Web Client:
- Click Host and Clusters.
- Select the Cluster to add the rule to.
- Click the Manage tab.
- Click Settings.
- Click DRS Groups.
- In the DRS Groups section, click Add.
- In the Create DRS Group, enter a name for the group.
- Select VM DRS Group from the Type dropdown and click Add.
-
Select the virtual machine to add.
Continue this process until all required virtual machines are added.
-
Click OK.
Note:
- This requires at least four hosts to support a Microsoft Cluster of two virtual machines.
- Hard and soft rules were added in vCenter Server 4.1 to allow HA to consider DRS during virtual machine boot.