Set Up Dependent
Hardware iSCSI with ESXCLILast Updated December 16, 2024
Dependent hardware
iSCSI setup requires several high-level tasks.
- Verify that you are familiar with iSCSI authentication. See Enabling iSCSI Authentication.
- Verify that you are familiar with CHAP. See Setting iSCSI CHAP.
- Verify that you are familiar with iSCSI parameters. See Listing and Setting iSCSI Parameters.
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 ESXCLI Host Management Commands
in place of
<conn_options>
.
- Determine the iSCSI adapter type and retrieve the iSCSI adapter ID.
- Set the iSCSI name and alias.
- Set up port binding.
- Identify the VMkernel port of the dependent hardware iSCSI adapter.
- Connect the dependent hardware iSCSI initiator to the iSCSI VMkernel ports by running the following command for each port.
- Verify that the ports were added to the dependent hardware iSCSI initiator.
- Add a dynamic discovery address or a static discovery address.
- With dynamic discovery, all storage targets associated with a host name or IP address are discovered. You can run the following command.
- 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.
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. - 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.OptionCommandAdapter-level CHAPDiscovery-level CHAPTarget-level CHAPThe following example sets adapter-level CHAP.
- Set the authentication information for mutual CHAP by runningesxcli iscsi adapter auth chap setagain with--directionset tomutualand a different authentication user name and secret.OptionCommandAdapter-level CHAPDiscovery-level CHAPTarget-level CHAPYou are responsible for making sure that CHAP is set before you set mutual CHAP, and for using compatible levels for CHAP and mutual CHAP.
- Set iSCSI parameters.OptionCommandAdapter-level CHAPDiscovery-level CHAPTarget-level CHAP
- After setup is complete, perform rediscovery and rescan all storage devices.The following example performs the rediscovery and rescan operations.
- If you want to make additional iSCSI login parameter changes, you must log out of the corresponding iSCSI session and log back in.
- Runesxcli iscsi session removeto log out.
- Runesxcli iscsi session addor rescan the adapter to add the session back.