When the VMWare Infrastructure Infrastructure inventory task is run on an ESX or a vCenter server, what commands are executed?
When the VMWare Infrastructure inventory task is run on an ESX or a vCenter server, what commands are executed?
Assuming you use an account with read access (only permissions prerequisite for ESX) there are no commands as such that are executed, instead we use the built-in VMWare API to gather inventory.
After logon, the major queries are:
GetServiceContent ? a single call to retrieve the ServiceInstance to enable further queries
RetrieveProperties ? a single call, starting from the root folder and returning all HostSystem, Datacenter, Folder, ComputeResource and ClusterComputeResource objects (with 2-5 associated property values each) via recursive traversal specifications on:
Folder.childEntity to the above object types
Then for each HostSystem returned, an additional RetrieveProperties call, starting from the respective HostSystem object and returning all related VirtualMachine and ResourcePool objects (with 4 associated property values each) via recursive traversal specifications on:
We use the base version 2.0 VSphere SOAP API for the most part, with one additional call per host and cluster to a later API method RetrievePropertiesEx to retrieve specific additional properties not available from the 2.0 API.