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
Hope you tried with web client already?
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.
Alright, updating via powercli didn't work either. Any other ideas.?
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.
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
Tried disabling DRS across all my clusters, and creating new rules from scratch. Same deal though. Thanks for the ideas though.
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
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?
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.
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.