6.0

Table Of Contents
VMware, Inc. 75
Chapter 5 Managing iSCSI Storage
9Aftersetupiscomplete,runvicfg-rescantorescanallstoragedevices.
Setting Up Dependent Hardware iSCSI with vicfg-iscsi
DependenthardwareiSCSIsetuprequiresanumberofhighleveltasks.Foreachtask,seethediscussionof
thecorrespondingcommandlineoptioninthischapter,orthereferenceinformation.Specifyoneofthe
optionslistedin“ConnectionOptionsforvCLIHostManagementCommands”onpage 18inplaceof
<conn_options>.
1 Determine
theHBAtypeandretrievetheHBAID.
vicf-iscsi <conn_options> --adapter --list
2 (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>
3Setupportbindingbyfollowingthesesteps:
aIdentifytheVMkernelportofthedependenthardwareiSCSIadapter.
esxcli <conn_options> swiscsi vmknic list -d <vmhba>
b ConnectthedependenthardwareiSCSIinitiatortotheiSCSIVMkernelportsbyrunningthe
followingcommandforeachport.
esxcli <conn_options> swiscsi nic add -n <port_name> -d <vmhba>
cVerifythattheportswereaddedtothedependenthardwareiSCSIinitiator.
esxcli <conn_options> swiscsi nic list -d <vmhba>
dRescanthedependenthardwareSCSIinitiator.
vicfg-rescan <conn_options> <vmhba>
4Addadynamicdiscoveryaddressorastaticdiscoveryaddress.
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.
5 (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.