Software iSCSI load balancing in ESXi 5

December 3, 2012 1 By Eric Shanks

When you team NICs together in ESXi 5 you can pick from a variety of load balancing techniques to determine how traffic should flow over the adapters.  You might think that setting up software iSCSI initiators in ESXi would be done in a similar manner.  Add a VMkernel to a vSwitch, add a couple of adapters and set a teamingfailover policy.  It turns out that this is not the case.  You could setup a software iSCSI initiator this way, but it won’t provide you the teaming or failover you’ve intended.

When the software iSCSI initiator does a discovery it will use the first adapter it finds.  Once it’s discovered a storage array, it continues to use this adapter for all traffic.  If you want to have any load balancing, you’ll need to setup some port  bindings.

The first thing to do is setup your vSwitch with a pair (or more) of network adapters.   Next, you have to create not one VMkernel but two.  Once done, it should look something similar to the picture below.  I’m using a distributed switch so your setup might look slightly different.


Next we need to modify the uplinks for each VMkernel port group.  You must have one and only one active uplink for each iSCSI port group.  I tend to leave my teaming policy alone on the storage vSwitch so I can use it for NFS or something else and still have standard failover, but you must override the failover settings for each of the iSCSI adapters.


Notice that for the Active Uplinks I only have dvUplink1.  The same thing needs to be done to the second VMkernel port group only this time it should have the Active Uplink set to dvUplink2 instead.

Once you’ve set your uplinks the next step is to bind the software iSCSI initiator to a port group.  Right click on the Software iSCSI initiator and choose properties.  GO into the Network Configuration Tab and click the Add… button.


You can then select the port group to bind too.  If you’ve setup the teaming incorrectly, you won’t be able to do this successfully.


Rescan the adapters and you’re ready to roll.