6.0

Table Of Contents
vSphere Command-Line Interface Concepts and Examples
74 VMware, Inc.
vicfg-iscsi <conn_options> --swiscsi --enable
3 (Optional)Checkthestatus.
vicfg-iscsi <conn_options> --swiscsi --list
ThesystemprintsSoftware iSCSI is enabledorSoftware iSCSI is not enabled.
4 (Optional)SettheiSCSInameandalias.
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>
5Addadynamicdiscoveryaddressorastaticdiscoveryaddress.
Thetwotypesoftargetdifferasfollows:
Withdynamicdiscovery,allstoragetargetsassociatedwithahostnameorIPaddressarediscovered.
Yourunthefollowingcommand:
vicfg-iscsi <conn_options> --discovery --add --ip <ip_addr | domain_name> <adapter_name>
Withstaticdiscovery,youmustspecifythehostnameorIPaddressandtheiSCSInameofthestorage
target.Yourunthefollowingcommand:
vicfg-iscsi <conn_options> --static --add --ip <ip_addr | domain_name>
--name <iscsi_name> <adapter_name>
Whenyoulaterremoveadiscoveryaddress,itmightstillbedisplayedastheparentofastatictarget.You
canaddthediscoveryaddressandrescantodisplaythecorrectparentforthestatictargets.
6 (Optional)SettheauthenticationinformationforCHAP(see“SettingiSCSICHAP”onpage 62and
“Enabling
iSCSIAuthentication”onpage 82).
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>
Thetarget(-i)andname(-n)optiondeterminewhatthecommandappliesto.
7 (Optional)SettheauthenticationinformationformutualCHAPbyrunningvicfg-iscsi -Aagainwith
the-boptionandadifferentauthenticationusernameandpassword.
For<level>,specifychapProhibitedorchapRequired.
chapProhibitedThehostdoesnotuseCHAPauthentication.Ifauthenticationisenabled,specify
chapProhibitedtodisableit.
chapRequiredThehostrequiressuccessfulCHAPauthentication.TheconnectionfailsifCHAP
negotiationfails.YoucansetthisvalueformutualCHAPonlyifCHAPissettochapRequired.
For<auth_method>,CHAPistheonlyvalidvalue.
8 (Optional)SetiSCSIparametersbyrunningvicfg-iscsi -W.
Option Result
-iand‐n CommandappliestopertargetCHAPforstatictargets.
Only‐i Commandappliestothediscoveryaddress.
Neither-inor‐n CommandappliestoperadapterCHAP.
IMPORTANTYouareresponsibleformakingsurethatCHAPissetbeforeyousetmutualCHAP,andfor
usingcompatiblelevelsforCHAPandmutualCHAP.