Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I have an ESX 3.5U4 cluster of, let's say, 20 hosts split between two or more blade enclosures/racks is there any way of configuring DRS to never host two guests of the same class on blades in the same enclosure?

It's easy to ensure they're not running on the same host but I want to ensure that in the event of losing an enclosure or rack that we don't lose all guests of a certain class. I could do it by only having one cluster member per enclosure or rack but that limits me in many other ways than I'm prepared to accept.

Thanks in advance.

share|improve this question
up vote 2 down vote accepted

Well I finally, kind-of, sorted this problem - not exactly the way I wanted but it's good enough.

Basically vCenter 4.1's updated DRS rule system has been upgraded a lot. The new version lets you create groups of hosts and groups of VMs then create one of four different rules against these. The rules are;

  • VM members in a named VM group must run on hosts members in a named host group
  • VM members in a named VM group should run on hosts members in a named host group
  • VM members in a named VM group mustn't run on hosts members in a named host group
  • VM members in a named VM group shouldn't run on hosts members in a named host group

Now this is far from the ideal I was looking for which was to have the ability to store the enclosure and/or rack number with the host meta data then define VM groups and apply a rule saying 'spread these VMs as evenly as possible amongst these hosts' - but beggars can't be choosers etc.

So the way I've done it, and this might sound crude but it works and is easy to maintain, was to create a host group called something like 'evens' and another called 'odds' I can then fill these host groups out with hosts that live in racks that are even or odd numbered. For instance all hosts in rack VV041 go into the 'odd's group, whereas hosts in rack 'FF068' go into the 'even's group.

What I then did was do the same for VMs', for instance servers 'web01', 'sql1' & 'app75' go into the 'odds' VM group and 02's, 24's, 98's etc. go into the 'even's group.

After that all you need to do is create two rules, one that says 'odd numbered VMs should live on odd numbered hosts' and vice versa. Expect a vMotion storm if you manually run DRS :)

So that works ok for me, I have a roughly even balance of VMs across hosts and importantly no two-member clusters could ever live in the same enclosure/rack as I'd always name them sequentially (i.e. 01 and 02). Does the job and is easy to manage.

Hope this helps the 0.000002% of IT geeks this addresses :)

share|improve this answer
You can accomplish the rest of what you're trying to do by also setting anti-affinity rules on the numbered hosts, but you can only set anti-affinity on a pair of VMs at a time and this can easily lead to huge rulesets if you have a large number of VMs that you're trying to keep apart from one another. – jgoldschrafe Nov 4 '10 at 14:44
Yeah, this becomes an N+1 problem though as we often have 20-40 member clusters spread across 40-60 hosts in 8-10 enclosures or racks. We'd need to keep a spreadheet just to plan the rules :) – Chopper3 Nov 4 '10 at 14:47

Wouldn't creating a separate VMWare cluster for each enclosure do the job? I think DRS works on a per-cluster basis.

share|improve this answer
that's what I mentioned ("I could do it by only having one cluster member per enclosure") but that means my cluster sizes would be forced to be needlessly small. – Chopper3 Aug 7 '09 at 9:04
That's about the only way to do it. VMWare only sees the blades. You have to artificially inject the idea of an enclosure, and cluster per enclosure is pretty much the way to go. – Zypher Aug 20 '09 at 15:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.