A long time ago I authored this white paper around stretched clusters. During out testing the one thing where we felt HA was lacking was the fact that it would not respect VM-Host should rules. So if you had these configured in a cluster and a host would fail then VMs could be restarted on ANY given host in the cluster. The first time that DRS would then run it would move the VMs back to where they belong according to the configured VM-Host should rules.
I guess one of the reasons for this was the fact that originally the affinity and anti-affinity rules were designed to be DRS rules. Over time I guess we realized that these are not DRS rules but rather Cluster rules. Based on the findings we did when authoring the white paper we filed a bunch of feature requests and one of them just made vSphere 6.0. As of vSphere 6.0 it is possible to have vSphere HA respecting VM-Host should rules through the use of an advanced setting called “das.respectVmHostSoftAffinityRules”.
When “das.respectVmHostSoftAffinityRules” is configured then vSphere HA will try to respect the rule when it can. So if there are any hosts in the cluster which belong to the same VM-Host group then HA will restart the respective VM on that host. Of course as this is a “should rule” HA has the ability to ignore the rule when needed. You can imagine that there could be a scenario where none of the hosts in the VM-Host should rule is available, in that case HA will restart the VM on any other host in the cluster. Useful? Yes, I think so!
ذیشان شانی says
very nice post thanks
WOuld these type of rules not be better off in the vAPP with cross vCenter vMotion these rules will be lost should VM’s be moved to a new vCenter. To me it makes sense that all configuration be on the VM’s and clusters be left as disposable resources that require as little touch as possible.
LETREULLE Philippe says
Thank you Duncan
the advanced setting called “das.respectVmHostSoftAffinityRules” is not present in the availability guide, I think that now it has been replaced by the web gui parm HA should respect VM to Host affinity rules during failover .
Duncan Epping says
The fact that it isn’t in the guide, doesn’t mean it doesn’t exist anymore 🙂
Does it works with VM-Host must rules? It would be usefull for licensing issue.
Bill Ho says
Just wanna ask if VM-VM affinity or anti affinity would be regarded in any version of vSphere HA?