With the vCenter Server plug-in for vRealize Orchestrator, you can query the vCenter Server inventory for specific objects.

Querying Methods

For querying, you can either use the vCSearchIndex managed object, or the object finder methods that are included in the plug-in inventory, such as getAllDatastores(), getAllVirtualMachines(), findAllForType(), and others.


By default, both methods return the queried objects without including any of their properties, unless you specify a set of properties as an argument for the method parameters in the search query.
Note: You must always use query expressions with the getAll...() and findAll...() finder objects to prevent the Orchestrator client from filtering large sets of returned objects, which might affect the overall performance of the Orchestrator server.
You can use two types of expressions for querying the vCenter Server inventory.
Type of Expression Description
Name expressions You can specify a name as an argument for a query parameter.
Note: The objects are filtered by the specified name argument according to the name of the plug-in object as it is appears in the vCenter Server plug-in inventory.
XPath expressions You can use expressions based on the XPath query language. For more information, see Using XPath Expressions with the vCenter Server Plug-In.

When you invoke a vCenter Server inventory object with custom properties, each reference to this object, in a workflow or an action, sends a query to the vCenter Server, which generates a noticeable performance overhead. To optimize performance and avoid serializing and deserializing the object multiple times within a workflow run, it is best to use a shared resource to store the object, instead of storing it as a workflow attribute, an input, or an output parameter. Such shared resource can be a configuration element or a resource element.