DRS Host Affinity rules

One of the new features in vSphere 4.1 is the ability to configure Host affinity rules for DRS. These enable you to split your vSphere cluster in several groups of hosts and assign assign a subset of your VMs to one of these groups.

There are plenty of use cases for this:

– Netapp Metrocluster

– Applications licensed based on CPUs

– performance sensitive applications

– …

In my case the cluster is spread over 2 sites, one production site and a failover site. The failover site is used to run test & dev servers. Only in case of serious problems on the production site the VMs should be moved to the failover site.

Open the cluster settings and create a “Virtual Machines DRS Group”

100818 - Screenshot- EVC-Cluster Settings - 001_ver001

I create a group called FailoverSiteVMs which contains the test & dev servers.

100818 - Screenshot- Edit DRS Group - 001

A second group is called ProductionSiteVMs which contains the production virtual machines.


Now we need to create 2 “Hosts DRS Groups. One for the FailoverSite.


And another one for the Production site.

100818 - Screenshot- Edit DRS Group - 004

An overview of the configured groups


Once all the groups are created you can start creating DRS rules. Select the “Virtual Machines to Hosts” as type, the Cluster Vms Group and the Cluster Hosts Groups.

There are 2 main types of DRS rules:

  • Should run on hosts in group
  • Must run on hosts in group
    The “Should run on hosts in group” rule keeps the VMs on the configured hosts but HA can violate the DRS rules and start the VMs on the failover hosts.

When the “Must run on hosts in group” type is used HA won’t violate the DRS rules and the VMs won’t be restarted on the failover hosts.

100818 - Screenshot- Rule - 001

Once the rules are configured the rules dialog looks like this.


Tagged with: , , ,
Posted in Virtualization
IT Pro Summer GP
IT Pro Summer Grand Prix

IT Pro Summer Grand Prix

Microsoft Virtual Academy

MS Virtual Academy

Pro-Exchange / Pro-Lync / Pro-Office365

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 158 other followers

%d bloggers like this: