preloader
23 May 2012 / #Esxi #Powercli

HBA firmware version

Update 2015.04.02: From ESXi 5.5 and native drivers, vmhba information are available through new command http://kb.vmware.com/kb/1002413

In anticipation of a SAN array controllers upgrade, we were asked to provide information on ESXi servers that were connected to these bays, including information on their HBA.

In the information requested, some were simple (driver, card model, !) and some more complicated (firmware version of each card).

There were some nice information available with PowerCLI in Config.StorageDevice.HostBusAdapter of a HostSystem object :

hba-info_mob

However, the retrieval of the firmware version of the card was a bit touchy ! After some research (unsuccessful) in managed objects and properties, we came across this VMware KB: Identifying the firmware of a Qlogic or Emulex FC HBA and the note at the end of the page that explains the why and how:

Note: You can determine the firmware of HBAs only using Direct Console access or SSH and not via RCLI or vMA.

So we have no choice, we had to go through SSH to retrieve information. As we did not want two separate scripts we used plink.exe (available with puTTy that allows to execute commands through an SSH session automatically) by calling the script via PowerCLI.

Here is an information extract from an EMULEX card:

~ # head -9 /proc/scsi/lpfc820/7
 Emulex LightPulse Fibre Channel SCSI driver 8.2.1.30.1-58vmw
 IBM 42C2071 4Gb 2-Port PCIe FC HBA for System x on PCI bus 0000:1e device 00 irq 200 port 0
 BoardNum: 0
 Firmware Version: 2.82A3 (Z3F2.82A3)
 Portname: XXX Nodename: XXX

SLI Rev: 3
 NPIV Unsupported by Fabric
 RPIs max 512 RPIs used 1

Here is an information extract from an QLOGIC card:

~ # head -8 /proc/scsi/qla2xxx/9
 QLogic PCI to Fibre Channel Host Adapter for QLE2460:
 FC Firmware version 5.02.00 (496), Driver version 831.k

Host Device Name vmhba5

BIOS version 1.28
 FCODE version 1.24
 EFI version 1.08

So here is a PowerCLI script which will provide the following informations :

  • Host Name
  • ESXi Product Version
  • Hba Device
  • Hba World Wide Name
  • Hba Driver
  • Hba Model
  • Hba Firmware Version
  • Hardware Model

The script takes 4 parameters :

  • PlinkPath : Filepath to plink.exe in order to run SSH commands
  • Username : Username used for SSH connection
  • Password : Password for SSH user
  • CSVPath : [OPTIONAL] Filepath for a csv export. If this parameter isn’t provided, results will be displayed.
.\hba-infos.ps1 -PlinPath 'C:\Program Files (x86)\PuTTY\plink.exe' -Username root -Password VMwareRox
.\hba-infos.ps1 -PlinPath 'C:\Program Files (x86)\PuTTY\plink.exe' -Username root -Password VMwareRox -CSVPath C:\HBA-infos.csv

If you have used CSVPath parameter, you’ll get a csv file like this one :

hba-info_report

The hba-infos.ps1 script is available for download in our GitHub page: https://github.com/v-team/powercli-toolbox


> Frederic MARTIN