VMware Cloud Community
LPLAdmin
Enthusiast
Enthusiast

VM-VM Affinity Rule vSphere 6.7

Anyone have a script to create VM-VM Affinity Rule or Anti-Affinity Rule with a known group of VM's?  Simple one liner would be great.

Thanks,

Reply
0 Kudos
3 Replies
LPLAdmin
Enthusiast
Enthusiast

New-DrsRule -Name 'GroupName' -Cluster ClusterName -KeepTogether $true -VM VM1, VM2

Reply
0 Kudos
LucD
Leadership
Leadership

I guess you answered your own question, or is there something still open?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
LPLAdmin
Enthusiast
Enthusiast

Sorry Luc.  Got busy.  Yeah,  I had the script already and didn't know at the time.   Thanks for responding!

Reply
0 Kudos