Open SupraOva opened 5 years ago
Thanks for pointing to the invoke() method here: $esxcli.storage.san.fc.list.invoke()
This seems to be needed due to esxcli -v2
I solved it like this now: $firmwareVersion = ($esxcli.storage.san.fc.list.invoke() | Where {$_.Adapter -eq $pciDevice.VMkernelName}).FirmwareVersion
Hey @edmsanchez take a look. I'd like to run this on powercli 11 first to check, but i've seen some failures on our current code, so this may help :)
I found a way to get QLogic/Emulex HBA firmware version without SSH (https://kb.vmware.com/s/article/1002413)
Comment line 343 to 357 (Get-ESXIODevice.ps1)
if ($pciDevice.DeviceName -match "smart array") { Write-Verbose -Message ((Get-Date -Format G) + "
tGet Firmware version for: " + $pciDevice.VMKernelName) $hpsa = $esxiHost.ExtensionData.Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo | Where-Object {$_.Name -match "HP Smart Array"} if ($hpsa) { $firmwareVersion = (($hpsa.Name -split "firmware")[1]).Trim() } else { Write-Verbose -Message ((Get-Date -Format G) + "tGet Extension data failed. Skip Firmware version check for: " + $pciDevice.DeviceName) $firmwareVersion = $null } #END if/else } else { Write-Verbose -Message ((Get-Date -Format G) + "
tSkip Firmware version check for: " + $pciDevice.DeviceName) $firmwareVersion = $null } #END if/else `Add/Replace by :
Write-Verbose -Message ((Get-Date -Format G) + "
tGet Firmware version for: " + $pciDevice.VMKernelName) $vmbhaDetail = $esxcli.storage.san.fc.list.invoke() | where {$_.Adapter -match $($pciDevice.VMKernelName)} $firmwareVersion = $vmbhaDetail.FirmwareVersion `Tested on ESXi 6.7 U2/3 with PowerCLI 6.5 Release 1 build 4624819
Version : ESXi 6.7 U3 Model : ProLiant BL460c Gen9 Slot Description : Mezzanine Slot 1 VMKernel Name : vmhba2 Device Name : 2600 Series 16Gb Fibre Channel to PCI Express HBA Vendor Name : QLogic Corp Device Class : Fibre Channel PCI Address : 0000:09:00.1 VID : 1077 DID : 2031 SVID : 103c SSID : 1939 VIB Name : qlnativefc Driver : qlnativefc Driver Version : 3.1.16.0-1OEM.670.0.0.8169922 Firmware Version : 8.08.203 (d0d5)
Version : ESXi 6.7 U2 Model : ProLiant BL460c Gen9 Slot Description : Mezzanine Slot 2 VMKernel Name : vmhba2 Device Name : Emulex OneConnect OCe14000, FCoE Initiator Vendor Name : Emulex Corporation Device Class : Fibre Channel PCI Address : 0000:87:00.2 VID : 10df DID : 0724 SVID : 103c SSID : 1934 VIB Name : brcmfcoe Driver : brcmfcoe Driver Version : 12.0.1211.0-1OEM.670.0.0.8169922 Firmware Version : 12.0.1216.0
It didn't work.
Hello, for me the adding from SupraOva is working fine, I needed to collect the HBA Firmware from different models, all Emulex and it worked so thanks.
What I did is just what was explained, comment the part related to the HBA Firmware and added the working part:
Write-Verbose -Message ((Get-Date -Format G) + "tGet Firmware version for: " + $pciDevice.VMKernelName) $vmbhaDetail = $esxcli.storage.san.fc.list.invoke() | where {$.Adapter -match $($pciDevice.VMKernelName)} $firmwareVersion = ($esxcli.storage.san.fc.list.invoke() | Where {$.Adapter -eq $pciDevice.VMkernelName}).FirmwareVersion
I found a way to get QLogic/Emulex HBA firmware version without SSH (https://kb.vmware.com/s/article/1002413)
Comment line 343 to 357 (Get-ESXIODevice.ps1)
if ($pciDevice.DeviceName -match "smart array") { Write-Verbose -Message ((Get-Date -Format G) + "
tGet Firmware version for: " + $pciDevice.VMKernelName) $hpsa = $esxiHost.ExtensionData.Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo | Where-Object {$_.Name -match "HP Smart Array"} if ($hpsa) { $firmwareVersion = (($hpsa.Name -split "firmware")[1]).Trim() } else { Write-Verbose -Message ((Get-Date -Format G) + "tGet Extension data failed. Skip Firmware version check for: " + $pciDevice.DeviceName) $firmwareVersion = $null } #END if/else } else { Write-Verbose -Message ((Get-Date -Format G) + "
tSkip Firmware version check for: " + $pciDevice.DeviceName) $firmwareVersion = $null} #END if/else `
Add/Replace by :
Write-Verbose -Message ((Get-Date -Format G) + "
tGet Firmware version for: " + $pciDevice.VMKernelName) $vmbhaDetail = $esxcli.storage.san.fc.list.invoke() | where {$_.Adapter -match $($pciDevice.VMKernelName)} $firmwareVersion = $vmbhaDetail.FirmwareVersion `Tested on ESXi 6.7 U2/3 with PowerCLI 6.5 Release 1 build 4624819
Version : ESXi 6.7 U3 Model : ProLiant BL460c Gen9 Slot Description : Mezzanine Slot 1 VMKernel Name : vmhba2 Device Name : 2600 Series 16Gb Fibre Channel to PCI Express HBA Vendor Name : QLogic Corp Device Class : Fibre Channel PCI Address : 0000:09:00.1 VID : 1077 DID : 2031 SVID : 103c SSID : 1939 VIB Name : qlnativefc Driver : qlnativefc Driver Version : 3.1.16.0-1OEM.670.0.0.8169922 Firmware Version : 8.08.203 (d0d5)
Version : ESXi 6.7 U2 Model : ProLiant BL460c Gen9 Slot Description : Mezzanine Slot 2 VMKernel Name : vmhba2 Device Name : Emulex OneConnect OCe14000, FCoE Initiator Vendor Name : Emulex Corporation Device Class : Fibre Channel PCI Address : 0000:87:00.2 VID : 10df DID : 0724 SVID : 103c SSID : 1934 VIB Name : brcmfcoe Driver : brcmfcoe Driver Version : 12.0.1211.0-1OEM.670.0.0.8169922 Firmware Version : 12.0.1216.0