Getting firmware version information on ESXi and GNU/Linux

You may not always have the convenient option to install vendor-specific hardware management agents/extension on ESXi hosts or physical servers, for example with appliance-ish OSes like the Check Point SPLAT/Gaia platform (which is just a custom RHEL descendant), or you may run into a server without these tools installed. So how can you still query firmware information on such systems directly from the command line? I will outline a couple of ways here which make it possible to obtain that information.
The example information captured here is from HP Proliant Servers (since G5), but most of it should work in similar ways with other hardware platforms too. Unless noted otherwise, the example commands here should work regardless of whether you have CIM providers or hardware management agents installed or not.

Getting firmware info on ESXi

The tool /usr/lib/vmware/vm-support/bin/swfw.sh available since ESXi 5.x will dump most hardware and firmware information you probably need. If you have the HP (or probably other too) CIM providers installed, it will list detailed information in a specific namespace section such as root/hpq.
But even if you don’t have them installed, it collects generic firmware information in namespace root/cimv2 for BIOS, local RAID controllers, ILO, NICs and more.

BIOS:
While it is possible to query the BIOS version remotely via PowerCLI and it’s even displayed in the vSphere Client GUI under Processor Information, I haven’t found a way to query the BIOS version from the console directly except for /usr/lib/vmware/vm-support/bin/swfw.sh. In dump it will look like this:

in root/hpq:
SMX_SystemFirmware.InstanceID=”HPQ:SMX_SystemFirmware:1″
InstanceID = HPQ:SMX_SystemFirmware:1
ReleaseDate = 20110502000000.000000+000
ClassificationDescriptions = { System Firmware,  }
Classifications = { 11,  }
Manufacturer = HP
VersionString = 2011.05.02in root/cimv2:
OMC_SMASHFirmwareIdentity.InstanceID=”34.0″
InstanceID = 34.0
IsLargeBuildNumber = true
VersionString = P62
ReleaseDate = 20110505000000.000000+000
Name = System BIOS
Manufacturer = HP
IsEntity = true
ElementName = System BIOS
Caption = System BIOS

Note that the HP-CIM dump will list the active as well as backup ROM version, so don’t confuse them.

Local RAID-Controller:
For HP SmartArray based RAID Controllers, which all standard HP Proliant Server local SAS controllers are based on, information is also available in the driver’s procnode:

# cat /proc/driver/cciss/cciss0
cciss0: HP Smart Array P400i Controller
Board ID: 0x3235103c
Firmware Version: 7.22# cat /proc/driver/hpsa/hpsa0
hpsa0: HP Smart Array P410i Controller
Board ID: 0x3245103c
Firmware Version: 5.70
Driver Version: HP HPSA Driver (v 5.0.0-17vmw)

With the HP CIM-providers and swfw.sh, you can even get the local hard disk firmware version and drive type info:

SMX_SADiskDriveFirmware.InstanceID=”HPQ:SMX_SADiskDriveFirmware-3QQ1ASPK0000994695QR”
InstanceID = HPQ:SMX_SADiskDriveFirmware-3QQ1ASPK0000994695QR
IsEntity = true
IdentityInfoType = { CIM:SoftwareFamily, HPQ:SoftwareCategory,  }
IdentityInfoValue = { HPQ:DF0450B8054, Storage Device,  }
TargetTypes = { DF0450B8054,  }
ClassificationDescriptions = { Disk Drive Firmware,  }
Classifications = { 10,  }
Manufacturer = HP
VersionString = HPD6
IsLargeBuildNumber = false
HealthState = 5
StatusDescriptions = { Disk Drive Firmware Status: OK,  }
OperationalStatus = { 2,  }
Name = Disk Drive Firmware

NICs:
We can easily use ethtool to access the NIC firmware version:

# ethtool -i vmnic1
driver: bnx2
version: 2.0.15g.v50.11-5vmw
firmware-version: bc 1.9.6
bus-info: 0000:05:00.0# ethtool -i vmnic2
driver: e1000e
version: 1.1.2-NAPI
firmware-version: 5.11-2
bus-info: 0000:0b:00.0

