I was in my personal ESX about to upgrade to update 1. I was distracted by trying to setup iSCSI from the command line. Right before I looked to the vSphere Client to get the iqn I said, “There is surely a way for me to find this from the command line.”
Searching around I found the command vmkiscsi-tool. Really good stuff, I can complete the rest of my setup without the GUI. One thing though to list out the iqn for iscsi after you enable it you must know the device name (ie vmhba??).
Using this command:
vmkiscsi-tool -I -l
I usually guess the iscsi hba is vmhba33 or 32 but how do I know for sure?
Ok great, now we know it is vmhba33
[[email protected] sbin]# vmkiscsi-tool -I -l vmhba33
iSCSI Node Name: iqn.1998-01.com.vmware:esxhost01-35151883
[[email protected] sbin]#
Now with a few more vmkiscsi-tool commands I can finish configuring my iSCSI.
Add the Ip of the SAN:
[[email protected] sbin]# vmkiscsi-tool -D -a 172.16.23.251 vmhba33
[[email protected] sbin]# esxcfg-rescan -a vmhba33