Before upgrading an ESXi host, it is best practice to to look at VMware HCL and check compatibility of host and IO devices. The combination of driver version, firmware version and ESXi release is crucial for compatibility. Even minor updates might lead to loss of HCL compatibility. A system that used to be HCL compliant at time of deployment, might no longer be compatible after e.g. the third ESXi update release. Updates can bring new driver versions which in turn might require higher firmware versions.
If you’re lucky you may have a software solution that keeps track of all your firmware and driver versions. Runecast Analyzer for example does a pretty good job and shows you current compatibility issues with a single click. Furthermore you can simulate updates/upgrades to any higher vSphere version and the resulting HCL status.
Unfortunately many customers do not have a software solution like that. In these cases you need to go back to the roots (literally) and gather all information on the ESXi shell. To do so you need to enable SSH service on all hosts you want to verify. That can be done in the vSphere-Client or more elegant and faster by a PowerCLI command.
Get HBA driver version
The command above lists all SCSI devices and HBA including their corresponding driver names.
The driver version can be obtained with the command vmkload_mod.
vmkload_mod -s <HBADriver> | grep Version
Here’s an example with Emulex HBA driver lpfc.
vmkload_mod -s lpfc | grep Version
Get HBA firmware
Before ESXi 5.5 firmware version information was obtained with command
Native drivers are no longer listed below /proc. We need to utilize command vmkmgmt_keyval. It’s a good idea to get help first and issue the command with [-h].
-a | –allKeys : Dump all the key values in the system, for all instances. May not be used with dumpInstances.
-d | –dumpInstances : Dump the instance names for all instances in the system. May not be used with allKeys.
-i | –instance : The key-value instance to inspect. Required for instance-specific operations.
-l | –list : List all the keys for a given instance
-k | –key : The key name to get or set. Required for getting or setting. Invalid otherwise.
-g | –get : Get the value for the specified instance and key.
-s | –set : Set the key for the specified instance and key with the provided value
-h | –help : Show the usage for this program.
We need information about all instances. With parameter –dumpInstances [-d] it will return all HBA devices.
We can see that there are two Emulex HBA in our host (vmhba1 and vmhba0).
To obtain all keys on an instance we have to issue the –list [-l] parameter and the full instance name [-i].
/usr/lib/vmware/vmkmgmt_keyval/vmkmgmt_keyval -l -i <instance_name>
Parameter -i is mandatory. The result is a long list of keys. But we’re just interested in a single key named “FW Version”. So we will pipe the result to grep FW. See full command below.
/usr/lib/vmware/vmkmgmt_keyval/vmkmgmt_keyval -l -i vmhba0/Emulex | grep FW
We’ll get a single line showing the firmware version 2.02A.
One Reply to “Read HBA Driver and Firmware Version”
Vielen Danke für diese Informationen.
Besonders die Informationen, um Firmware des HBA zu finden.