1.2. Search

The Administration Portal environment is designed to enable the management of thousands of resources, such as virtual machines, hosts, users, and more. When managing the virtual desktop environment, it is recommended that large lists of resources, such as virtual machines, are reduced to a manageable number (for example, 10). This allows tasks to be performed on the smaller list, or to select specific items on the list on which to perform a given task.
To perform a search, enter the search query (free-text or syntax-based) in the Search Bar at the top of the Administration Portal. Search queries can be saved as a Bookmarks for future reuse (Section 1.2.2, “Saving and Accessing Queries as Bookmarks”). This eliminates the need to reenter a search query each time the specific search results are needed.

1.2.1. Search Syntax

The syntax of the search queries for Red Hat Enterprise Virtualization resources is as follows:
result-type: {criteria} [sortby sort_spec]
Syntax Examples
The following examples describe how the search query is used and help you to understand how Red Hat Enterprise Virtualization assists with building search queries.

Table 1.1. Example Search Queries

Example Result
Hosts: Vms.status = up Displays a list of all hosts running virtual machines that are up.
Vms: domain = qa.company.com Displays a list of all virtual machines running on the specified domain.
Vms: users.name = Mary Displays a list of all virtual machines belonging to users with the username Mary.
Events: severity > normal sortby time Displays the list of all Events whose severity is higher than Normal, sorted by time. Auto-Completion

The Administration Portal provides auto-completion to help you create valid and powerful search queries. As you type each part of a search query, a drop-down list of choices for the next part of the search opens below the Search Bar. You can either select from the list and then continue typing/selecting the next part of the search, or ignore the options and continue entering your query manually.
The following table specifies by example how the Administration Portal auto-completion assists in constructing a query:
Hosts: Vms.status = down

Table 1.2. Example Search Queries Using Auto-Completion

Input List Items Displayed Action
h Hosts (1 option only)
Select Hosts or;
Type Hosts
All host properties
Type v
Hosts: v host properties starting with a v Select Vms or type Vms
Hosts: Vms All virtual machine properties Type s
Hosts: Vms.s All virtual machine properties beginning with s Select status or type status
Hosts: Vms.status
Select or type =
Hosts: Vms.status = All status values Select or type down Result-Type Options

The Result-type allows you to search for resources of any of the following types:
  • Vms for a list of virtual machines
  • Host for a list of hosts
  • Pools for a list of pools
  • Template for a list of templates
  • Event for a list of events
  • Users for a list of users
  • Cluster for a list of clusters
  • Datacenter for a list of data centers
  • Storage for a list of storage domains
As each type of resource has a unique set of properties and a set of other resource types that it is associated with, each search type has a set of valid syntax combinations. These are specified in Appendix E, Search Parameters. However, using the auto-complete feature will help you to create valid queries easily. Search Criteria

You can specify the search criteria after the colon in the query. The syntax of {criteria} is as follows:
<prop> <operator> <value>
<obj-type> <prop> <operator> <value>
The following table describes the parts of the syntax:

Table 1.3. Example Search Criteria

Part Description Values Example Note
prop The property of the searched-for resource. Can also be the property of a resource type (see obj-type), or tag (custom tag). See the information for each of the search types in Section, “Wildcards and Multiple Criteria” Status --
obj-type A resource type that can be associated with the searched-for resource. See the explanation of each of the search types in Section, “Wildcards and Multiple Criteria” Users --
operator Comparison operators.
!= (not equal)
-- Value options depend on obj-type.
Value What the expression is being compared to.
Date (formatted according to Regional Settings)
  • Wildcards can be used within strings.
  • "" (two sets of quotation marks with no space between them) can be used to represent an un-initialized (empty) string.
  • Double quotes should be used around a string or date containing spaces Wildcards and Multiple Criteria
Wildcards can be used in the <value> part of the syntax for strings. For example, to find all users beginning with m, enter m*.
You can perform a search having two criteria by using the Boolean operators AND and OR. For example:
Vms: users.name = m* AND Vms.status = Up
This query returns all running virtual machines for users whose names begin with "m".
Vms: users.name = m* AND Vms.tag = "paris-loc"
This query returns all virtual machines tagged with "paris-loc" for users whose names begin with "m".
When two criteria are specified without AND or OR, AND is implied. AND precedes OR, and OR precedes implied AND. Determining Sort Order

You can determine the sort order of the returned information by using sortby. Sort direction (asc for ascending, desc for descending) can be included.
For example:
events: severity > normal sortby time desc
This query returns all Events whose severity is higher than Normal, sorted by time (descending order).