11 Replies Latest reply on Jan 9, 2019 6:24 AM by JedB

    Get HBA firmware and driver version for all ESXi hosts

    GabCava Novice

      Hello, as you probably know the only way to find out about HBA firmware and driver versions these days is by running:

       

      /usr/lib/vmware/vmkmgmt_keyval/vmkmgmt_keyval -d     to see which are the HBA devices, then

      /usr/lib/vmware/vmkmgmt_keyval/vmkmgmt_keyval -l -i vmhba1/qlogic     to actually retrieve the needed  info for a hba. In this particular case I get this precious data below:

       

      value:

      QLogic PCI to Fibre Channel Host Adapter for QMH2562:

              FC Firmware version 8.02.00 (90d5), Driver version 2.1.50.0

       

      which I need to retrieve from all my ESXi and save to a file. I enjoy writing simple powercli scripts but I'm puzzled about this one. I know that esxcli commands can be scripted too but what about this? I could script something with plink

       

       

      $plink = plink path

      $plinkAuth = " -v -pw $Pswd"

      $remoteCommand = '/usr/lib/vmware/vmkmgmt_keyval/vmkmgmt_keyval -l -i vmhba1/qlogic'

      $command = "Echo Yes| "+$plink + " " + $plinkAuth + " " + $User + "@" + $hostName + " " + $remoteCommand

      $result = Invoke-Expression -command $command

      $result

       

      but as the command above throws quite some stuff I don´t know how to grab only the data output I need and save it. Obviously this is to compare with vmware compatibility matrix later. Anyone did this? I already checked Re: Host Hardware info with HBA and nic driver information but the following values are returned blank, and not sure those match the  ones above that I need. I already added  the -V2 switch to the script of that post.

       

       

      Fnicvendor   :

      fnicdriver   :

      enicdriver   :

      Enicvendor   :