arielsanchezmora / vDocumentation

vDocumentation provides a community-created set of PowerCLI scripts that produce infrastructure documentation of vSphere environments in CSV or Excel file format.
MIT License
157 stars 49 forks source link

Firmware version of vmhba LSI Avago MegaRAID doesn't recognized by Get-ESXIODevice #51

Open koznov opened 4 years ago

koznov commented 4 years ago

Hello! I've got some troubles with getting Firmware version info about all Avago (LSI) RAID bus controllers: image

From ESXi console needed information (at this moment) I can get with utility storcli:

/opt/lsi/storcli/storcli /c0 show all

Generating detailed summary of the adapter, it may take a while to complete.

CLI Version = 007.1506.0000.0000 Aug 11, 2020
Operating system = VMkernel 6.7.0
Controller = 0
Status = Success
Description = None

Basics :
======
Controller = 0
Model = SAS3408
Serial Number = 024JNFCNKA023738
Current Controller Date/Time = 11/17/2020, 14:17:46
Current System Date/time = 11/17/2020, 14:17:46
SAS Address = 524a52c08caa1000
PCI Address = 00:1c:00:00
Mfg Date = 00/00/00
Rework Date = 00/00/00
Revision No =

Version :
=======
Firmware Package Build = 50.6.3-0109
**Firmware Version = 5.060.01-2262**
SBR Version = 5.0600.03-0394
Boot Block Version = 7.02.00.00-0017
Bios Version = 7.06.02.2_0x07060502
HIIA Version = 07.06.08.03
NVDATA Version = 5.0600.03-0013
Driver Name = lsi_mr3
Driver Version = 7.708.07.00
...

/opt/lsi/storcli/storcli /c1 show all

Generating detailed summary of the adapter, it may take a while to complete.

CLI Version = 007.1506.0000.0000 Aug 11, 2020
Operating system = VMkernel 6.7.0
Controller = 1
Status = Success
Description = None

Basics :
======
Controller = 1
Model = AVAGO MegaRAID SAS 9480-8i8e
Serial Number = SP93101037
Current Controller Date/Time = 11/17/2020, 14:26:03
Current System Date/time = 11/17/2020, 14:26:06
SAS Address = 500062b204c41180
PCI Address = 00:5e:00:00
Mfg Date = 08/05/19
Rework Date = 00/00/00
Revision No = 15006

Version :
=======
Firmware Package Build = 51.14.0-3626
Firmware Version = 5.140.00-3319
CPLD Version = 07221-021
SBR Version = 5.1400.00-0466
Boot Block Version = 7.02.00.00-0021
Bios Version = 7.14.00.0_0x070E0202
HII Version = 07.14.06.02
HIIA Version = 07.14.06.02
NVDATA Version = 5.1400.00-0007
Driver Name = lsi_mr3
Driver Version = 7.708.07.00
...

String Firmware Version contains needed data of FW version that installed on controller. The only data that I can get from ESXi console with esxcli was only Firmware Package Build (without correct vmhba model name) with command:

esxcli storage san sas list

   Device Name: vmhba2
   SAS Address: 52:4a:52:c0:8c:aa:10:00
   Physical ID: 0
   Minimum Link Rate: 0 Mbps
   Maximum Link Rate: 0 Mbps
   Negotiated Link Rate: 0 Mbps
   Model Description:
   Hardware Version:
   OptionROM Version:
   Firmware Version: 50.6.3-0109
   Driver Name: lsi_mr3
   Driver Version: 7.708.07.00

   Device Name: vmhba5
   SAS Address: 50:00:62:b2:04:c4:11:80
   Physical ID: 0
   Minimum Link Rate: 0 Mbps
   Maximum Link Rate: 0 Mbps
   Negotiated Link Rate: 0 Mbps
   Model Description:
   Hardware Version:
   OptionROM Version:
   Firmware Version: 51.14.0-3626
   Driver Name: lsi_mr3
   Driver Version: 7.708.07.00

Maybe there is something that we can do about this ? Or there is only method to fork IODevice module and create additional conditions with finding that match MegaRAID with $pciDevice.DeviceName -match "MegaRAID" and use storcli if it is available with construction like :

/opt/lsi/storcli/storcli /c0 show all | grep "Firmware Version = " | awk '{print $4}'
5.060.01-2262
IonutDanNica commented 4 years ago

Might be besides the point but there is an easier way to work with storcli. If you add J to any storcli command if will output into json format. This can easily be converted into powershell object using convertfrom-json

This way you do not need to parse text.

That being said, I tested the esxcli command on my end and for 6.7 san was list will give package version, for 7.x releases it provides the expected firmware version.