6.5

Table Of Contents
6 (Optional) Set the authentication information for mutual CHAP by running esxcli iscsi adapter auth
chap set again with --direction set to mutual and a dierent authentication user name and secret.
Option Command
Adapter-level CHAP
esxcli iscsi adapter auth chap set --direction=mutual --
mchap_username=<name2> --mchap_password=<pwd2> --
level=[prohibited required] --secret=<string2> --
adapter=<vmhba>
Discovery-level CHAP
esxcli iscsi adapter discovery sendtarget auth chap set --
direction=mutual --mchap_username=<name2> --
mchap_password=<pwd2> --level=[prohibited, required] --
secret=<string2> --adapter=<vmhba> --
address=<sendtarget_address>
Target-level CHAP
esxcli iscsi adapter target portal auth chap set --
direction=mutual --mchap_username=<nam2e> --
mchap_password=<pwd2> --level=[prohibited required] --
secret=<string2> --adapter=<vmhba> --name=<iscsi_iqn_name>
I You are responsible for making sure that CHAP is set before you set mutual CHAP, and
for using compatible levels for CHAP and mutual CHAP.
7 (Optional) Set iSCSI parameters.
Option Command
Adapter-level CHAP
esxcli iscsi adapter param set --adapter=<vmhba> --
key=<key> --value=<value>
Discovery-level CHAP
esxcli iscsi adapter discovery sendtarget param set --
adapter=<vmhba> --key=<key> --value=<value> --
address=<sendtarget_address>
Target-level CHAP
esxcli iscsi adapter target portal param set --
adapter=<vmhba> --key=<key> --value=<value> --
address=<address> --name=<iqn.name>
8 After setup is complete, perform rediscovery and rescan all storage devices.
The following example performs the rediscovery and rescan operations.
esxcli <conn_options> iscsi adapter discovery rediscover
esxcli <conn_options> storage core adapter rescan --adapter=vmhba36
9 (Optional) If you want to make additional iSCSI login parameter changes, you must log out of the
corresponding iSCSI session and log back in.
a Run esxcli iscsi session remove to log out.
b Run esxcli iscsi session add or rescan the adapter to add the session back.
Set Up Independent Hardware iSCSI with ESXCLI
With independent hardware-based iSCSI storage, you use a specialized third-party adapter capable of
accessing iSCSI storage over TCP/IP. This iSCSI initiator handles all iSCSI and network processing and
management for your ESXi system.
You must install and congure the independent hardware iSCSI adapter for your host before you can access
the iSCSI storage device. For installation information, see vendor documentation.
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 run esxcli iscsi
--help in the console. Specify one of the options listed in “Connection Options for vCLI Host Management
Commands,” on page 19 in place of <conn_options>.
vSphere Command-Line Interface Concepts and Examples
82 VMware, Inc.