Skip to content
2010/08/20 / Stijn Vermoesen

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.

image

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

image

And another one for the Production site.

100818 - Screenshot- Edit DRS Group - 004

An overview of the configured groups

image

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.

image

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 86 other followers