VMware vSphere Hypervisor (ESXi) 4.1 -Enabling IP Hash Load Balance from Tech Support Mode.

I had the requirement to setup IP Hash load balancing as I have the network ports setup as follows on my 3750 stack, it is the same for each host.

!
interface Port-channel21
description ESX2
switchport trunk encapsulation dot1q
switchport trunk native vlan 400
switchport trunk allowed vlan 7,65,66,69,400
switchport mode trunk
spanning-tree portfast trunk

!
!
interface Port-channel21
description ESX2
switchport trunk encapsulation dot1q
switchport trunk native vlan 400
switchport trunk allowed vlan 7,65,66,69,400
switchport mode trunk
spanning-tree portfast trunk
!
!
interface GigabitEthernet2/0/11
description ESX2
switchport trunk encapsulation dot1q
switchport trunk native vlan 400
switchport trunk allowed vlan 7,65,66,69,400
switchport mode trunk
channel-group 21 mode on
spanning-tree portfast trunk
!

Basically, in order to access the network , I have to setup IP hash first.

So, first there is a prerequisite; enable Tech Support Mode. See  Using Tech Support Mode in ESXi 4.1 KB  Article: 1017910




I also setup my host to use both of the physical interfaces I want for management,  along with the current vlan tag for them.

Then I log on to the host via console.

# cat /etc/vmware/esx.conf | more


I am looking for /net/vswitch/child[0000]/portgroup/child[0000]/teamPolicy/team = “lb_srcid
&
/net/vswitch/child[0000]/teamPolicy/team = “lb_srcid
I then edit the file with VI. How to use VI

vi

/etc/vmware/esx.conf


I then find 

/net/vswitch/child[0000]/portgroup/child[0000]/teamPolicy/team = “lb_srcid


&

/net/vswitch/child[0000]/teamPolicy/team = “lb_srcidand change

lb_srcid to lb_ip save the file and reboot.



Alternatively, you can do the following command, if you want to do it the easy way, and that isn’t fun, see below.

vim-cmd /hostsvc/net/vswitch_setpolicy –nicteaming-policy=’loadbalance_ip’ vSwitch0

KB Article: 1011520




Roger L.