I have a requirement to group all Red Hat VMs in my environment together and pin them to specific hosts within cluster. I was planning on using VM-to-Host DRS affinity rules, but I noticed that when creating the VM group, I only have the ability to filter by name. I was wondering if there is any way to create DRS groups using Tags, or alternatively by filtering based on OS-type.
There is no option to filtered with OS type. You have to select the respective VMs and added to the group.
Moderator: Moved to vSphere Discussions
As it's been stated there is no option to create a VM-Host affinity rule based on OS.
You can do it by the following:
- Create tags for redhat vms --> then create rules based on tags
- Review your VM naming scheme to be descriptive (such as rh for redhat win for windows, etc) and create rules based on naming scheme.
If you have vRealize automation tags can be created at provisioning.
Hi there. Unfortunately there is no way to manage DRS rules by tag yet. But don't worry, I found an article with almost the same issue (It's written in german but chrome translator will do the job) https://mycloudrevolution.com/de/2017/04/19/drs-affinity-rules-by-tag/.I think PowerCLI is the way to go.
If you have vROps, then you can achive this with the "Business Intent Tag-Based VM placement" feature:
https://docs.vmware.com/en/vRealize-Operations-Manager/7.0/com.vmware.vcom.core.doc/GUID-1A585BE5-86...
Also, you can schedule the PowerCLI script execution using vRO (Which is free) or Cron jobs for linux, or scheduled tasks in windows