Hi All,
I'm looking for a way to automatically assign a VM to a VM/Host rule. My thoughts was to use powercli and create a script that adds the VM by the tag, however i'm looking for a more automated method. Possibly a spec file or another way.
Background:
10 Host within a cluster, 5 of the host live in our DR site and the other 5 within Prodcution. This is setup as a VMware metro cluster for failover reasons. Therefore when we build a vm, the vm will need to have an affinity rule to keep them on the Prod hosts. I'm trying to figure out a way to automate this.
thanks!
Yes this is possible, we have multiple customers who actually use TAGS and PowerCLI to automate the affinity groups membership, and example can be found here:
https://rudimartinsen.com/2017/09/08/automating-drs-groups-with-powercli/
In German, but you will probably understand what they are referring to:
https://mycloudrevolution.com/de/2017/04/19/drs-affinity-rules-by-tag/
You could also use the Custrom Attributes for this in the same fashion. Tags is a lot easier though.