Solved

Load balancing ESX 4 on a dell R610

Posted on 2011-02-14
13
725 Views
Last Modified: 2012-05-11
Hi,
I have a dell server R610 with VMware ESX 4 running on it.
The server has 4 physical ethernet ports.
I am currently only using one of them.
Does ESX have load balancing and if so how do I set it up?

Thank you

Al
0
Comment
Question by:lacroix_al
  • 5
  • 3
  • 2
  • +2
13 Comments
 
LVL 40

Accepted Solution

by:
coolsport00 earned 250 total points
Comment Utility
See this VMware KB for Unicast Mode:
http://kb.vmware.com/kb/1006778
and Multicast Mode:
http://kb.vmware.com/kb/1006558

And from a Poster that wrote a step-by-step on a VMware Community thread (http://communities.vmware.com/message/1459346):
- Rescan all HBAs on all hosts in your cluster.  

- Run "esxcfg-vmhbadevs -q" on every host.  I copy the output to an excel workbook.  I then use Find and Replace to cut out all the text aside from the decimal LUN number.  Once in the sheet, double check that all hosts are seeing the storage they should.

- Run "esxcfg-mpath -l" on every host.  You want to document the the HBA number and target ID.  For example, on one host, I saved "vmhba1:0:##" and "vmhba2:0:##".  Depending on your HBA count, slot location and so forth, your HBA numbers and target IDs can vary.

- For each unique setup (different HBA number or different target ID), the commands will vary.  In the above example, I use this Excel formula "=IF(MOD(A3,2)=0, "esxcfg-mpath --preferred --lun=vmhba1:0:"&A3&" --path=vmhba2:0:"&A3, "")".  A3 refers to the decimal identified of the LUN.  Column A in my Excel sheet has the full list of LUNs available for the server.  As you can see in the formula, I am telling the ESX server to use the 2nd HBA path as the active path.  I drag this formula down the whole sheet so each even numbered LUN has a unique esxcfg-mpath command.

- In that excel sheet, I hide the blanks and copy the list of esxcfg-mpath commands into a .sh file on a shared volume.  From the service console, I create a file like change_paths.sh, paste in the list of esxcfg-mpath commands.

- In the end of that change_paths.sh file, be sure to add a esxcfg-rescan for each vmhba involved so the changes take place right away.

- Run this change_paths.sh on the service console of each ESX server.  You may have anywhere from 1 to n (total number of ESX) scripts depending on the storage setup.  I run the script on 1 ESX, let it completely finish and then run the next.

Hope that helps,
Regards,
~coolsport00
0
 
LVL 22

Assisted Solution

by:Luciano Patrão
Luciano Patrão earned 250 total points
Comment Utility
Hi

Yes you can. Is Network teaming

How to enable.
http://kb.vmware.com/kb/1004088

ESX host requirements for link aggregation
http://kb.vmware.com/kb/1001938

Hope this can help.

Jail
0
 
LVL 40

Expert Comment

by:coolsport00
Comment Utility
Well, Teaming is different than Load Balancing "Jail". Some post for Load Balance yet want "teaming", so I guess we need clarification. Does the poster want Teaming (failover) or Load Balancing?

~coolsport00
0
 
LVL 22

Expert Comment

by:Luciano Patrão
Comment Utility
Hi

@coolsport00 enable both.

Teaming NICs achieves load balance and failover on VMware ESX

Since I do this by script every time and the script enable both.

Here is an example how to:
http://searchvmware.techtarget.com/tip/Teaming-NICs-achieves-load-balance-and-failover-on-VMware-ESX

Jail
0
 

Author Comment

by:lacroix_al
Comment Utility
Thank you all for the post.
I want to use all four nics at the same time (not failover)
in my eyes I see failover as using one nic with backup.

the server currently has five servers running on it. I have four network cards. I guess I could set each server up to use a network card and have two of them share one of the cards.
the issue is if one goes down then that server is out.
if I have all five servers share all four network cards if one card goes down all servers would stay up.

I hope this helps clarify

AL
0
 
LVL 6

Expert Comment

by:Ryan Smith
Comment Utility
I think you need to setup a vm to do it or buy a module from vmware

http://www.linux-vs.org/whatis.html
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 28

Expert Comment

by:bgoering
Comment Utility
Best practice would have you using 2 nics for ESX(i) communication (managment network, vmotion, etc.) and the other two nics for virtual machine communication. However many nics you assign for virtual machine communication set up your team with all active. I recommend ip hash as the load balancing method for most folks.

Good Luck
0
 
LVL 40

Expert Comment

by:coolsport00
Comment Utility
Hi @BestWay - yeah...just needed clarification mostly from the poster. :) Thanks for sharing the techtarget URL. :)

