Hello all:
I turned on the S/W iSCSI client and enabled the iSCSI firewall port on my ESX 3.5 server (using the
command line).
After performing those pre-requesite steps, how does one, using an esx* or vm* CLI command, probe the
system to get the iSCSI initiator name? vmhbaXX
I tried several CLI command variations, as well as cat(1)ing out various data structures under /proc/vmware/,
but without success. I'm sure I missed doing the one thing that would work :-).
Note that in the VI/VC client I can see that it is "vmhba34", but I'm trying to get that same information
from the command line (pretending as if the GUI were not available to me).
Thanks in Advance,
Noel Milton
nmvega@ComputingArchitects.Com
I see that you have not defined any connections to a target yet. Once the path is established it will show the initiator name there.
You can also use
esxcfg-info -s
all HBA's will be listed there
Hi,
The software initiator names are stored in a file in the /etc/initiatorname.vmkiscsi file
You can use the cat command to display it.
cat /etc/initiatorname.vmkiscsi
If you would like to see what HBA the initiator maps to use
esxcfg-mpath -l
Hi Mike:
Thanks and you're correct...
==========================
root# cat /etc/initiatorname.vmkiscsi
GenerateName=yes
InitiatorName=iqn.1998-01.com.vmware:esx01-0bb8fef1
==========================
But I'm looking for the "vmhbaXX" name instead.
Perhaps one of the CLI commands can be used to "dereference"
the iqn name (in /etc/initiatorname.vmkiscsi) back to a
vmhbaXX name.
Unless it is normally in that same file, and is missing in
my case.
Yes... Strange because that command does list the local disk vmhba numbers
(for /dev/sda and /dev/sdb respectively), but not the iSCSI one which
is vmhba34 (and yet I see vmhba34 in the VI client)...
root# esxcfg-mpath -vl
Disk vmhba32:0:0 vml.0100000000355144325752474c202020202020202020202020534541474154 /dev/sda (715404MB) has 1 paths and policy of Fixed
Local 0:5.0 vmhba32:0:0 On active preferred
Disk vmhba33:0:0 vml.01000000003551443047573337202020202020202020202020534541474154 /dev/sdb (715404MB) has 1 paths and policy of Fixed
Local 0:5.0 vmhba33:0:0 On active preferred
Mike:
You got me thinking about the command a little more...
This variation worked...
esxcfg-mpath -a
root# esxcfg-mpath -a
vmhba34 iqn.1998-01.com.vmware:esx01-0bb8fef1 sw
Thank you for your help Mike.
They showed up when I ran the command. Do you have your iSCSI connected to any storage?
Disk vmhba32:0:0 /dev/sda (302364MB) has 1 paths and policy of Fixed
iScsi sw iqn.1998-01.com.vmware:XXXXXXXXXXX<->iqn.XXXXX.XXXXXXXXXXXX vmhba32:0:0 On active preferred
Disk vmhba32:0:1 /dev/sdb (1613201MB) has 1 paths and policy of Fixed
iScsi sw iqn.1998-01.com.vmware:XXXXXXXXXXXX<->iqn.XXXXXXX.XXXXXXXXXXX vmhba32:0:1 On active preferred
If you found this or any other post helpful please consider the use of the Helpfull/Correct buttons to award points
I see that you have not defined any connections to a target yet. Once the path is established it will show the initiator name there.
You can also use
esxcfg-info -s
all HBA's will be listed there
Hi:
Not yet, as I am setting this up now (strictly using the command line).
Im sure you know this, but as you progress though the command line to set up an
iSCSI based datastore, eventually you get to the command "vmkiscsi-tools -D -a IPAddress vmhbaXX"
and other commands that require specifying the "vmhbaXX" parameter that will connect
it to storage. And that is where I was looking for the command that divulges the
"vmhbaXX" information. Perhaps when an iSCSI adapter it is not connected to storage it does not
show up in "esxcfg-mpath -l". In any case, the "-a|--hbas" option is described as follows (which
seemed to work):
List HBAs on the system with a unique ID if one is available.
Something new everyday.
Thank you mittim12.
Understood. Thank you both!
Btw... I'll inserted this here for completeness in case someone comes searching for
the same answer in the future (i.e. looking for a vmhba instance number for a non
LUN connected iSCSI adapter):
root# esxcfg-mpath -a
-or-
root# esxcfg-info -s | grep -B 2 iscsi_mod
Example:
root# esxcfg-info -s | grep -B 2 iscsi_mod
|----Name...............................................vmhba34
|----Console Name.......................................scsi3
|----Driver.............................................iscsi_mod
root#