How to configure VM-Host affinity rules in VMware vCenter Server
search cancel

How to configure VM-Host affinity rules in VMware vCenter Server

book

Article ID: 437479

calendar_today

Updated On:

Products

VMware vCenter Server 8.0

Issue/Introduction

Administrators require a method to control the placement of virtual machines on specific ESXi hosts within a cluster. This is commonly used for performance isolation by defining affinity between VM groups and host groups.

Environment

VMware vCenter Server 8.x

Resolution

You can create VM-Host affinity rules to specify whether or not the members of a selected virtual machine group can run on the members of a specific host group

  • Log in to the vSphere Client.

  • Create the necessary Virtual Machine and Host groups to which the affinity rule will apply.

  • Browse to the target cluster in the vSphere Client inventory.

  • Select the Configure tab.

  • Under the Configuration section, click VM/Host Rules.

  • Click Add.

  • In the Create VM/Host Rule dialog box, enter a unique name for the rule.

  • From the Type drop-down menu, select Virtual Machines to Hosts.

  • Select the appropriate Virtual Machine group and Host group.

  • Select one of the following specifications for the rule:

    • Must run on hosts in group: Mandatory affinity; VMs must reside on the specified hosts.

    • Should run on hosts in group: Preferential affinity; VMs should reside on specified hosts but can migrate if necessary.

    • Must not run on hosts in group: Mandatory anti-affinity; VMs are prohibited from residing on the specified hosts.

    • Should not run on hosts in group: Preferential anti-affinity; VMs should avoid specified hosts but may reside there if required.

  • Click OK to apply the rule.

 

 

Additional Information

For further details on cluster configuration, refer to the Broadcom TechDocs - Affinity_Rules