Regards,
~coolsport00
0
 
LVL 22

Expert Comment

by:Luciano Patrão
Comment Utility
Hi

Not many people use scripts. I am a script alcoholic :)

Example how to create vSwitch and enable teaming. I run a script like this as post VMware post installation. If you need to create the same vSwiths, network and the same NICs to add an host to a cluster. I do all this by script(that I have created previously from the existing host configuration)

Example:

Create vSwitch
esxcfg-vswitch -a vSwitch2

Add/link the vmnics to vSwitch
esxcfg-vswitch -L vmnic1 vSwitch2
esxcfg-vswitch -L vmnic2 vSwitch2

Create teaming and load balance for this vSwitch
vmware-vim-cmd hostsvc/net/vswitch_setpolicy --nicorderpolicy-active=vmnic1,vmnic2 --nicteaming-policy=loadbalance_ip vSwitch2
vmware-vim-cmd hostsvc/net/vswitch_setpolicy --securepolicy-promisc=true vSwitch2

Enable Cisco Discovery
esxcfg-vswitch -B both vSwitch2

Create 2 portgroups with different VLANs as an example
esxcfg-vswitch -A "PortGroup01" vSwitch2
esxcfg-vswitch -p "PortGroup01" -v 64 vSwitch2

esxcfg-vswitch -A "PortGroup02" vSwitch2
esxcfg-vswitch -p "PortGroup02" -v 84 vSwitch2

service mgmt-vmware restart

Just an example and a different way to work.

Hope this can help

Jail
0
 
LVL 22

Expert Comment

by:Luciano Patrão
Comment Utility
Hi

Just to add this.

Loadbalancing and Teaming it always depends on the Host Server and how many physical NICs we have to implement this.

If a server have only 4 NICs, some of this configuration you get no advantages, since you do no have many NICs to improve the VMs Network load balancing and Teaming.

But for 8 and 10 NICs is very useful.

Jail
0
 

Author Comment

by:lacroix_al
Comment Utility
WOW! Thank you all for the postings.
You have posted so much info here I am not sure what to do.

let me see if I can make since of this.
I have 4 nics. I use one for management and team the other three for fail over and load balancing.
to do this I need to create a Vswitch and add the nics to the Vswitch.
then setup ip hashing for load ballancing - not sure what this is?

Then I read if I only have 4 nics I will not see any speed improvement.

did I get close?

Al
0
 
LVL 22

Expert Comment

by:Luciano Patrão
Comment Utility
Hi

Well you will have 3 NICs for VMs networking not 4.

But for this you will get load balance, and failover if you want to enabled.

Speed improvement?? Well not quiet, but better communication balance(networking) that is different. And in the end yes better speed(not in the real kbs) but by better load performance.

Hope that this make any since to you :)

Jail
0
 
LVL 28

Expert Comment

by:bgoering
Comment Utility
Pretty much any of the load balancing you can set up will still limit your to gigabit speed for any single connection, however you can have more connections going on at the same time - kind of like having one car going 60 mph on the freeway can carry 4 people, but 3 cars can carry 12, but no one gets there any faster if this makes any sense.

The ip hash method I recommend takes both the source and the destination ip addresses and creates mathematically a "hash" that is in turn used for path selection. That way any host can take any path depending on the destination that it is going to. With a fair set of hosts and destinations this algorithm for path selection results in pretty good load balancing over the available paths.

Hope this helps
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
Teach the user how to edit .vmx files to add advanced configuration options Open vSphere Web Client: Edit Settings for a VM: Choose VM Options -> Advanced: Add Configuration Parameters:
Teach the user how to install and configure the vCenter Orchestrator virtual appliance Open vSphere Web Client: Deploy vCenter Orchestrator virtual appliance OVA file: Verify vCenter Orchestrator virtual appliance boots successfully: Connect to the …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now