Binding iSCSI Port Names to VMware Software iSCSI Initiator – ESXi 4.1


For my notes, I’m sharing what I’ve found searching the ‘net to bind VMkernel NICs to VMware’s built-in iSCSI software initiator in ESXi 4.1 I know ESXi 5.0 has changed this process to a nice GUI, but we’re stuck with the CLI in 4.1.

If you’re configuring jumbo frames as I’ve shown in a previous post, bind the VMkernel NICs after configuring jumbo frames.

Assuming you have two uplinks for iSCSI traffic, on the vSwitch of your iSCSI port group, set one uplink, temporarily, to unused. You’ll also want to note the vmhba# of the software iSCSI adapter. You can view this from the Configuration tab > Storage Adapters and viewing the iSCSI Software Adapter. You’ll also need to note the VMkernel NIC names of each iSCSI port group. You can view these from the Configuration tab > Networking and looking at the iSCSI port group. It will show the iSCSI port group name, the vmk#, IP address, and VLAN if you have one configured. Then from a CLI, either via the console or SSH, execute the following commands for each iSCSI port name:

Example: esxcli swiscsi nic add -n vmk# -d vmhba#

where vmk# is the VMkernel NIC name of your iSCSI port group and vmhba# references your software iSCSI initiator. If you’re configuring multiple iSCSI port groups, for instance to use multi-pathing and redundancy, you’ll want to run this command once for each VMkernel NIC.

You can view which VMkernel NICs are bound to the software iSCSI initiator with the following command:

esxcli swiscsi nic list -d vmhba#

If you’re running these commands from the console, you can pipe the esxcli command above to ‘more’ so you can see all the output, for example:

esxcli swiscsi nic list -d vmbha# | more

If you want to remove or unbind a VMkernel NIC from the software iSCSI initiator, use the following command:

esxcli swiscsi nic remove -n vmk# -d vmhba#

After binding the ports and verifying, you can return the second vmnic to an Active state and rescan your software iSCSI adapter.

Google

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s