Paginas

18 May 2021

VMware Metro Cluster - DRS Automation with TAGS

 


Hello guys, in this post I will show you a how to use TAGs in VMware to distinguish the Site where the virtual machines are running. In this way,  and using PowerCLI Scripts we are able to allocate the VM to the Host of the respective site with the help of DRS (Distributed Resource Scheduler).
It is possible to make these configurations without using TAGs, but I think that this way it is more flexible, simple and elegant. The only requirement is to have Metro Cluster working properly (it's not in this scope how to configure a vSphere Metro Cluster) and the vSphere Enterprise Plus license on every Host.

This is very useful if you have a Metro Cluster, and you want that VMs that are on Site 1 Storage to run on the Hosts in Site 1 and vice-versa for Site 2. If you don't use this feature, you may end up having VMs on Site 1 Storage running on Site 2 Hosts and vice-versa.

Unfortunately, it's not yet possible to make these settings automatically in the vCenter. (I hope that VMware in future releases will place the option of TAGs directly in the DRS, instead of the name of the VMs). So let's deep dive to the PowerCLI Scripts.