Q209357: What commands are run during inventory of an ESX server?

Question

When the VMWare Infrastructure inventory task is run on an ESX server, what commands are executed?

Answer

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:
  1. GetServiceContent - a single call to retrieve the ServiceInstance to enable further queries
  2. 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:
    1. ComputeResource.host
    2. ClusterComputeResource.host
    3. Datacenter.hostFolder
    4. Datacenter.vmFolder
    5. Folder.childEntity to the above object types
  3. 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:
    1. HostSystem.parent
    2. ComputeResource.resourcePool
    3. ResourcePool.resourcePool
    4. ResourcePool.vm

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.

Comments

Powered by Zendesk