Set Up Software iSCSI
with vicfg-iscsi
Software iSCSI
setup requires a number of 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.
You should be familiar with
the corresponding command for each task. You can refer to the relevant
documentation for each command. Specify one of the options listed in
Connection Options for vCLI Host Management Commands
in place of
<conn_options>
.
- Determine the HBA type and retrieve the HBA ID.vicfg-iscsi <conn_options> --adapter --list
- Enable software iSCSI for the HBA.vicfg-iscsi <conn_options> --swiscsi --enable
- Check the status.vicfg-iscsi <conn_options> --swiscsi --listThe system printsSoftware iSCSI is enabledorSoftware iSCSI is not enabled.
- 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>
- 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.vicfg-iscsi <conn_options> --discovery --add --ip <ip_addr | domain_name> <adapter_name>
- 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. - Set the authentication information for CHAP.
The target (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>-i) and name (-n) option determine what the command applies to.OptionResult-i and -nCommand applies to per-target CHAP for static targets.Only -iCommand applies to the discovery address.Neither -i nor -nCommand applies to per-adapter CHAP. - Set the authentication information for mutual CHAP by runningvicfg-iscsi -Aagain with the-boption and a different authentication user name and password.For<level>, specifychapProhibitedorchapRequired.
- chapProhibited– The host does not use CHAP authentication. If authentication is enabled, specifychapProhibitedto disable it.
- chapRequired– The host requires successful CHAP authentication. The connection fails if CHAP negotiation fails. You can set this value for mutual CHAP only if CHAP is set tochapRequired.
For<auth_method>, CHAP is the only valid value.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. - Set iSCSI parameters by runningvicfg-iscsi -W.
- After setup is complete, runvicfg-rescanto rescan all storage devices.