6.0

Table Of Contents
VMware, Inc. 85
Chapter 5 Managing iSCSI Storage
Listing iSCSI Sessions
ListasoftwareiSCSIsessionattheadapterlevel.
esxcli <conn_options> iscsi session list --adapter=<iscsi_adapter>
ListasoftwareiSCSIsessionatthetargetlevel.
esxcli <conn_options> iscsi session list --name=<target> --adapter=<iscsi_adapter>
Logging in to iSCSI Sessions
Youcanuseesxcli iscsi sessiontologintoasession.Specifyoneoftheoptionslistedin“Connection
OptionsforvCLIHostManagementCommands”onpage 18inplaceof<conn_options>.
LogintoasessiononthecurrentsoftwareiSCSIordependenthardwareiSCSIconfigurationatthe
adapterlevel.
esxcli <conn_options> iscsi session add --adapter=<adapter_name>
Forexample:
esxcli --config /host-config-file iscsi session add --adapter=vmhba36
LogintoasessiononthecurrentsoftwareiSCSIordependenthardwareiSCSIconfigurationatthetarget
level.
esxcli <conn_options> iscsi session add --name=<target> --adapter=<adapter_name>
Forexample:
esxcli --config /host-config-file iscsi session add -name=iqn.xxx --adapter=vmhba36
AddduplicatesessionswithtargetandsessionIDsincurrentsoftwareiSCSIordependenthardware
iSCSIconfiguration.
esxcli <conn_options> iscsi session add --name=<iqn.xxxx> --isid=<session_id>
--adapter=<iscsi_adapter>
iqn.xxxxisthetargetIQN,whichyoucandeterminebylistingallsessions.session_idisthesession’s
iSCSIID.Forexample:
esxcli --config /host-config-file iscsi session add -name=iqn.xxx --isid='00:02:3d:00:00:01'
--adapter=vmhba36
Removing iSCSI Sessions
Youcanuseesxcli iscsi sessiontoremoveiSCSIsessions.Specifyoneoftheoptionslistedin
“ConnectionOptionsforvCLIHostManagementCommands”onpage 18inplaceof<conn_options>.
RemovesessionsfromthecurrentsoftwareiSCSIordependenthardwareiSCSIconfigurationatthe
adapterlevel.
esxcli <conn_options> iscsi session remove --adapter=<iscsi_adapter>
Forexample:
esxcli iscsi session remove --adapter=vmhba36
RemovesessionsfromthecurrentsoftwareiSCSIordependenthardwareiSCSIconfigurationatthetarget
level.
esxcli <conn_options> iscsi session remove --name=<iqn> --adapter=<iscsi_adapter>
Forexample:
esxcli <conn_options> iscsi session remove --name=iqn.xxx --adapter=vmhba38
IMPORTANTTheESX/ESXi4.xESXCLIcommandsformanagingiSCSIsessionsarenotsupportedagainst
ESXi5.0hosts.