VMware vSphere

 View Only
  • 1.  How to keep a VM on a different Host from another VM for load balancing

    Posted Jan 24, 2012 03:36 PM

    I have two VMs (servers) that I'm using for application load balancing and I don't want either server/VM  to end up on the same host at anytime.   Load balancing DRS is being used in our vSphere environment.  what is the best way to set this up?



  • 2.  RE: How to keep a VM on a different Host from another VM for load balancing

    Posted Jan 24, 2012 03:38 PM

    Withing DRS you can affinity and anti-affinity rules - affinity will keep VMs on the same host and Anti-affinity will keep the VMs on seperate hosts - 



  • 3.  RE: How to keep a VM on a different Host from another VM for load balancing

    Posted Jan 24, 2012 03:56 PM

    Hi,

    You can always specify as below if the VM's are in VMware cluster so that Vm's will stick on to the preffered host

    Cluster

    Edit Settings-- DRS Groups Manager

    Host DRS Groups

    • Primary Hosts
    • Secondary Hosts

    and then 

    Vitual machines DRS Groups

    • Primary VM's 
    • Secondary VM's

    You may also setup some alarms when vm's migrate...

    Hope this info helps.

    Regards

    SA



  • 4.  RE: How to keep a VM on a different Host from another VM for load balancing

    Posted Jan 27, 2012 01:57 PM

    Weinstein5, I think your suggestions separate just the Datastores unless I read the article wrong?

    Sa2057, Is your suggestion the best way for hosts?  Let me know what you think as I'm only concerned with keeping them off of the same ESXi hosts for now.

    Thanks again for all of your help.

    See attached screenshot as my coworker set it up with rules in DRS..  Perhaps this is what you are both explaining to me?



  • 5.  RE: How to keep a VM on a different Host from another VM for load balancing

    Posted Jan 27, 2012 02:02 PM

    The rule you created, as suggested by weinstein5, will get you the desired results



  • 6.  RE: How to keep a VM on a different Host from another VM for load balancing

    Posted Jan 27, 2012 02:13 PM

    Hi Troy

    >>  The rule you created, as suggested by weinstein5, will get you the desired results.

    Okay, I haven't seen the actual rule that my coworker created I just saw where per screenshot.  So it was most likely the one Weinstein5 suggested; cool.

    Thanks and I will credit Weinstein5 the points and Helpfull answer on the other one.



  • 7.  RE: How to keep a VM on a different Host from another VM for load balancing
    Best Answer

    Posted Jan 27, 2012 02:14 PM

    Yes that is what I was talking about -

    You can control the placement of virtual machines on hosts within a cluster by using affinity rules.

    You can create two types of rules.

    VM-HOST Affinity - Used to specify affinity or anti-affinity between a group of virtual machines and a group of hosts. An affinity rule specifies that the members of a selected virtual machine DRS group can or must run on the members of a specific host DRS group. An anti-affinity rule specifies that the members of a selected virtual machine DRS group cannot run on the members of a specific host DRS group.

    VM-VM Affinity - Used to specify affinity or anti-affinity between individual virtual machines. A rule specifying affinity  auses DRS to try to keep the specified virtual machines together on the same host, for example, for performance reasons. With an anti-affinity rule, DRS tries to keep the specified virtual machines apart, for example, so that when a problem occurs with one host, you do not lose both virtual machines.

    Ceck out the Resource Management Guide - http://pubs.vmware.com/vsphere-50/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-50-resource-management-guide.pdf Page 75  for more information -



  • 8.  RE: How to keep a VM on a different Host from another VM for load balancing

    Posted Jan 27, 2012 08:17 PM

    Hi  weinstein5, Great thanks a lot.

    Thank you all as well!!



  • 9.  RE: How to keep a VM on a different Host from another VM for load balancing

    Posted Jan 27, 2012 08:18 PM

    PS.. I hope I awarded the points correctly!