6.5

Table Of Contents
3 Set up port binding.
a Identify the VMkernel port of the dependent hardware iSCSI adapter.
esxcli <conn_options> iscsi logicalnetworkportal list --adapter=<adapter_name>
b Connect the dependent hardware iSCSI initiator to the iSCSI VMkernel ports by running the
following command for each port.
esxcli <conn_options> iscsi networkportal add --nic=<bound_vmknic> --
adapter=<iscsi_adapter>
c Verify that the ports were added to the dependent hardware iSCSI initiator.
esxcli <conn_options> iscsi physicalnetworkportal list --adapter=<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.
esxcli <conn_options> iscsi adapter discovery sendtarget add --address=<ip/dns[:port]> --
adapter=<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.
esxcli <conn_options> iscsi adapter discovery statictarget add --address=<ip/dns[:port]>
--adapter=<adapter_name> --name=<target_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 (Optional) Set the authentication information for CHAP.
You can set per-target CHAP for static targets, per-adapter CHAP, or apply the command to the
discovery address.
Option Command
Adapter-level CHAP
esxcli iscsi adapter auth chap set --direction=uni --
chap_username=<name> --chap_password=<pwd> --
level=[prohibited, discouraged, preferred, required] --
secret=<string> --adapter=<vmhba>
Discovery-level CHAP
esxcli iscsi adapter discovery sendtarget auth chap set --
direction=uni --chap_username=<name> --chap_password=<pwd>
--level=[prohibited, discouraged, preferred, required] --
secret=<string> --adapter=<vmhba> --
address<sendtarget_address>
Target-level CHAP
esxcli iscsi adapter target portal auth chap set --
direction=uni --chap_username=<name> --chap_password=<pwd>
--level=[prohibited, discouraged, preferred, required] --
secret=<string> --adapter=<vmhba> --name<iscsi_iqn_name>
The following example sets adapter-level CHAP.
esxcli <conn_options> iscsi adapter auth chap set --direction=uni --chap_username=<name> --
chap_password=<pwd> --level=preferred --secret=uni_secret --adapter=vmhba33
Chapter 5 Managing iSCSI Storage
VMware, Inc. 81