For a healthy vSphere virtualization infrastructure and to receive support from VMware it is important to verify that IO devices are listed in VMwares Compatibility Guide/Hardware Compatibility List (HCL) with their correct driver and firmware version. Gathering firmware details and comparing them to the HCL is very time-consuming. I made a small script that automatically gathers the following information:
- IO Devices (NICs, HBAs and RAID Controllers)
- Driver Version
- Firmware Version
- Official HCL Link
Download: io-devices-report.ps1 (Hosted at GitHub)
Usage:
- Get PowerCLI 6.3 R1 or later
- Change the device scope (Line 13) to the desired value.
Example:
$device = Get-VMHost esx01.virten.lab - Check a single Host
$device = Get-Cluster NUCluster | Get-VMHost - Checks all hosts in a cluster
$device = Get-VMHost - Checks all hosts in the vCenter - Connect to a vCenter Server
PS> Connect-VIServer vc.virten.lab
- Optional: Change the output format (Line 91-108). CSV and HTML output is active by default.
- Run the script
- Verify the output with the provided links.
Additional Information
- The runtime is about 20-40 seconds per host.
- The script downloads my JSON-based IOHCL (1.4 MB).
- The "Supported" attribute only states that is device has been found in the HCL. You still have to check ESXi version and Firmware/Driver version.
- The script uses Get-EsxCli -V2 which requires at least PowerCLI 6.3 R1
- QLogic and Emulex firmware can only be identified with SSH as explained here. If you know a workaround, please comment.
- If you found any issues, feel free to comment and I will try to provide a fix.
Thank you, first of all.
I have been trying to get QLogic/Emulex HBA firmware versions. It seems this information cannot be retrieved. Only through SSH.
Your script doesn't retrieve this information either.
Any idea?
Thanks.
I couldn't figure out how to get QLogic and Emulex firmware information with the API or PowerCLI. Only with SSH as explained here.
Hello Guyz,
Did you find a solution?
thx
Having trouble with the script on UCS blades. Script runs and the only thing in the html or csv file is "" . Works great on all my Dell servers.
The various device IDs in the JSON file are zero padded. Device lookup will fail for some devices because you don't zero pad in the conversions on lines 34-37.
Something like: $Info.vid = [String]::Format("{0:x4}", $device.VendorId)
Thank you. You are totally right. I've added it to the script.
Also need to move the "$esxcli =" at line 49 outside the "if" at line 47. Otherwise $esxcli is potentially NULL in the "elseif" branch in lines 80 and 82.
I've also found that I have a MegaRAID controller that has a driver named "lsi_mr3" but the VIB has lsi-mr3 in the name and thus no VIB is found. Thus $driverVib at line 86 is from the previous iteration of the loop and not blank as expected.
I probably should be posting these using GitHub Issues. Turns out I'm not the brightest bulb in the box.
Hi,
I have a issue when the script try to go out from intranet for this line
$hcl = Invoke-WebRequest -Uri http://www.virten.net/repo/vmware-iohcl.json | ConvertFrom-Json
How can i recreate localy and what should i put in the script (to replace Invoke-WebRequest -Uri) ?
thanks
You can download the json file and load it with:
$hcl = Get-Content -Path 'C:\hcl\vmware-iohcl.json' | ConvertFrom-Json
Worked like a charm. Thank you
Hi, Firstly great script, thank you
Is the error related to JPA's comment is fixed?
"I've also found that I have a MegaRAID controller that has a driver named "lsi_mr3" but the VIB has lsi-mr3 in the name and thus no VIB is found. Thus $driverVib at line 86 is from the previous iteration of the loop and not blank as expected."
I am having the same issue, PERC details are not fetched.
Message: [NoMatchError];
InnerText: [NoMatchError] No VIB matching VIB search specification 'lsi_mr3'.
Please refer to the log file for more details.EsxCLI.CLIFault.summary
Message: [NoMatchError];
InnerText: [NoMatchError] No VIB matching VIB search specification
'megaraid_perc9'. Please refer to the log file for more
details.EsxCLI.CLIFault.summary
Script does not get firmware for LPFC only vibversion.
Script does not get firmware for LPFC only vibversion.
The way to get LPFC is with this
$esxcli.Storage.san.fc.list.Invoke() |
select @{N = 'HostName'; E = {$esxcli.VMHost.Name}},
I try to figure out the way to fit in the report.
$esxcli.Storage.san.fc.list.Invoke() |
select @{N = 'HostName'; E = {$esxcli.VMHost.Name}}
GENIUS!
Hi,
I found this script on one of the online forums, but first you have to have PowerCli 6.5 or later.
1- Start PowerCli.
2- Connect to your vCenter using Connect-VIServer command.
3- Copy the below script to a notepad file and then rename it to .ps1
4- From the PowerCli shell, go to the destination of your ps1 script and then execute.
This script has exported HBA and VNICs firmware and driver versions info for all of my HPE ESXI hosts.
If you want specific cluster or specific host, change the first line of the script with one of the following;
Example:
$vmhosts = Get-VMHost fqdn-of-your-esxihost - Check a single Host
$vmhosts = Get-Cluster you-cluster-name | Get-VMHost - Checks all hosts in a cluster
$vmhosts = Get-VMHost - Checks all hosts in the vCenter
Script is below:
################################################
$vmhosts = Get-VMHost
$report = @()
foreach ($ESXHost in $vmhosts) {
$esxcli = Get-EsxCli -vmhost $ESXHost
$nicfirmware = $esxcli.network.nic.list()
$fcfirmware = $esxcli.storage.san.fc.list()
$driversoft = $esxcli.software.vib.list()
foreach($nicfirmwareselect in $nicfirmware)
{
$NetworDescription = $nicfirmwareselect.Description
$NetworDriver = $driversoft | where { $_.name -eq ($nicfirmwareselect.Driver) }
$NetworkName = $nicfirmwareselect.Name
$NetworkFirmware = ($esxcli.network.nic.get($nicfirmwareselect.Name)).DriverInfo.FirmwareVersion
$report += "" |
select @{N = "Hostname"; E = { $ESXHost.Name } },
@{N = "Hardware-Model"; E = { $ESXHost.Model } },
@{N = "device"; E = { $NetworkName } },
@{N = "driver"; E = { $NetworDriver.Version } },
@{N = "firmware"; E = { $NetworkFirmware } },
@{N = "description"; E = { $NetworDescription } }
}
foreach($fcfirmwareselect in $fcfirmware)
{
$fcDescription = $fcfirmwareselect.ModelDescription
$fcDriver = $driversoft | where { $_.name -eq ($fcfirmwareselect.DriverName) }
$fcName = $fcfirmwareselect.Adapter
$fcFirmware = $fcfirmwareselect.FirmwareVersion
$report += "" |
select @{N = "Hostname"; E = { $ESXHost.Name } },
@{N = "Hardware-Model"; E = { $ESXHost.Model } },
@{N = "device"; E = { $fcName } },
@{N = "driver"; E = { $fcDriver.Version } },
@{N = "firmware"; E = { $fcFirmware } },
@{N = "description"; E = { $fcDescription } }
}
}
$report | Export-Csv -Path 'C:\ESXI HBA & NIC info.csv'
########################################################################