Solutions > Search for objects in Virtualization Manager > Search query examples

Use named fields in search queries

You can use named fields to search the attributes associated with VMs, hosts, data stores, clusters, and applications. Named fields add attribute filters to the search language. You can enter named fields by specifying the exact property to target in the search. Searches for named fields use the syntax:

The CI_TYPE can be:

  • VM
  • Host
  • Cluster
  • Datastore

Not all properties have a sub-property, so many named field searches use the syntax CI_TYPE.PROPERTY:VALUE.

In named fields, you can use more complex structures based on dot notation hierarchies. Named fields can also be composed of query sub-clauses and any other additional search language features.

If a named field value contains special characters, such as spaces, that value must be enclosed in quotes.

Example search queries using named fields

search query results
vm.cpuCount:2 AND vm.memory:1024

Virtual machines with two CPUs and 1024 MBs of memory as configured.

The use of MBs as the unit of measure for the memory field is specific to the named field implementation.

vm.environmentFor.networkAdapters.defaultGateway.ipV4Address: Virtual machines for which the default gateway of the network adapter is set to
vm.cpuCount:2 AND vm.memory:(1024 OR 2048) Virtual machines with two CPUs and 1024 or 2048 MBs of memory as configured.
vm.environmentFor.diskVolume.label:"Hard Disk 1" Disk drives labeled "Hard Disk 1".

See the list of named fields and their descriptions for more examples.