VMware vSphere

 View Only
  • 1.  Default cluster affinity rule

    Posted Jan 18, 2018 11:39 AM

    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



  • 2.  RE: Default cluster affinity rule

    Posted Jan 18, 2018 11:44 AM

    Could you Please confirm your Vcenter and esxi host version ?

    Regards,

    Randhir



  • 3.  RE: Default cluster affinity rule

    Posted Jan 18, 2018 11:49 AM

    Oops, sorry. I've edited the post.

    vCenter 6.0 U3d

    ESXi 6.0U3



  • 4.  RE: Default cluster affinity rule

    Broadcom Employee
    Posted Jan 18, 2018 12:52 PM

    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

    Manage your VMware Metro Storage Cluster with tags



  • 5.  RE: Default cluster affinity rule

    Posted Jan 18, 2018 12:54 PM

    Okay, thanks! I thought the script might be the answer, but didn't want to complicate it too much by using scripts.



  • 6.  RE: Default cluster affinity rule

    Broadcom Employee
    Posted Jan 18, 2018 01:33 PM

    I understand, I have put in a feature request to make this easier. But that of course will take time.



  • 7.  RE: Default cluster affinity rule

    Posted Jan 18, 2018 02:32 PM

    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



  • 8.  RE: Default cluster affinity rule

    Posted Jan 19, 2018 05:14 AM

    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.



  • 9.  RE: Default cluster affinity rule

    Posted Jan 19, 2018 11:51 AM

    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!!