Everything is possible in PowerCLI
For a simple simulation of affinity/anti-affinity rules, you should do all start/stop of VMs through a script.
In that script you can test on which ESXi a VM can be started, talking into account the rules you would have in a file somewhere.
A tentative start VM logic
- read all rules
- get the VM that needs to be started
- is there a rule that includes this VM
- affinity: check where the affine VM(s) are running -> that will be the target ESXi
- get all available ESXi hosts
- remove the ESXi that have VMs from the anti-affinity rule running
- select an ESXi host from the remaining ones
That should be quite simple to code in PowerCLI.
But remember that this is a very crude simulation fo what HA offers.
Thanks Luc. It's just the migration to other hosts I'm looking at not restarting the VM on it's normally homed host. Don't really have lots of time but I'll have a play with it and see how it goes. Can't do the resource checking either.
I with they'd put DRS on the Standard license.