6.5

Table Of Contents
Hardware iSCSI setup requires a number of high-level tasks. You should be familiar with the corresponding
command for each task. You can refer to the relevant documentation for each command or the manpage
(Linux). Specify one of the options listed in “Connection Options for vCLI Host Management Commands,”
on page 19 in place of <conn_options>.
Prerequisites
n
Verify that you are familiar with iSCSI authentication. See “Enabling iSCSI Authentication,” on
page 94.
n
Verify that you are familiar with CHAP. See “Seing iSCSI CHAP,” on page 72.
Procedure
1 Determine the HBA type and retrieve the HBA ID.
vicfg-iscsi <conn_options> --adapter --list
2 Congure the hardware initiator (HBA) by running vicfg-iscsi -N with one or more of the following
options.
n
--list – List network properties.
n
--ip <ip_addr> – Set HBA IPv4 address.
n
--subnetmask <subnet_mask> – Set HBA network mask.
n
--gateway <default_gateway> – Set HBA gateway.
n
--set ARP=true|false – Enable or disable ARP redirect.
You can also set the HBA IPv4 address and network mask and gateway in one command.
vicfg-iscsi <conn_options> --ip <ip_addr> --subnetmask <subnet_mask> --gateway
<default_gateway>
3 (Optional) Set the iSCSI name and alias.
vicfg-iscsi <conn_options> -I -n <iscsi_name> <adapter_name>
vicfg-iscsi <conn_options> --iscsiname - -name <iscsi_name> <adapter_name>
vicfg-iscsi <conn_options> -I -a <alias_name> <adapter_name>
vicfg-iscsi <conn_options> --iscsiname --alias <alias_name> <adapter_name>
4 Add a dynamic discovery address or a static discovery address.
n
With dynamic discovery, all storage targets associated with a host name or IP address are
discovered. You can run the following command.
vicfg-iscsi <conn_options> --discovery --add --ip <ip_addr | domain_name> <adapter_name>
n
With static discovery, you must specify the host name or IP address and the iSCSI name of the
storage target. You can run the following command.
vicfg-iscsi <conn_options> --static --add --ip <ip_addr | domain_name> --name
<iscsi_name> <adapter_name>
When you later remove a discovery address, it might still be displayed as the parent of a static target.
You can add the discovery address and rescan to display the correct parent for the static targets.
5 Set the authentication information for CHAP.
vicfg-iscsi <conn_options> -A -c <level> -m <auth_method> -u <auth_u_name> -w <chap_password>
[-i <stor_ip_addr|stor_hostname> [:<portnum>] [-n <iscsi_name]] <adapter_name>
vicfg-iscsi <conn_options> - -authentication - -level <level> - -method <auth_method>
--chap_username <auth_u_name> --chap_password <chap_password>
[--ip <stor_ip_addr|stor_hostname> [:<portnum>] [-name <iscsi_name]]
<adapter_name>
vSphere Command-Line Interface Concepts and Examples
88 VMware, Inc.