Clearpath Insights: Managed Services | Cloud Services | IT Solutions

vSphere 5 DRS Groups and Rules

I was recently looking for a step-by-step guide for creating vSphere DRS rules and groups for a customer implementing a vSphere Storage Metro Cluster with EMC VPLEX and had trouble finding a comprehensive article, so I decided to write one. Without further ado:

  • Creating virtual machine DRS Groups
  • Creating host DRS Groups
  • Creating Run VMs on Hosts Rules
    • Must versus should
    • Creating Separate Virtual Machines/Keep Virtual Machines Together Rules

Creating virtual machine DRS Groups

To create a virtual machine DRS Group:

1. Right-click the DRS cluster in question, then click Edit Settings.
a. Alternatively, select the DRS cluster in the Hosts and Clusters inventory view, then click Edit Settings.


describe the image

 

creating virtual machine DRS groups production cluster resized 600

2. Click DRS Groups Manager under vSphere DRS.

 

creating virtual machine DRS groups drsgroup manager resized 600

3. Here, you’ll see any existing DRS Groups. Click Add under Virtual Machines DRS Groupsto add a new virtual machine DRS Group.

creating virtual machine DRS groups add resized 600

4. Select the virtual machines you wish to place in a DRS Group, click the right arrow to add them to the DRS Group, give it a meaningful name, then click OK.

creating virtual machine DRS groups name resized 600

You’ve now created your virtual machine DRS Group.

creating virtual machine DRS groups domain controllers resized 600

Creating host DRS Groups

Still in the DRS Groups Manager, to create a host DRS Group:

1. Click Add under Host DRS Groups.

creating virtual machine DRS groups add host DRS manager resized 600

2. Select the hosts you wish to place in a DRS Group, click the right arrow to add them to the DRS Group, give it a meaningful name, then click OK.

creating host DRS groups resized 600

You’ve now created a host DRS Group.

 

creating host DRS groups production cluster settings resized 600

 

Creating Run VMs on Hosts Rules

To create a Run VMs on Hosts rule, you must have added the virtual machines in question to a Virtual Machines DRS Group, as well as added the specified ESXi hosts to a Hosts DRS Group. Please refer to the previous sections for guidance on those two tasks.

1. Click Rules just below the DRS Groups Manager in the Cluster Settings window.

creating run vms pn=host rules resized 600

2. Click Add to create a new DRS Rule.

creating run vms on host add rule resized 600

3. In the Type drop-down menu, choose Virtual Machines to Hosts.

virtual machines to host resized 600

4. Choose the appropriate Cluster VM Group, Cluster Host Group, DRS Policy (covered more later), and finally, give it a descriptive name. Click OK when finished.

creating run vms on host cluster vm group resized 600

You’re now finished creating the Run VMs on Hosts DRS Rule. You should see it in your Rules inventory, as below.

run vms on hosts drs resized 600

Must versus should

When creating a Run VMs on Hosts rule, you’ll be presented with the following options:

  • Must run on hosts in group
  • Should run on hosts in group
  • Must not run on hosts in group
  • Should not run on hosts in group

Now, the difference between these rules may seem obvious, but there is a bit of subtlety at play here. The main thing to be cognizant of is that HA will respect Must run or Must not run rules when performing HA restarts after a host failure. For further reading on the topic, see the excellent articles below from Frank Denneman:

http://frankdenneman.nl/drs/sdrs-anti-affinity-rule-types-and-ha-interoperability/

http://frankdenneman.nl/drs/vm-host-affinity-rules-should-or-must/

Creating Separate Virtual Machines/Keep Virtual Machines Together Rules

Traditionally known as VM affinity/anti-affinity, these rules will do as described, either keep virtual machines together on the same host or keep them separated on different hosts.

  1. In vSphere DRS Rules, click Add.

vsphere drs rules resized 600

2. In the Type drop-down menu, choose either Keep virtual machines together or Separate virtual machines, depending on your intent.

vsphere drs rules keep vms together resized 600

3. Click Add to add virtual machines to the rule.

add vms to rule resized 600

4. Select the virtual machines you wish to keep together or separate, then click OK.

vms to keep together or separate resized 600

5. Give the rule a descriptive name, assure the correct virtual machines are in the list, then click OK.
 
create rule descriptive names resized 600

6. You should now see the new rule in your Rules list. Click OK to finish.

rules list resized 600

 

 

cta-engineers-customize

Our engineers customize
IT solutions for your business

The best hardware, software and cloud computing solutions are nothing without expert design and implementation.

Our team becomes your team. We take the time to understand your business needs first, and tailor high performance systems specifically for you.

Learn more
Live Chat Support Software