A VM-Host affinity rule specifies a relationship between a host group and a VM group in the same resource pool. A system administrator can create, enable, disable or delete a VM-Host affinity rule.
After you create a VM-Host affinity rule, you can update it in the following ways:
Enable the rule.
Disable the rule.
Delete the rule.
To make any other change (for example, to change the VM Group or Host Group), you must create a new rule.
vSphere VM-Host affinity rules that are created in resource pools that are mapped to a Provider VDC appear in each pool shown in the Resource Pools list under vSphere Properties. For more information about host DRS VM-Host affinity, see the VMware vSphere ESXi and vCenter Server Documentation.
This operation is restricted to system administrators.
You cannot create VM-Host affinity rule in a resource pool that does not contain at least one host group and one VM group.
- Choose a resource pool to contain the rule.
Select a resource pool from the Resource Pools list under vSphere Properties. VM-Host affinity rules in the resource pool are listed on its Affinity Rules tab.
- To create a VM-Host affinity rule in the resource pool, click the plus sign icon on the Affinity Rules tab to open the New VM-Host Affinity Rule window.
You must specify a name, VM Group, and Host Group for the rule.
- Type a name for the rule in the Rule Name field.
- Select a VM Group and a Host Group to which the rule applies.
Use the drop-down menus to list all VM groups and host groups in the selected resource pool. If the resource pool does not contain at least one VM group and one host group, you cannot create a rule.
- Specify the polarity of the rule. Click Must run on hosts to create an affinity rule. Click Must not run on hosts to create an anti-affinity rule.
- Enable or disable the rule.
- Specify whether or not the rule is mandatory.
Mandatory rules are more likely to cause conflicts that can affect system behavior, especially where a VM is the subject of multiple mandatory rules. See Affinity Rule Interactions and Conflicts.
- To enable, disable, or remove an existing VM-Host affinity rule, right-click the rule name on the Affinity Rules tab and select one of the available actions.