Automation

 View Only
  • 1.  VMkernel Name is no more visible on the PCI list when we run the esxcli hardware command in vSphere Version 8

    Posted Sep 12, 2024 02:25 AM

    Can you suggest any alternative way to find the VMkernel Name as we are unable to fetch the detail as we are unable to fetch the details from the below commands. Please suggest any alternative 

    $esxcli2 = Get-EsxCli -VMHost $vmhost -V2

    $esxcli2.hardware.pci.list.Invoke()

    As we are trying to fetch the data using the above commands.
    Write-Host "`tGathering information from $vmhost ..."
            $pciDevices = $esxcli2.hardware.pci.list.Invoke() | Where-Object {$_.VMKernelName -like "vmhba*" -or $_.VMKernelName -like "vmnic*" -or $_.VMKernelName -like "vmgfx*" } | Sort-Object -Property VMKernelName 
            foreach ($pciDevice in $pciDevices) {
                $device = $vmhost | Get-VMHostPciDevice | Where-Object { $pciDevice.Address -match $_.Id }
                #Write-Output -Message ((Get-Date -Format G) + "`tGet driver version for: " + $pciDevice.ModuleName)
                $driverVersion = $esxcli2.system.module.get.Invoke(@{module = $pciDevice.ModuleName}) | Select-Object -ExpandProperty Version -ErrorAction SilentlyContinue



  • 2.  RE: VMkernel Name is no more visible on the PCI list when we run the esxcli hardware command in vSphere Version 8

    Posted Sep 12, 2024 04:38 AM

    Did you try with ModuleName?

    $esxcli2 = Get-EsxCli -VMHost $vmhost -V2
    
    $esxcli2.hardware.pci.list.Invoke()
    
    $pciDevices = $esxcli2.hardware.pci.list.Invoke() |
      Where-Object { $_.ModuleName -like "vmhba*" -or
                   $_.ModuleName -like "vmnic*" -or
                   $_.ModuleName -like "vmgfx*" } |
      Sort-Object -Property ModuleName
    foreach ($pciDevice in $pciDevices) {
      $device = $vmhost | Get-VMHostPciDevice | 
        Where-Object { $pciDevice.Address -match $_.Id }
      $driverVersion = $esxcli2.system.module.get.Invoke(@{module = $pciDevice.ModuleName }) | 
      Select-Object -ExpandProperty Version -ErrorAction SilentlyContinue
    }


    ------------------------------


    Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference


    ------------------------------



  • 3.  RE: VMkernel Name is no more visible on the PCI list when we run the esxcli hardware command in vSphere Version 8

    Posted 30 days ago
    Edited by Avesh Sampara 30 days ago

    Hi LucD,

    Yes tried it and still it show the empty entries as the modules names are populating as lpfc or with the network module names as mentioned below. 

    ModuleName            : i40en or ModuleName            : lpfc.

    We are unable to filter with below command. 

    $esxcli2 = Get-EsxCli -VMHost $vmhost -V2


    $pciDevices = $esxcli2.hardware.pci.list.Invoke() |
      Where-Object { $_.ModuleName -like "vmhba*" -or
                   $_.ModuleName -like "vmnic*" -or
                   $_.ModuleName -like "vmgfx*" } |
      Sort-Object -Property ModuleName
    foreach ($pciDevice in $pciDevices) {
      $device = $vmhost | Get-VMHostPciDevice | 
        Where-Object { $pciDevice.Address -match $_.Id }
      $driverVersion = $esxcli2.system.module.get.Invoke(@{module = $pciDevice.ModuleName }) | 
      Select-Object -ExpandProperty Version -ErrorAction SilentlyContinue
    }

    Can you confirm if the VMKernel Name is deprecated in vSphere version 8 ? 




  • 4.  RE: VMkernel Name is no more visible on the PCI list when we run the esxcli hardware command in vSphere Version 8

    Posted 30 days ago

    Seems to work for me in vSphere 8.*



    ------------------------------


    Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference


    ------------------------------



  • 5.  RE: VMkernel Name is no more visible on the PCI list when we run the esxcli hardware command in vSphere Version 8

    Posted 30 days ago

    When I run the below command on the ESXi version VMware ESXi, 8.0.2, 23305546.
    Address               : 0000:5b:00.3
    Bus                   : 91
    Chassis               : 0
    ConfiguredOwner       : VMkernel
    CurrentOwner          : VMkernel
    DependentDevice       : PCI 0:91:0:3
    DeviceClass           : 512
    DeviceClassName       : Ethernet controller
    DeviceID              : 5631
    DeviceLayerBusAddress : s00000005.03
    DeviceName            : Ethernet Controller X710 for 10GBASE-T
    FPTSharable           : true
    Flags                 : 12289
    Function              : 3
    HardwareLabel         : 
    IRQ                   : 255
    InterruptLine         : 255
    InterruptVector       : 0
    ModuleID              : 63
    ModuleName            : i40en
    NUMANode              : 1
    PCIPin                : 0
    ParentDevice          : PCI 0:90:0:0
    PassthruCapable       : true
    PhysicalSlot          : 5
    ProgrammingInterface  : 0
    ResetMethod           : Function reset
    RevisionID            : 2
    Segment               : 0
    Slot                  : 0
    SlotDescription       : PCIe Slot 5
    SpawnedBus            : 0
    SubDeviceID           : 0
    SubVendorID           : 32902
    VMkernelName          : 
    VendorID              : 32902
    VendorName            : Intel(R)
    VirtualFunction       : 

    Not sure if it is a problem with this specific version of ESXi 8.0.2c 




  • 6.  RE: VMkernel Name is no more visible on the PCI list when we run the esxcli hardware command in vSphere Version 8

    Posted 28 days ago

    I suggest opening an SR



    ------------------------------


    Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference


    ------------------------------



  • 7.  RE: VMkernel Name is no more visible on the PCI list when we run the esxcli hardware command in vSphere Version 8

    Posted 20 days ago

    LucD has helped me heaps in the past however there were things he tried to help me with which did not work for me, and the reason for this is that he is using vSphere 8 while I'm on vSphere 7.

    To get the VMkernels from vCenter 7, I normally run this command:

    Get-VMHostNetworkAdapter -VMKernel -VMHost MyHostName| Sort-Object DeviceName | format-list

    PS: The code you're using is to extract the PCI details from the host- is this what you need? Are you trying to establish which VMkernel is attached to which PCI address (vmnic)?