Hey all,
Is there a way to invert group membership when making a DRS vm-host affinity rule? Basically, I'd like to have DRS function as normal in the cluster EXCEPT for a penalty box group of hosts, where only certain VMs are ALLOWED to reside (but aren't required to). I don't want to force things there, and I don't want to manually create a group of excluded VMs ("Group of Not X" cannot reside on "Penalty Box") because its highly unlikely it would be properly maintained.
Ideally, I make a group of VMs "X" and create an affinity rule "If NOT X, cannot run on hosts "Penalty Box".
Is this possible?
I'm working with vSphere 6.5 running off a Windows Server instance
Thanks!
You can create a VM group which contains all the VMs which shouldn't run on those hosts. Create a host group for those hosts and then create VM-to-host rule which says "must not run on".
That is the only option you have right now...
You can create a VM group which contains all the VMs which shouldn't run on those hosts. Create a host group for those hosts and then create VM-to-host rule which says "must not run on".
That is the only option you have right now...
Thanks, depping
That's what I assumed but was hoping there was someone had a workaround.
As a follow up, is it possible to set default group membership for newly created/cloned VMs? If all new stuff winds up in the "must not run" group until I manually modify their membership that would work too.
No you can't do this, but you could script this. I have seen scripts in the past where group membership was based on the tags used. I work for VMware, and I have provided this feedback to the DRS team who owns these constructs, hopefully they can fix it in the future.
After your comment, I poked around a bit and found this:
Spotlight on the New DRS Groups and VM-Host Rule Cmdlets! - VMware PowerCLI Blog - VMware Blogs
In theory, if I do the "Critical OFF Penalty Box" setup while running daily queries for VMs not in either group (meaning that I don't know them), then automatically pushing everything I find into "critical", I'm all set. That allows me to manually white-list non-critical VMs without risking someone adding something critical I don't know about.
I set the other response as the answer to the question, but it looks like "SCRIPT IT!" is the answer to the problem... Thanks for both!