Report the PCI Device Hierarchy By Using Parent DeviceIDs
This example describes a simple way to enumerate the PCI devices present in the managed server. This information is useful to system administrators who want to troubleshoot device problems or upgrade the hardware in a managed server.
The PCI Device profile specification allows flexibility in how the profile is implemented. Designers can apply one of three approaches to modeling PCI device connections, or they can combine these approaches for a more complete implementation. Device connections can be modeled with a combination of the following approaches.
- DeviceConnection associations
- PCIPortGroup instances that express relationships between PCI ports
- Primary and secondary bus numbers that relate PCI devices to bridges and switches
The VMware implementation supports the first two modeling approaches. For an example that uses the second approach to relating PCI devices, see Report the Path to a PCI Device By Using PortGroups.
For convenience, the VMware implementation also provides a fourth way to model device connections: ParentDeviceID.
The ParentDeviceID property relates a PCI device directly to the bridge or switch through which the device accesses the CPU. The value of the property is the value of the DeviceID property of that bridge or switch, which can be called its parent device. A CIM client that is aware of the ParentDeviceID property can map the hierarchy of PCI devices by using only that property to determine the relationships between devices.
This example shows how you can map the PCI device hierarchy by using the ParentDeviceID property. For illustration, this example enumerates PCI device instances by their VMware-specific class names, rather than by a parent class. Alternatively, you could enumerate the CIM_PCIDevice class, because all three of the VMware classes derive, directly or indirectly, from that class, as shown in Inheritance Relationships of PCI Device Classes.

This pseudocode depends on the pseudocode in Make a Connection to the CIMOM.
To report the PCI device hierarchy