If you want your iSCSI storage that is connected to your ESXi hosts to be highly available you will need to configure multipathing. With multipathing if one network component such as a switch, cable, or network adapter fails the traffic is redirected to another path. Besides path failover, multipathing provides load balancing, meaning it will distribute I/O loads across multiple physical paths. Don’t be scared about this, in vSphere 5 configuring multipathing on iSCSI it’s easy and you can do it trough the GUI. It can be done in two ways, creating a virtual switch for every network connection, or using a single virtual switch; I’m going to show you both in this guide. Just as a reminder before we start; you can’t have multiple network adapters bind to a port group used for iSCSI. If you do, you will not be able to see the iSCSI port group in the iSCSI Initiator.
For this lab I have an ESXi host with multiple network adapters, and two of them are used for iSCSI. I’m not going to talk about how to create a new network or configure the iSCSI Initiator because I have a guide just for that in here. You need to create an iSCSI network for both of your network adapters, meaning you will have two virtual switches for iSCSI. When your done you should have something similar.
Now go to the Storage Adapters section and open the properties of your ISCSI adapter. On the Network Configuration tab click the Add button.
As you can see we have two VMkernel adapters to use for the iSCSI adapter. Add both of them to the iSCSI network and click OK when you’re done.
All you have to do next is put your iSCSI target name or IP in the Dynamic Discovery section, rescan the adapter and add the storage for use.
If you now disconnect one of the iSCSI network adapters the traffic should be redirected trough the other one. In my tests the VMs were in the freeze state for about 10 seconds until the path failover took place.
Virtual machine I/O might be delayed for up to sixty seconds while path failover takes place. These delays allow the SAN to stabilize its configuration after topology changes. In general, the I/O delays might be longer on active-passive arrays and shorter on activate-active arrays.
Taken from the VMware iSCSI SAN configuration guide
Another way to configure iSCSI Multipathing is using a single virtual switch. So here I have my port group on a single vSwitch bind on two network adapters.
If you try to add this vKernel adapter to be used for iSCSI the port group list will be empty, well except for the management port group. This happens because the vSphere iSCSI supports only one connection per iSCSI initiator, regardless of how many NICs you have attached to your virtual switch (vSwitch). I told you this in the beginning of the article.
To manage this we will need to create another port group attached to this vSwitch. Open the properties of the vSwitch and click the Add button.
Select VMkernel and continue.
Give the port group a name and click Next.
Configure the IP address of this VMkernel then continue the wizard. The IP should be in the same subnet that your iSCSI target is.
On the Summary screen click Finish.
On the vSwitch properties you should have two port groups in the Ports list.
Don’t close the vSwitch properties yet because some configurations are to be done here. We need to override the vSwitch failover order so only one network adapter is used per port group. For that select one of the port groups in the list and click the Edit button. Go to the NIC Teaming tab and check the box Override switch failover order.
From the adapters list, select the one you don’t want to use for this port group and move it in the Unused Adapters section. It can be done by selecting the adapter and clicking the Move Down button from the right. In my case vmnic2 will not be used for this port group. Click OK when you’re done.
Repeat this operation for the other port group, but this time the unused network adapter should not be the same as the previous port group. In this case vmnic1 will not be used for this port group.
If you go to the iSCSI Network Configuration to bind the available port groups to be used of the iSCSI connection, the list will be populated with the port groups we just created and configured. They appeared in the list because only one network adapter is configured per port group.
By rescanning the adapter all the target devices should be displayed in the Details section. Make the storage available to your VMs and test the failover.
Want content like this delivered right to your