ILO:
I am not aware of a way to check the ILO version without relying on the hponcfg tool provided by the HP Offline Utilities bundle or through swfw.sh. While the utilities bundle is a separate package from the actual CIM bundle, it may not work without it.

via swfw.sh in root/hpq with CIM-providers:
SMX_MPFirmware.InstanceID=”HPQ:SMX_MPFirmware:1″
InstanceID = HPQ:SMX_MPFirmware:1
IsEntity = false
ReleaseDate = 20120716000000.000000+000
IdentityInfoType = { CIM:SoftwareFamily,  }
IdentityInfoValue = { HPQ:RI7,  }
ClassificationDescriptions = { HP Management Processor Firmware,  }
Classifications = { 10,  }
Manufacturer = Hewlett-Packard
VersionString = 2.12
IsLargeBuildNumber = false
MinorVersion = 12
MajorVersion = 2
HealthState = 5
StatusDescriptions = { Management Processor Firmware Status: OK,  }
OperationalStatus = { 2,  }
Name = Integrated Lights Out 2 (iLO 2)
Caption = Management Processor Firmware
Description = HP Management Processor Firmware
ElementName = RI7

via swfw.sh in root/cimv2 without CIM-providers:
OMC_MCFirmwareIdentity.InstanceID=”46.10000″
InstanceID = 46.10000
IsEntity = true
Classifications = { 8,}
IsLargeBuildNumber = false
OperationalStatus = { 0,}
Description = BMC Firmware (node 0) 46:10000
Caption = BMC Firmware (node 0) 46:10000
ElementName = BMC Firmware (node 0) 46:10000
Manufacturer = Hewlett-Packard
Name = Baseboard Management Controller
VersionString = 2.12
EnabledState = 0

# /opt/hp/tools/hponcfg -g
HP Lights-Out Online Configuration utility
Version 4.0-10 (c) Hewlett-Packard Company, 2011
Firmware Revision = 2.09 Device type = iLO 2 Driver name = hpilo

HBAs:
Information on Qlogic and Emulex based Fibre Channel HBAs are available in the procnodes for ESXi versions prior to 5.5:

# cat /proc/scsi/qla2xxx/5
QLogic PCI to Fibre Channel Host Adapter for HPAE311A:
FC Firmware version 5.03.15 (496), Driver version 901.k1.1-14vmw
Host Device Name vmhba2
BIOS version 2.16
FCODE version 2.03
EFI version 2.22
Flash FW version 5.03.15
[…]

ESXi 5.5 and later use a native drivers interface, which doesn’t store information in the procnodes. But we can access the native driver information with this new tool:

 # /usr/lib/vmware/vmkmgmt_keyval/vmkmgmt_keyval -a
Listing all system keys:
Key Value Instance:  QLNATIVEFC/qlogic
Listing keys:
Name:   0
Type:   string
value:
QLogic PCI to Fibre Channel Host Adapter for HPAE311A:
        FC Firmware version 5.09.00 (9496), Driver version 1.1.7.0Host Device Name vmhba2

BIOS version 2.16
FCODE version 2.03
EFI version 2.22
Flash FW version 5.03.15
ISP: ISP2432, Serial# MY50710EWT

Here’s a nice little PowerCLI script to query HBA firmware info too:
http://communities.vmware.com/message/2178785#2178785

Going another step further, with swfw.sh and the CIM providers, you can even get the HP Bladesystem Onboard Administrator firmware version from within an ESXi blade:

SMX_BladeEnclosureFW.InstanceID=”HPQ:SMX_BladeEnclosureFW:1″
InstanceID = HPQ:SMX_BladeEnclosureFW:1
IsEntity = false
IdentityInfoType = { CIM:SoftwareFamily,  }
IdentityInfoValue = { HPQ:OA,  }
ClassificationDescriptions = { HP Server Blade Enclosure Firmware,  }
Classifications = { 10,  }
Manufacturer = Hewlett-Packard
VersionString = 3.56

