Last week I was studying for the VCAP5-DCA exam and I came across an advanced DRS setting, I just can’t seem to wrap my head around: ForceAffinePoweron. I’m hoping one of our readers (yes, that’s you) can help me understand.
VMware recommends you configure this option when you are using Microsoft Cluster Service (MSCS) in combination with DRS.
To ensure that affinity and anti-affinity rules are strictly applied, set an advanced option for vSphere DRS. Setting the advanced option ForceAffinePoweron to 1 will enable strict enforcement of the affinity and anti-affinity rules that you created.
I’ve been reading some articles on ForceAffinePoweron, some people wrongfully assume the setting is used by HA, this is not the case.
Pré vSphere 5.5, HA does not respect any VM to VM (anti-)affinity rules, as explained by Frank Denneman in this post.
vSphere 5.5 introduced the das.respectVmVmAntiAffinityRules option, which enables VM to VM anti-affinity awareness, more info in this post by Duncan Epping.
Another advance DRS setting introduced with vSphere 5.5 is DropSoftVmHostRulesOverutilized. This setting will turn a soft rule into a semi-hard rule, which means the rule will only be broken by ’emergency’ actions like putting a host in maintenance mode. The rule will not be broken for DRS resource optimization. The setting is explained in this VMworld 2013 video: Performance and Capacity Management of DRS Clusters.
The name ForceAffinePoweron suggests it applies to power on actions by DRS. As far is I know there’s no difference in the way DRS handles (anti-)affinity rules on initial placement versus migrations after power on. I’ve never seen situations in which a DRS must rule wasn’t strictly applied.
So my question remains, what is ForceAffinePoweron exactly used for and what scenario’s would benefit from this setting?