This article assumes that you have done the following tasks:

  1. Preparing ESXi host according to the best practices for your storage vendor
  2. Installing and configuring of storage hardware
  3. Creating iSCSI LUNs and Targets

Setup Virtual Networking on ESXi Server for iSCSI Connection

 

There should be a portgroup and VMkernel for every NIC to be used for iSCSI. The configuration is similar for a standard or distributed vSwitch, the difference being whether you configure on each host or on vCenter. For this example, you will need to set up two portgroups with specific teaming configurations for each NIC. Each portgroup on a dVS, or when setting up a VMkernel on a standard vSwitch, must be setup as follows to support port binding.

For a distributed switch: You first create the portgroups, and then you create a VMkernel and associate it with a specific portgroup.

For a standard switch: You create the VMkernel first, the Portgroup is automatically created, then you go into each VMkernel’s portgroup properties and change the Teaming and failover settings.

When configuring Teaming and failover, you may have to check Override to change the setting different than the default vSwitch. To be able to use port binding, there must be only one NIC active in the VMkernel/portgroup configuration. If there is a NIC on standby, instead of Unused, you will not be able to bind that VMkernel to iSCSI.

1. Open the vSphere Client and proceed to ConfigurationNetworking and click Add Networking.

2. Select VMKernel Network Adapter and click Next.

3.  Select the target device either by choosing the right portgroup within Select an existing network and click Next.

4. Or if you do not have an existing portgroup within your vDS, create a new network switch and select a NIC located on another subnet. Fill in the needed MTU size and click Next.

5. Choose your physical adapters and on the Port properties page, enter your network label (in my case  IP Storage) in the Network label text box and click NEXT.

6. On the IPv4 settings page, configure the IPv4 settings and on the Ready to complete page, click FINISH.

7. You should now have the two VMkernels in which NIC uplink is active and the IP.

Add the iSCSI Software Adapter to an ESXi Host

 

 

1. On the Configure tab under Storage, select Storage Adapters and click Add Software Adapter. The Add Software Adapter window opens.

2. You can see that adapter is now enabled and you can check the iSCSI name under Identifier. Now you can proceed with adding targets from your array. Makes sure to add the iSCSI initiator to your array/LUNs you want to be accessible by the host. We will not go through that process as it is different for each vendor and array.

3. You can add targets either in the Dynamic Discovery or Static Discovery tabs. For this discussion, select Dynamic Discovery and click on +Add.

4. In the Add Send Target Server window, enter IP or FQDN in the iSCSI Server text box and click OK. A warning appears stating that because of recent configuration changes, a rescan of vmhba65 is recommended. Do not rescan yet.

5. In the Storage Adapters pane, click the Network Port Binding tab and click +Add for adding both portgroups.

6. Select the portgroup check box and click OK

7. A warning appears stating that because of recent configuration changes, a rescan of vmhba65 is recommended. Path status can show Not Used.

8. Click Rescan Storage and click OK. The Rescan Storage window scans for new storage devices and new VMFS volumes by default. Monitor the Recent Tasks pane and wait for the rescan tasks to finish.

9. Under the Port Binding you should have Path Status for both portgroups as Active.

10. In the Storage Adapter pane, select the Devices tab. You should be able to see the LUNs.

11. You can check the storage configuration by using the command prompt:

a. Enter esxcli storage vmfs extent list to view the number of VMFS extents that are available to the host.

b. Enter esxcli storage core adapter list to view the SCSI host bus adapters.

c. Enter esxcli storage core path stats get to view the SCSI path statistics.

d. Enter esxcli storage filesystem list to view the boot partitions and the datastores that are available to each host.