VMware vSphere DRS affinity rules for more than 2 guests

I've received a request to add disaffinity/anti-affinity rules on a set of virtual machines in a VMware HA/DRS cluster running VMware vSphere 4.1.

The client has four hosts and wants to keep certain virtual machines from running on the same host in the event of a host failure.

Normally, this type of request is straightforward, where you can simply avoid running app01 and app02 on the same machine... There's an separate application load balancer upstream.

However, this request asks for app01, app02, app03, app04, app05 and app06 to run on different hosts.

Six VM's, four hosts. Our first-response team added app01-app06 into a single "Separate Virtual Machines" DRS rule. This does not seem right because the results could be unpredictable in a maintenance mode or Upgrade Manager remediation.

Something like: enter image description here

What is the impact of doing so with four hosts? Will this achieve the desired goal? Downsides?


Solution 1:

If the 6 VMs are already powered on, then DRS will try to separate them as much as it can. Then it will display a DRS fault that it couldn't fix an anti-affinity rule violation, but will not power any of them off:

enter image description here

If 4 of the 6 are on and running on different hosts, and you try to power on one of the remaining 2, the DRS rule will refuse to power it on and give you this error:

enter image description here

The obvious downside is you won't have all 6 running. It is conceivable that if you had them running before the rule was created then they would stay running, but it is pretty much inevitable that they will be powered off at some point eventually for some reason or another and not able to start up again due to the rule. According to the capture they are off so they wouldn't be able to power all 6 on (actually there are 8 in the rule in the capture so 4 that would remain off).

An alternative solution (untested) would allow all of the VMs to be powered on, but you would still have at least 2 VMs running on 2 of the hosts, not meeting the client's impossible need given the resources:

You could create 2 "Separate VMs" DRS rules putting VMs 1-4 in one and 5-6 in another. This would allow all 6 to be powered on, but losing or powering down a host for maintenance would also mean you could run 5 VMs max, which is still better than the 4 you could run in the original solution even with all hosts operational.