VMware Cloud Community
sergihire
Enthusiast
Enthusiast

Separate virtual machines DRS rule.

Guys,

I have 2 VMs (Domain controllers) and I would like to separate these VMs between hosts in a cluster. I have created DRS rule with a "Separate Virtual Machines" policy. But I can migrate these VMs to the single host using vMotion.

How to protect VMs against migration to a single host? I would like that DRS still working for these VMs.

0 Kudos
11 Replies
BenLiebowitz
Expert
Expert

I have a stupid question, but is the check mark checked next to the DRS rule to activate it? 

Ben Liebowitz, VCP vExpert 2015, 2016, & 2017 If you found my post helpful, please mark it as helpful or answered to award points.
0 Kudos
Sateesh_vCloud

Can you share the screenshot of current DRS rule config?

------------------------------------------------------------------------- Follow me @ www.vmwareguruz.com Please consider marking this answer "correct" or "helpful" if you found it useful T. Sateesh VCIX-NV, VCAP 5-DCA/DCD,VCP 6-NV,VCP 5 DCV/Cloud/DT, ZCP IBM India Pvt. Ltd
0 Kudos
a_p_
Leadership
Leadership

Which vCenter version do you use? Please take a look at vSphere 5.5 nuggets: High Availability Enhancement to see whether this helps.

André

0 Kudos
sergihire
Enthusiast
Enthusiast

Guys, thank you for your answers.

So...

Yes, this rule is enabled.

Screenshot was attached.

0 Kudos
sergihire
Enthusiast
Enthusiast

Andre, I use 5.5 version.

Duncan's post says that we should to enable this feature for HA (and yes, this feature is enabled in the infrastructure), but it is not affected DRS rules or vMotion.

0 Kudos
BenLiebowitz
Expert
Expert

Is DRS set to fully automated?  Is Admission Control Enabled? 

Ben Liebowitz, VCP vExpert 2015, 2016, & 2017 If you found my post helpful, please mark it as helpful or answered to award points.
0 Kudos
sergihire
Enthusiast
Enthusiast

Admission Control is enabled.

DRS is set to manual.

I can set to fully automated policy, and DRS will migrate domain controller to another host (In case if two VMs are placed on a single host).

But if I use vMotion I don't get any notification about "separate VM" policy, and I can place two VMs on a single host.

0 Kudos
vThinkBeyondVM
VMware Employee
VMware Employee

VM VM anti affinity rule is soft rule. User initiated operation can violate this rule. Also if it is absolutely required, DRS also may violate this rule for balancing the cluster. However, in both cases, DRS will make best efforts to correct the violation in the next DRS invocation. Vm-Host hard rules are mandatory, mandatory rules even does not allow manual vMotion which violates the rule. HA also will honor the rule.

VM VM anti affinity rule can be made HA aware by using advanced option (Duncan's blog talk about that)


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

BenLiebowitz
Expert
Expert

You won't get a warning about the Anti-Affinity rule.  If you vMotion one of the VMs to that host, DRS will vMotion the other one off.  If DRS is set to manual, It will allow both to live together. 

You need to have DRS set to Automated for it to do what you want. 

Ben Liebowitz, VCP vExpert 2015, 2016, & 2017 If you found my post helpful, please mark it as helpful or answered to award points.
sergihire
Enthusiast
Enthusiast

Thank you, Guys. I get it.

I will think how to change my DRS policies.

0 Kudos
MSA021
Contributor
Contributor

Go to cluster configuration tab VM/Host Rules  and set new rule for separate or together machines.

0 Kudos