Chris Hall bio photo

Chris Hall

Adjusting technology to make it fit my requirements...

Windows, Linux, Virtualisation, Unified Computing & Cloud Offerings Design Engineer.

PolarCloudsUK Chris Google+ LinkedIn Github

 A question this comes up quite a bit:  How can I find the World Wide Names (WWNs) of the fibre channel Host Bus Adapters (HBAs) my ESXi server from the console?

Sure you can use the VMware VI client to gather the required info, but what happens if you do not or have network connectivity to your ESXi yet? 

The WWN information is very often needed to for the zoning configuration on the fibre channel switches to ensure that the ESXi server can only access the Storage Array Network (SAN) disks it is supposed to access.

Here is how to find the HBA WWNs:

First log on to your ESXi console:
Now select Troubleshooting Options:

Then select Enable Local Tech Support:

Now press ALT F1 to enter local ESXi console:

Login using root credentials:

At the # prompt enter: cd /proc/scsi and ls to list the SCSI adaptors fitted in your ESXi:

You are looking for qlaxxxx for QLogic HBAs or lpfc for Emulex HBAs.  As you can see from the screenshots, my ESXi has QLogic adapters fitted (qla2xxx).

Next, cd qla2xxx (or cd lpfc for emulex) and then list (ls) adaptors:

As you can see I have adaptors fitted at 5 and 6.  Your numbers may (and quite likely will) be different.  The last step is to list each of the adaptors found, using the cat x |more ("x" being one of the numbers listed) command:
 You are looking for the Host Device Name and the SCSI Device Information:

OK.  To get the full WWN address, simply note down the node and port hex ID's from the SCSI Device Information, and separate each pair with colons ":" to make your full HBA WWN.  In my case, from the screenshots above, my HBA WWN would be:

WWN of vmhba2 = 20:00:00:1b:32:8a:f3:42 21:00:00:1b:32:8a:f3:42

Repeat for the last command (cat x |more) for all the other HBA's in your ESXi (so in my case I would run the command cat 6 |more to find the SCSI device information for my other HBA.

When finished type exit to return to the ESXi tech support console login and ALT F2 to switch back to the standard ESXi console.

Don't forget to login, select Troubleshooting Options and Disable Local Tech Support when completely finished!

- Chris