Understanding the vCenter hierarchy

vCenter Hierarchy
vCenter Hierarchy (pdf)

VMware vCenter allows you to manage physical and virtual infrastructure in a datacenter. The pyvmomi SDK provides Python bindings that allow you to programmatically manage the inventory of that same infrastructure.

The inventory is managed as a collection of virtual datacenters. Each datacenter contains compute, data storage, and networking resources. Virtual machines and virtual applications can be created in these datacenters that consume these resources. Folders can be used to hierarchically group objects of the same type. The nested structure allows you to organize the objects in the datacenter into an easily manageable structure. Possible reasons include aligning with various functions and/or organizational structure.

The image above shows the hierarchy of objects in the vCenter inventory.

For many pyvmomi applications, the flow of applications is similar: connect to a vCenter server, get a service instance, and starting with the root folder, navigate the hierarchy. You can then perform various operations on these managed objects.