What CLI command can provide information on an HBA

Stan Novinsky
Stan Novinsky used Ask the Experts™
on
I am looking for ESXi CLI commands or similar that would produce results as the commands below which are from RHEL

 # lspci -nn | grep -i hba
07:00.0 Fibre Channel [0c04]: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA [1077:2532] (rev 02)
07:00.1 Fibre Channel [0c04]: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA [1077:2532] (rev 02)
08:00.0 Fibre Channel [0c04]: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA [1077:2532] (rev 02)
08:00.0 Fibre Channel [0c04]: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA [1077:2532] (rev 02)

#ls -lrt /sys/class/fc_transport/
drwxr-xr-x  2 root root 0 May 27 09:40 target7:0:2
drwxr-xr-x  2 root root 0 May 27 09:40 target7:0:1
drwxr-xr-x  2 root root 0 May 27 09:40 target7:0:0
drwxr-xr-x  2 root root 0 May 27 09:40 target5:0:2
drwxr-xr-x  2 root root 0 May 27 09:40 target5:0:1
drwxr-xr-x  2 root root 0 May 27 09:40 target5:0:0

#ls -lrt /sys/class/fc_transport/
drwxr-xr-x  2 root root 0 May 27 09:40 target7:0:2
drwxr-xr-x  2 root root 0 May 27 09:40 target7:0:1
drwxr-xr-x  2 root root 0 May 27 09:40 target7:0:0
drwxr-xr-x  2 root root 0 May 27 09:40 target5:0:2
drwxr-xr-x  2 root root 0 May 27 09:40 target5:0:1
drwxr-xr-x  2 root root 0 May 27 09:40 target5:0:0
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
This should do the trick:

Get-VMhost | Get-VMHostHBA -Type FibreChannel | Select VMHost,Device,@{N="WWN";E={"{0:X}" -f $_.PortWorldWideName}} 

Open in new window


reference :http://blogs.microsoft.co.il/skepper/2015/11/09/powecli-get-hba-wwn-vmhosts-using-powercli/
Stan NovinskyVirtualization Engineer

Author

Commented:
is this to run under VMware PowerCLI?
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Stan NovinskyVirtualization Engineer

Author

Commented:
ok,,i will give it a shot,
Stan NovinskyVirtualization Engineer

Author

Commented:
I tried this on my ESXi Host, but i do not have a Fiber HBA,,,


The command returned nothing, which seems to make sense...

I will see if i can run this on the system with the HBA.

Is there a similar command for iSCSI?
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial