6.0

Table Of Contents
vSphere Command-Line Interface Concepts and Examples
70 VMware, Inc.
11 (Optional)IfyouwanttomakeadditionaliSCSIloginparameterchanges(see“ListingandSettingiSCSI
Parametersonpage 78),youmustlogoutofthecorrespondingiSCSIsessionandlogbackin.
aRunesxcli iscsi session removetologout.
bRunesxcli iscsi session addorrescantheadaptertoaddthesessionback.
Setting Up Dependent Hardware iSCSI with ESXCLI
DependenthardwareiSCSIsetuprequiresseveralhighleveltasks.Foreachtask,seethediscussionofthe
correspondingcommandinthischapterorthereferenceinformationavailablefromesxcli iscsi --help
andtheVMwareDocumentationCenter.Specifyoneoftheoptionslistedin“ConnectionOptionsforvCLI
HostManagementCommands”onpage 18in
placeof<conn_options>.
1 DeterminetheiSCSIadaptertypeandretrievetheiSCSIadapterID.
esxcli <conn_options> iscsi adapter list
2 (Optional)SettheiSCSInameandalias.
esxcli <conn_options> iscsi adapter set --adapter <adapter_name> --name=<name>
esxcli <conn_options> iscsi adapter set --adapter <adapter_name> --alias=<alias>
3Setupportbindingbyfollowingthesesteps:
aIdentifytheVMkernelportofthedependenthardwareiSCSIadapter.
esxcli <conn_options> iscsi logicalnetworkportal list --adapter=<adapter_name>
b ConnectthedependenthardwareiSCSIinitiatortotheiSCSIVMkernelportsbyrunningthe
followingcommandforeachport.
esxcli <conn_options> iscsi networkportal add --nic=<bound_vmknic>
--adapter=<iscsi_adapter>
cVerifythattheportswereaddedtothedependenthardwareiSCSIinitiator.
esxcli <conn_options> iscsi physicalnetworkportal list --adapter=<adapter_name>
4Addadynamicdiscoveryaddressorastaticdiscoveryaddress.
Thetwotypesoftargetdifferasfollows:
Withdynamicdiscovery,allstoragetargetsassociatedwithahostnameorIPaddressarediscovered.
Yourunthefollowingcommand.
esxcli <conn_options> iscsi adapter discovery sendtarget add --address=<ip/dns[:port]>
--adapter=<adapter_name>
Withstaticdiscovery,youmustspecifythehostnameorIPaddressandtheiSCSInameofthestorage
target.Yourunthefollowingcommand.
esxcli <conn_options> iscsi adapter discovery statictarget add --address=<ip/dns[:port]>
--adapter=<adapter_name> --name=<target_name>
Whenyoulaterremoveadiscoveryaddress,itmightstillbedisplayedastheparentofastatictarget.You
canaddthediscoveryaddressandrescantodisplaythecorrectparentforthestatictargets.
5 (Optional)SettheauthenticationinformationforCHAP(see“SettingiSCSICHAP”onpage 62and
“Enabling
iSCSIAuthentication”onpage 82).YoucansetpertargetCHAPforstatictargets,peradapter
CHAP,orapplythecommandtothediscoveryaddress.