Getting firmware info on a physical GNU/Linux host:

For the most part this is similar to what we can do on ESXi (or rather the other way around).

BIOS:
The BIOS version can be queried via dmidecode:

# dmidecode -t bios
BIOS Information
Vendor: HP
Version: P68
      Release Date: 05/05/2011

Local RAID-Controller:
For HP SmartArray based RAID Controllers (cciss), firmware version info should be available in one of the following locations depending on server generation or OS:

# cat /proc/driver/cciss/cciss0
cciss0: HP Smart Array P410i Controller
Board ID: 0x3245103c
Firmware Version: 5.70

# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 03 Id: 00 Lun: 00
Vendor: HP       Model: P410i            Rev: 5.12

# cat /sys/class/scsi_host/host0/firmware_revision
5.12

Another more stable method is using the smartctl utility:

# smartctl -a /dev/sda
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-431.17.1.el6.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

Vendor:               HP
Product:              LOGICAL VOLUME
Revision:             6.40
User Capacity:        293.563.949.056 bytes [293 GB]
Logical block size:   512 bytes
Logical Unit id:      0x600508b1001ca1d0671110116dd61f9f
Serial number:        50014380144A5980
Device type:          disk
Local Time is:        Fri Jun 27 14:42:13 2014 CEST
Device does not support SMART

With smartctl we can also query detailed information on each individual disk that is part of the RAID array, by specifying the RAID type with -d (in my case cciss aka HP smart array followed by a comma and the drive number):

# smartctl -a /dev/sda -d cciss,0
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-431.17.1.el6.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

/dev/sda [cciss_disk_00] [SCSI]: Device open changed type from ‘sat,auto’ to ‘cciss’
Vendor:               HP
Product:              EH0146FBQDC
Revision:             HPD3
User Capacity:        146.815.737.856 bytes [146 GB]
Logical block size:   512 bytes
Logical Unit id:      0x5000c5004c6720cb
Serial number:        6XM0FJKM0000M239BCY7
Device type:          disk
Transport protocol:   SAS
Local Time is:        Fri Jun 27 14:45:41 2014 CEST
Device supports SMART and is Enabled
Temperature Warning Enabled
SMART Health Status: OK

Current Drive Temperature:     31 C
Drive Trip Temperature:        65 C

 

NICs:
Using ethtool again to access the NIC firmware version:

# ethtool -i eth2
driver: bnx2
version: 1.7.9-1
firmware-version: 5.2.3
bus-info: 0000:04:00.0

# ethtool -i eth5
driver: e1000
version: 7.6.12-NAPI
firmware-version: 5.12-2
bus-info: 0000:12:00.1

ILO:
Besides using the hponcfg tool. it actually appears to be possible with dmidecode. In my case it displays a “Firmware Revision” at the end of the BIOS section, which seems to match the ILO version:

# dmidecode -t bios | grep Firmware
Firmware Revision: 1.70

On an ILO2 server version 2.09, dmidecode displays “Firmware Revision: 2.9” (missing a 0 there).
On an ILO3 server version 1.28, dmidecode displays “Firmware Revision: 1.28” correctly.
Here is also an interesting script you can try on your ILO network.

HBAs:
On a recent Proliant G7 servers with 8GB Qlogic-based HBAs, the HBA firmware version does not seem to be easily accessible via a procnodes anymore (similar to the ESXi way), but info is scattered in /sys files:

# cat /sys/class/scsi_host/host4/model_name
HPAK344A
# cat /sys/class/scsi_host/host4/model_desc
HP 8Gb Single Channel PCI-e 2.0 FC HBA
# cat /sys/class/scsi_host/host4/fw_version
5.06.03 (90d5)
# cat /sys/class/scsi_host/host4/optrom_fw_version
4.04.04 128
# cat /sys/class/scsi_host/host4/optrom_efi_version
2.05

Disk firmware info is likely only available with specific RAID-controller utilities (e.g. hpacucli) or management agents, which makes perfect sense though.

Advertisements

2 thoughts on “Getting firmware version information on ESXi and GNU/Linux

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s