Search the VMware Knowledge Base (KB)
View by Article ID

Ensuring virtual machines stay on a specific ESX/ESXi host (1005508)

  • 42 Ratings


This article provides steps to ensure that virtual machines stay on specific ESX hosts.


If you want a Virtual Machine(s) to only run on a particular ESX/ESXi host, you must create affinity rules to prevent DRS from auto-migrating the virtual machines to other ESX hosts

To create an affinity Rule in vCenter, see the below steps:

  1. Right click the Cluster > Edit Settings.
  2. Enable DRS, if it is not already enabled.
  3. Click Rules > Add.
  4. Click the DRS Groups Manager tab. 
  5. Click Add under Host DRS Groups to create a new Host DRS Group containing the hosts in the cluster that you want to tie the VMs to. 
  6. Click Add under Virtual Machine DRS Groups to create a Virtual Machine DRS Group for all of the virtual machines that you want to tie to hosts listed in the Host group created above
  7. Click the Rule tab, give the new rule a name and from the Type drop-down menu, click Virtual Machines to Hosts.
  8. Under Cluster Vm Group select the newly created VM group.
  9. Select Must run on hosts in group
  10. Under Cluster Host Group select the newly created Cluster Host Group and click OK.

For further details on affinity rules, see the vSphere Resource Management Guide.

Additional Information

See Also

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.


  • 42 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)

Please enter the Captcha code before clicking Submit.
  • 42 Ratings