More DRS group automation

Following up on my last post on Automating DRS Groups with PowerCLI I found that we also need to automatically remove VMs and Hosts from a given DRS Group.

Although I could have included this in the previous script which creates the groups and adds members I wanted to separate them. There could for instance be times when you would like to run such a script on a different interval than the one that adds members as well as other scenarios. I believe it’s also a good practice to build smaller scripts and functions that have more specific tasks. You could argue that the creation script also could be split up into a part that creates groups and a part that adds the members, and even maybe further splitting Hosts from VMs but that would be a future task.

Anyways, the removal of entities like Hosts and VMs from a DRS group is as easy as putting them in.[...] continue reading

Automating DRS groups with PowerCLI

In vCenter we have lot’s of DRS functionalities. I won’t go into all of them here, you’ll probably know about most of them already.

This blog post will talk about the VM/Host affinity functionality, i.e. rules to keep VMs running one or more specific host(s).

There is multiple use-cases for this. You might want to keep some VMs together on the same host to minimize latency, maybe you are doing some port mirroring and so on. In my scenario the use case is keeping some VMs on specific hosts for license compliance. Licensing is a huge topic and are always subject to change so this might not be a use-case in the future.[...] continue reading