Another guest post from Venkat Krishnamurthy, today's dealing with how to configure port binding for your iSCSI initiators.

Port binding is a method of configuring multipathing with Software/Hardware iSCSI initiators.

A brief outline of the steps involved:

  1. Create a vmkernel port for each physical NIC. If there are n physical NICs, you can create n vSwitches and define vmkernel ports to map each of those physical NICs. Else a single vSwitch can be created and each vmkernel port could be mapped to one active NIC. This step could be easily performed from the vSphere client.
  2. Bind all vmkernel ports to the software initiator. The vSphere CLI will be handy to perform this configuration. The steps are listed below:
    • The iSCSI ports need to be identified. Normally they would look like vmk1, vmk2 etc..
    • Binding the iSCSI port to the software adapter is done using the command:

      esxcli swiscsi nic add -n portname -d vmhbaXX

      portname is the iSCSI port identified earlier ie., vmk1, vmk2 etc

      vmhba is the software iSCSI adapter it has to be bound to. Normally this should be vmhba33, vmhba35 etc

  3. Verify if the binding is configured correctly with the command:

    esxcli swiscsi nic list -d vmhbaXX

  4. Rescan the iSCSI adapter using vSphere client or from the command line

    esxcfg-rescan vmhbaXX

For Hardware initiators:

The command to configure binding is similar except that the vmhba device is an actual hardware device instead of being created at the software level.

esxcli swiscsi nic add -n portname -d vmhbaXX

We also have a video on VMware KB TV which we recommend viewing as well.

Note: some SAN vendors may have some additional configuration changes to be done such as configuring the vmkernel IP’s to be on different subnets (as the iSCSI targets may need to be on different subnets). This will depend on your SAN.