I have a question (or more of a chain of thought) which has been bugging me for sometime and because my demo environment is down I've not had time to rebuild and test it out...... so I thought I'd run it past the people on the community as I always find that there's someone out in the wide world who's already solved this problem....
I am aware that VM-Host affinity rules specifies a relationship between a group of VMs and a group of hosts and that there are 2 types of rule preferences, Must run/not run and Should run/not run.
I've no problems about doing simple rules (ie Prod_VM must run on Prod_hosts).... however, my recent chain of thought was whether you could have 2 rules which are not contradicting running at the same time (I'm aware that if rules contradict, the older will take precedence).
For example:
If I have 2 server rooms with a VMware stretched cluster between the two rooms with some sort of stretched storage (ie HP Lefthand), what I want to do is have a group of VMs run in Room A and a group of VMs run in Room B, but if either room fails then the VMs will be restarted in the remaining room.
What I don't want is for DRS to move VMs from A to B and vice-versa.....
I want to specifically tie a group of VMs to the hosts in Room A and only failover to the hosts in Room B if Room A goes up in smoke......
Will this be possible by creating 2 VM-Host affinity rules?
Room_A VM group will consist of VM_1, VM_2, VM_3, VM_4
Datacenter host group will consist of Host_1, Host_2, Host_3, Host_4
Host_A host group will consist of Host_1 and Host_2 (the other 2 reside in room B)
If I set a rule that says:
Room_A must run on Datacenter- then this should mean all VMs from Room_A should run across all hosts in Room_A and B
Room_A should run on Host_A - this should mean that all VMs from Room_A should 'ideally' run on just the hosts in Host_A
Will this work....... Or am I just over-thinking and confusing myself with regards to affinity rules, and actually would only require 1 rule that says Room_A must run on Host_A because HA is across the cluster and doesn't care about affinity rules so would failover VMs if Room A went down anyways.......?
Regards.....