Automation

 View Only
  • 1.  Get HBA and NIC info

    Posted Apr 17, 2009 11:54 AM

    Hello all together,

    I'm trying to get the following info of the ESX server, but i think i do wrong:

    I want to get the the vendor and model of each HBA and also the NICs of the ESX host. I tried e.g. Config.StorageDevice.HostBusAdapter but no info appears.

    Can anybody help me in this case?

    Thanks a lot!



  • 2.  RE: Get HBA and NIC info

    Posted Apr 17, 2009 12:15 PM

    From the HostSystem object loop through the Hardware.[PciDevice|http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/vim.host.PciDevice.html] array.

    For each PCI device you should see vendor and the model.



  • 3.  RE: Get HBA and NIC info

    Posted Apr 20, 2009 07:11 AM

    Hello LucD,

    thanks a lot. Can you please give me a short example. I think I tried wrong. Thanks!



  • 4.  RE: Get HBA and NIC info

    Posted Apr 20, 2009 08:23 AM

    You can do something like this

    $esx = Get-VMHost <ESX-hostname> | Get-View
    foreach($pci in $esx.Hardware.PciDevice){
      Write-Host $pci.VendorName $pci.DeviceName $pci.DeviceId
    }