VMware Cloud Community
bealdrid
Contributor
Contributor
Jump to solution

DRS anti-affinity rules will not stay enabled/ticked

First post, go easy on me:) 

Environment is VCSA 6U3 w/ latest patches, ESXi6.0U3 latest patches as well.  For some reason I have one particular DRS/HA enabled cluster with six hosts that will not accept /enable any of my anti-affinity rules.  Simple things like "Separate these two virtual machines".  As soon as I 'tick' the box for enabled and click OK to get out of the settings I can see the task complete in the task pane ("Update cluster") or whatever, but the problem is the rule does not actually get enabled.  If I go back into the settings it just shows the box for the rule is unchecked again.

Tried completely blowing away all the DRS rules for this cluster; disabling and re-enabling DRS for the cluster, recreating rules but no luck.  Ideas?  Btw, do have support case open but been 4 days now still on first tier support which hasn't been helpful.

Thanks.

Tags (1)
1 Solution

Accepted Solutions
Finikiez
Champion
Champion
Jump to solution

So it might be an issue with entris in VC DB.

If nothig has changed, DRS rules should be stored in VPX_COMPUTE_RESOURCE table.

You need to select everything related to your cluster from DB and have look on this enries.

Or you can try a simple workaround - create a new cluster and move all hosts to this new cluster Smiley Happy

View solution in original post

12 Replies
Mattallford
Hot Shot
Hot Shot
Jump to solution

Hi there,

Interesting one. Which client are you using? Have you tried doing it in the older c# client and the vSphere web client? How about via powershell with Set-DRSRule -Name rulename -Enabled $true

Cheers, Matt.

VCP6-DCV | VCAP6-DCV Deploy @mattallford If you found my answers useful, please help me by marking them as Helpful or Correct!
Reply
0 Kudos
Sateesh_vCloud
Jump to solution

Hope you tried with web client already?

------------------------------------------------------------------------- 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
Reply
0 Kudos
bealdrid
Contributor
Contributor
Jump to solution

Thanks for the replies guys; I have tried with 3 different clients (C# thick client, Web flash-based client, HTML5 Fling).  All do the same behavior.  I haven't tried the powercli thing yet.  Will try that in the morning.

Reply
0 Kudos
bealdrid
Contributor
Contributor
Jump to solution

Alright, updating via powercli didn't work either.  Any other ideas.?

Reply
0 Kudos
bealdrid
Contributor
Contributor
Jump to solution

I checked on my vCSA, and in the /var/log/vmware/vpxd/vpxd*log I can see the following messages being logged at the time I try to apply the rule:

2017-09-20T14:43:25.269Z info vpxd[7FBF04A95700] [Originator@6876 sub=drmLogger opID=59E4E4DB-00000D15-7f] [DrsInvtCluster::ClusterReconfigureDrs] DRS automation level of cluster M630 is fullyAutomated

2017-09-20T14:43:25.271Z info vpxd[7FBF04A95700] [Originator@6876 sub=drmLogger opID=59E4E4DB-00000D15-7f] RuleUuid of rule <rule name> is set to 5253d52f-8dee-901c-df1a-50af0d6b9d63

2017-09-20T14:43:25.271Z info vpxd[7FBF04A95700] [Originator@6876 sub=drmLogger opID=59E4E4DB-00000D15-7f] [DrsInvtCluster::ConflictsWithAntiAffineRule] new anti affinity rule is conflicting with other anti affinity rules

2017-09-20T14:43:25.271Z info vpxd[7FBF04A95700] [Originator@6876 sub=drmLogger opID=59E4E4DB-00000D15-7f] [DrsInvtCluster::PopulateNewRules] Disabling anti affinity rule <rule name> because of conflicts

So it seems there is some orphaned rules left over somewhere, because I have no DRS rules anywhere else that reference those VMs.

Reply
0 Kudos
Sateesh_vCloud
Jump to solution

This may be duplicate information for you but just want to double check the DRS settings:

When two VM-VM affinity rules conflict, the older one takes precedence and the newer rule is disabled. DRS only tries to satisfy enabled rules and disabled rules are ignored. DRS gives higher precedence to preventing violations of anti-affinity rules than violations of affinity rules.

Did you move this VMware cluster from another vCenter server like Windows to VCSA?

Do you want to try to disable DRS and enable it? give a try after that

In worst case - you need to clean the affinity rule entries from vCenter DB via API calls or DB commands

------------------------------------------------------------------------- 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
Reply
0 Kudos
bealdrid
Contributor
Contributor
Jump to solution

Tried disabling DRS across all my clusters, and creating new rules from scratch.  Same deal though.  Thanks for the ideas though. 

Reply
0 Kudos
Finikiez
Champion
Champion
Jump to solution

So it might be an issue with entris in VC DB.

If nothig has changed, DRS rules should be stored in VPX_COMPUTE_RESOURCE table.

You need to select everything related to your cluster from DB and have look on this enries.

Or you can try a simple workaround - create a new cluster and move all hosts to this new cluster Smiley Happy

Sateesh_vCloud
Jump to solution

I agree with the idea of new cluster as you do not find any issues with other configuration.

If you do not want to messup with vCenter DB - you need to think of adding them to new cluster

Also did you perform any upgrade or change of vCenter server before this incident?

------------------------------------------------------------------------- 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
Reply
0 Kudos
bealdrid
Contributor
Contributor
Jump to solution

A new cluster would be an option I could try.  No updates or changes were made prior to me noticing this issue.  I can say however, that the VMs that are referenced by the rules were previously in another cluster.  And in that other cluster they did have DRS rules configured to separate them (which I believe were working).  So I don't know if something is left over there.  I tried moving the VMs back to the original cluster they were in, then checking to see if there were DRS rules for them in that cluster, but didn't see any.  I then vMotion'd them back to the current cluster and tried re-creating the rules, but still no luck.  I'm not too keen on manually screwing with the vPostgres vcenter database on the vCSA; however I did take a backup of it using the python scripts VMWare has provided, and, after searching through it, I have found references to one "orphaned" rule that references two VMs.  I cannot find this rule in any of my DRS clusters in the web client, but VMware still knows about it in the database.  Interestingly I tried to create "separate VM" DRS rules for other VMs that were never referenced by this orphaned rule; and those rules will not "enable" either.  Thanks again for the tips.

Reply
0 Kudos
bealdrid
Contributor
Contributor
Jump to solution

I finally got this solved by moving all the hosts in the original cluster to a newly created cluster.  After moving all the VMs to this cluster I could then create all the DRS rules again from scratch, and they are now staying 'ticked'.  Thanks.

pravinkumar06
Contributor
Contributor
Jump to solution

I'm also facing the same issue. Did we get any other resolution, apart from creating and moving the hosts to New cluster?

Reply
0 Kudos