We have ESXi hosts in the same vCenter cluster, but physically they're in different datacenters. Is it possible to have a default VM-Host Affinity rule to point all VMs without rules to specific ESXi hosts? I know I can make a rule and set all existing VMs to these hosts, but can I do this on a default basis so that I don't need to change this everytime another VM is created?
Basically, one datacenter has a better situation with power outages than the other one. So I want to have all VMs in one datacenter, yet have ability to failover to the other in case of emergency.
vCenter 6.0 U3d
ESXi 6.0U3
Could you Please confirm your Vcenter and esxi host version ?
Regards,
Randhir
Oops, sorry. I've edited the post.
vCenter 6.0 U3d
ESXi 6.0U3
No, you can't do that. But you could use tags and automate the creation of rules using PowerCLI. There are many examples of how to do that to be found through google, one of which is below. Not exactly what you need, but it gives an idea of what is possible
Okay, thanks! I thought the script might be the answer, but didn't want to complicate it too much by using scripts.
I understand, I have put in a feature request to make this easier. But that of course will take time.
have you a datastore sharing with both site?
If you have that, yes you can set the afiinity rules between host, and you can create goups of VMs must to go for the recovery host
Regars
I know I can manually create groups of VMs, but I want cluster to have a default rule for everyone to go to specific hosts without adding every new VM to that rule.
You could create a script for check what VM is or not in the group, in case of not the same script can add it at the group.
And this script can scheduled for run 1 time for week or for month, like as you wish!!
regard!!