theHyperAdvisor.com
vSphere4 - iSCSI Configuration Standard
Summary: This document outlines the process for configuring iSCSI in Vmware vSphere 4 and ESX 4 environment. This document assumes that the reader currently understands and knows their way around vCenter 4 using the Vmware viclient. This document also assumes that the user has the appropriate rights to do all the tasks required. This setup with the use of iSCSI is geared more for the HP P4500 SAN appliance but could be used in other environments. The creator of this document is in no way affiliated with Vmware or HP and is not responsible for any adverse affects, performance issues, or downtime that may occur by performing the steps in this document. In other words - "Use at your own risk!" Requirements: • • • • •
vSphere 4 ESX host with 6x nic ports 6x 1gigE nic ports minimum 2x 1gigE network switches multiple ip addresses (one for each nic to be used for iscsi, vmotion, & service console)
Create VMkernel Port Group: 1. 2. 3. 4. 5. 6. 7. 8. 9.
Login to vCenter with the Vmware vSphere client Select the ESX host then click the "Configuration" tab Click the "Networking" section Click "Add Networking" Select "VMkernel" then next Select the appropriate nic ports to be used for iSCSI traffic Name the port group i.e. iSCSI-# or iSCSI-1 then click next Enter the ip address and subnet. Edit the gateway if it needed then click next Click Finish
Standard vSwitch Configuration: The standard configuration should be used for the Virtual and Distributed Switches. The only addition to the current standard when using iSCSI is to create a dedicated standard vSwitch with standard port groups (NOT Distributed
Port Groups) as shown below. A minimum of 2x physical nic ports are required and a minimum of 2x vmkernel port groups are required. The vmkernel port groups should be name iSCSI-x i.e. iSCSI-1 as shown below.
Each vmkernel port group will be configured with a single physical active nic port as shown below. All other nic ports will be set to "unused" by checking the "Override vSwitch failover order", selecting the nic, then clicking the "Move Down" button. There should not be any standby adapters.
From the command line, bind both VMkernel ports to the software iSCSI adapter. The vmkernel# and vmhba## must match the correct numbers for the ESX or ESXi server and virtual switch you are configuring, for example: • esxcli swiscsi nic add -n vmk1 -d vmhba33
• esxcli swiscsi nic add -n vmk2 -d vmhba33 Verify by running this command where both vmk1 and vmk2 should be listed. • esxcli swiscsi nic list -d vmhba33 Once configured correctly, perform a rescan of the iSCSI adapter. An iSCSI session should be connected for each VMkernel bound to the software iSCSI adapter. This gives each iSCSI LUN two iSCSI paths using two separate physical network adapters. To achieve load balancing across the two paths, datastores should be configured with a path selection policy of round robin. This can be done manually for each datastore in the vSphere client or ESX can be configured to automatically choose round robin for all datastores. To make all new datastores automatically use round robin, configure ESX to use it as the default path selection policy from the command line: • • • •
esxcli corestorage claiming unclaim --type location esxcli nmp satp setdefaultpsp --satp VMW_SATP_DEFAULT_AA --psp VMW_PSP_RR esxcli corestorage claimrule load esxcli corestorage claimrule run
The end result should look like this.
It is important to note that native vSphere 4 multi-pathing cannot be used with HP P4000 Multi-Site SAN configurations that utilize more than one subnet and VIP (virtual IP). Multiple paths cannot be routed across those subnets by the ESX/ESXi 4 initiator. Logical Layout:
theHyperAdvisor.com