VMware Cloud Community
ALTA2048
Contributor
Contributor
Jump to solution

VID , SID etc display issue

Hello All,

I hope everybody is ok.Here is my question:

$viewhostsystemblabla01 =  Get-View -viewtype hostsystem -filter @{ name = 'blabla01'}

$viewhostsystemblabla01.hardware.PciDevice

List of properties Name:

Bus

ClassId

DeviceId

DeviceName

Function

Id

ParentBridge

Slot

SubDeviceId

SubVendorId

VendorId

VendorName

Some of the Name for the following are  displayed in a specific format :

SubDeviceId

SubVendorId

VendorId

VendorName

I think it is related to this:

https://www.vmware.com/support/orchestrator/doc/vro-vsphere65-api/html/VcHostPciDevice.html

The vendor ID of this PCI.

The vendor ID might be a negative value. A vSphere Server uses an unsigned short integer to represent a PCI vendor ID. The WSDL representation of the ID is a signed short integer. If the vendor ID is greater than 32767, the Server will convert the ID to its two's complement for the WSDL representation. When you specify a PCI device vendor ID for a virtual machine ({@link vim.vm.device.VirtualPCIPassthrough.DeviceBackingInfo}.vendorId), you must use the retrieved {@link vim.host.PciDevice}.deviceId value. @since VI API 2.5

We would like to have another format , One that is  similar to this  : VMware Compatibility Guide - I/O Device Search

Sorry if this was posted before.

Regards

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You mean something like this?

Get-View -ViewType HostSystem -Filter @{ Name = 'blabla01'} |

ForEach-Object -Process {

    $_.Hardware.PciDevice |

    Select DeviceName,

        @{N='VendorId';E={"{0:x4}" -f [int16]$_.VendorId}},

        @{N='DeviceId';E={"{0:x4}" -f [int16]$_.DeviceId}}

}


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

View solution in original post

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

You mean something like this?

Get-View -ViewType HostSystem -Filter @{ Name = 'blabla01'} |

ForEach-Object -Process {

    $_.Hardware.PciDevice |

    Select DeviceName,

        @{N='VendorId';E={"{0:x4}" -f [int16]$_.VendorId}},

        @{N='DeviceId';E={"{0:x4}" -f [int16]$_.DeviceId}}

}


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

Reply
0 Kudos
ALTA2048
Contributor
Contributor
Jump to solution

That's it !

Thanks a million  LucD  and thanks  again for constantly  sharing with us

Reply
0 Kudos