6.0

Table Of Contents
vSphere Command-Line Interface Concepts and Examples
72 VMware, Inc.
9 (Optional)IfyouwanttomakeadditionaliSCSIloginparameterchanges(see“ListingandSettingiSCSI
Parametersonpage 78),youmustlogoutofthecorrespondingiSCSIsessionandlogbackin.
aRunesxcli iscsi session removetologout.
bRunesxcli iscsi session addorrescantheadaptertoaddthesessionback.
Setting Up Independent Hardware iSCSI with ESXCLI
WithindependenthardwarebasediSCSIstorage,youuseaspecializedthirdpartyadaptercapableof
accessingiSCSIstorageoverTCP/IP.ThisiSCSIinitiatorhandlesalliSCSIandnetworkprocessingand
managementforyourESXisystem.
YoumustinstallandconfiguretheindependenthardwareiSCSIadapterforyourhostbeforeyoucan
access
theiSCSIstoragedevice.Forinstallationinformation,seevendordocumentation.
HardwareiSCSIsetuprequiresanumberofhighleveltasks.Foreachtask,seethediscussionofthe
correspondingcommandlineoptioninthischapterorthereferenceinformation.Specifyoneoftheoptions
listedin“ConnectionOptionsforvCLI
HostManagementCommands”onpage 18inplaceof
<conn_options>.
1 DeterminetheiSCSIadaptertypeandretrievetheiSCSIadapterID.
esxcli <conn_options> iscsi adapter list
2Configurethehardwareinitiator(HBA)byrunningesxcli iscsi networkportal ipconfig withone
ormoreofthefollowingoptions.
3 (Optional)SettheiSCSInameandalias.
esxcli <conn_options> iscsi adapter set --adapter <adapter_name> --name=<name>
esxcli <conn_options> iscsi adapter set --adapter <adapter_name> --alias=<alias>
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]>
5 (Optional)SettheauthenticationinformationforCHAP(see“SettingiSCSICHAP”onpage 62and
“EnablingiSCSIAuthentication”onpage 82).YoucansetpertargetCHAPforstatictargets,peradapter
CHAP,orapplythecommandtothediscoveryaddress.
-A|--adapter=<str> iSCSIadaptername.(required).
-1|--dns1=<str> iSCSInetworkportalprimaryDNSaddress.
-2|--dns2=<str> iSCSInetworkportalsecondaryDNSaddress.
-g|--gateway=<str> iSCSInetworkportalgatewayaddress.
-i|--ip=<str> iSCSInetworkportalIPaddress(required).
-n|--nic=<str> iSCSInetworkportal(vmknic).
-s|--subnet=<str> iSCSInetworkportalsubnetmask(required).