6.5

Table Of Contents
iSCSI Storage Setup with ESXCLI
You can set up iSCSI storage by using commands in the esxcli iscsi namespace.
You can also set up iSCSI storage by using the vSphere Web Client or vicfg-iscsi commands. See “iSCSI
Storage Setup with vicfg-iscsi,” on page 84.
Set Up Software iSCSI with ESXCLI
Software 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>.
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.
n
Verify that you are familiar with iSCSI parameters. See “Listing and Seing iSCSI Parameters,” on
page 90.
Procedure
1 Enable software iSCSI.
esxcli <conn_options> iscsi software set --enabled=true
2 Check whether a network portal, that is, a bound port, exists for iSCSI trac.
esxcli <conn_options> iscsi adapter list
3 If no adapter exists, add one.
Software iSCSI does not require port binding, but requires that at least one VMkernel NIC is available
and can be used as an iSCSI NIC. You can name the adapter as you add it.
esxcli <conn_options> iscsi networkportal add -n <portal_name> -A <vmhba>
4 (Optional) Check the status.
esxcli <conn_options> iscsi software get
The system prints true if software iSCSI is enabled, or false if it is not enabled.
5 (Optional) Set the iSCSI name and alias.
esxcli <conn_options> iscsi adapter set --adapter=<iscsi adapter> --name=<name>
esxcli <conn_options> iscsi adapter set --adapter=<iscsi adapter> --alias=<alias>
vSphere Command-Line Interface Concepts and Examples
78 VMware, Inc.