1.3. Searches
1.3.1. Performing Searches in Red Hat Virtualization
The Administration Portal allows you to manage thousands of resources, such as virtual machines, hosts, users, and more. To perform a search, enter the search query (free-text or syntax-based) into the search bar, available on the main page for each resource. Search queries can be saved as bookmarks for future reuse, so you do not have to reenter a search query each time the specific search results are required. Searches are not case sensitive.
1.3.2. Search Syntax and Examples
The syntax of the search queries for Red Hat 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 Virtualization assists with building search queries.
Example | Result |
---|---|
Hosts: Vms.status = up page 2 | Displays page 2 of 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 user name Mary. |
Events: severity > normal sortby time | Displays the list of all Events whose severity is higher than Normal, sorted by time. |
1.3.3. Search 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
Input | List Items Displayed | Action |
---|---|---|
h |
|
Select |
Hosts: | All host properties | Type v |
Hosts: v |
host properties starting with a |
Select |
Hosts: Vms | All virtual machine properties | Type s |
Hosts: Vms.s |
All virtual machine properties beginning with |
Select |
Hosts: Vms.status |
| Select or type = |
Hosts: Vms.status = | All status values | Select or type down |
1.3.4. Search 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
- Events 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. You can also use the auto-complete feature to create valid queries easily.
1.3.5. Search Criteria
You can specify the search criteria after the colon in the query. The syntax of {criteria}
is as follows:
<prop><operator><value>
or
<obj-type><prop><operator><value>
Examples
The following table describes the parts of the syntax:
Part | Description | Values | Example | Note |
---|---|---|---|---|
prop |
The property of the searched-for resource. Can also be the property of a resource type (see | Limit your search to objects with a certain property. For example, search for objects with a status property. | Status | N/A |
obj-type | A resource type that can be associated with the searched-for resource. | These are system objects, like data centers and virtual machines. | Users | N/A |
operator | Comparison operators. | = != (not equal) > < >= <= | N/A | Value options depend on property. |
Value | What the expression is being compared to. | String Integer Ranking Date (formatted according to Regional Settings) | Jones 256 normal |
|
1.3.6. Search: Multiple Criteria and Wildcards
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 status = Up
This query returns all running virtual machines for users whose names begin with "m".
Vms: users.name = m* AND 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
.
1.3.7. Search: Determining Search 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).
1.3.8. Searching for Data Centers
The following table describes all search options for Data Centers.
Property (of resource or resource-type) | Type | Description (Reference) |
---|---|---|
| Depends on property type | The property of the clusters associated with the data center. |
| String | The name of the data center. |
| String | A description of the data center. |
| String | The type of data center. |
| List | The availability of the data center. |
| List | Sorts the returned results by one of the resource properties. |
| Integer | The page number of results to display. |
Example
Datacenter: type = nfs and status != up
This example returns a list of data centers with a storage type of NFS and status other than up.
1.3.9. Searching for Clusters
The following table describes all search options for clusters.
Property (of resource or resource-type) | Type | Description (Reference) |
---|---|---|
| Depends on property type | The property of the data center associated with the cluster. |
| String | The data center to which the cluster belongs. |
| String | The unique name that identifies the clusters on the network. |
| String | The description of the cluster. |
| String | True or False indicating the status of the cluster. |
| List | Sorts the returned results by one of the resource properties. |
| Integer | The page number of results to display. |
Example
Clusters: initialized = true or name = Default
This example returns a list of clusters which are initialized or named Default.
1.3.10. Searching for Hosts
The following table describes all search options for hosts.
Property (of resource or resource-type) | Type | Description (Reference) |
---|---|---|
| Depends on property type | The property of the virtual machines associated with the host. |
| Depends on property type | The property of the templates associated with the host. |
| Depends on property type | The property of the events associated with the host. |
| Depends on property type | The property of the users associated with the host. |
| String | The name of the host. |
| List | The availability of the host. |
| String | The health status of the host as reported by external systems and plug-ins. |
| String | The cluster to which the host belongs. |
| String | The unique name that identifies the host on the network. |
| Integer | The percent of processing power used. |
| Integer | The percentage of memory used. |
| Integer | The percentage of network usage. |
| Integer | Jobs waiting to be executed in the run-queue per processor, in a given time slice. |
| Integer | The version number of the operating system. |
| Integer | The number of CPUs on the host. |
| Integer | The amount of memory available. |
| Integer | The processing speed of the CPU. |
| String | The type of CPU. |
| Integer | The number of virtual machines currently running. |
| Integer | The number of virtual machines currently being migrated. |
| Integer | The percentage of committed memory. |
| String | The tag assigned to the host. |
| String | The type of host. |
| String | The data center to which the host belongs. |
| List | Sorts the returned results by one of the resource properties. |
| Integer | The page number of results to display. |
Example
Hosts: cluster = Default and Vms.os = rhel6
This example returns a list of hosts which are part of the Default cluster and host virtual machines running the Red Hat Enterprise Linux 6 operating system.
1.3.11. Searching for Networks
The following table describes all search options for networks.
Property (of resource or resource-type) | Type | Description (Reference) |
---|---|---|
| Depends on property type | The property of the cluster associated with the network. |
| Depends on property type | The property of the host associated with the network. |
| String | The human readable name that identifies the network. |
| String | Keywords or text describing the network, optionally used when creating the network. |
| Integer | The VLAN ID of the network. |
| String | Whether Spanning Tree Protocol (STP) is enabled or disabled for the network. |
| Integer | The maximum transmission unit for the logical network. |
| String | Whether the network is only used for virtual machine traffic. |
| String | The data center to which the network is attached. |
| List | Sorts the returned results by one of the resource properties. |
| Integer | The page number of results to display. |
Example
Network: mtu > 1500 and vmnetwork = true
This example returns a list of networks with a maximum transmission unit greater than 1500 bytes, and which are set up for use by only virtual machines.
1.3.12. Searching for Storage
The following table describes all search options for storage.
Property (of resource or resource-type) | Type | Description (Reference) |
---|---|---|
| Depends on property type | The property of the hosts associated with the storage. |
| Depends on property type | The property of the clusters associated with the storage. |
| String | The unique name that identifies the storage on the network. |
| String | The status of the storage domain. |
| String | The health status of the storage domain as reported by external systems and plug-ins. |
| String | The data center to which the storage belongs. |
| String | The type of the storage. |
| Integer | The size (GB) of the free storage. |
| Integer | The amount (GB) of the storage that is used. |
| Integer | The total amount (GB) of the storage that is available. |
| Integer | The amount (GB) of the storage that is committed. |
| List | Sorts the returned results by one of the resource properties. |
| Integer | The page number of results to display. |
Example
Storage: free_size > 6 GB and total_size < 20 GB
This example returns a list of storage with free storage space greater than 6 GB, or total storage space less than 20 GB.
1.3.13. Searching for Disks
The following table describes all search options for disks.
You can use the Disk Type
and Content Type
filtering options to reduce the number of displayed virtual disks.
Property (of resource or resource-type) | Type | Description (Reference) |
---|---|---|
| Depends on property type | The property of the data centers associated with the disk. |
| Depends on property type | The property of the storage associated with the disk. |
| String | The human readable name that identifies the storage on the network. |
| String | Keywords or text describing the disk, optionally used when creating the disk. |
| Integer | The virtual size of the disk. |
| Integer | The size of the disk. |
| Integer | The actual size allocated to the disk. |
| Integer | The date the disk was created. |
| String |
Whether the disk can or cannot be booted. Valid values are one of |
| String |
Whether the disk can or cannot be attached to more than one virtual machine at a time. Valid values are one of |
| String |
The format of the disk. Can be one of |
| String |
The status of the disk. Can be one of |
| String |
The type of the disk. Can be one of |
| Integer | The number of virtual machine(s) to which the disk is attached. |
| String | The name(s) of the virtual machine(s) to which the disk is attached. |
| String | The name of the quota enforced on the virtual disk. |
| List | Sorts the returned results by one of the resource properties. |
| Integer | The page number of results to display. |
Example
Disks: format = cow and provisioned_size > 8
This example returns a list of virtual disks with QCOW format and an allocated disk size greater than 8 GB.
1.3.14. Searching for Volumes
The following table describes all search options for volumes.
Property (of resource or resource-type) | Type | Description (Reference) |
---|---|---|
| String | The name of the cluster associated with the volume. |
| Depends on property type (examples: name, description, comment, architecture) | The property of the clusters associated with the volume. |
| String | The human readable name that identifies the volume. |
| String | Can be one of distribute, replicate, distributed_replicate, stripe, or distributed_stripe. |
| Integer | Can be one of TCP or RDMA. |
| Integer | Number of replica. |
| Integer | Number of stripes. |
| String | The status of the volume. Can be one of Up or Down. |
| List | Sorts the returned results by one of the resource properties. |
| Integer | The page number of results to display. |
Example
Volume: transport_type = rdma and stripe_count >= 2
This example returns a list of volumes with transport type set to RDMA, and with 2 or more stripes.
1.3.15. Searching for Virtual Machines
The following table describes all search options for virtual machines.
Currently, the Network Label, Custom Emulated Machine, and Custom CPU Type properties are not supported search parameters.
Property (of resource or resource-type) | Type | Description (Reference) |
---|---|---|
| Depends on property type | The property of the hosts associated with the virtual machine. |
| Depends on property type | The property of the templates associated with the virtual machine. |
| Depends on property type | The property of the events associated with the virtual machine. |
| Depends on property type | The property of the users associated with the virtual machine. |
| Depends on the property type | The property of storage devices associated with the virtual machine. |
| Depends on the property type | The property of the vNIC associated with the virtual machine. |
| String | The name of the virtual machine. |
| List | The availability of the virtual machine. |
| Integer | The IP address of the virtual machine. |
| Integer | The number of minutes that the virtual machine has been running. |
| String | The domain (usually Active Directory domain) that groups these machines. |
| String | The operating system selected when the virtual machine was created. |
| Date | The date on which the virtual machine was created. |
| String | The unique name that identifies the virtual machine on the network. |
| Integer | The percent of processing power used. |
| Integer | The percentage of memory used. |
| Integer | The percentage of network used. |
| Integer | The maximum memory defined. |
| String | The applications currently installed on the virtual machine. |
| List | The cluster to which the virtual machine belongs. |
| List | The virtual machine pool to which the virtual machine belongs. |
| String | The name of the user currently logged in to the virtual machine. |
| List | The tags to which the virtual machine belongs. |
| String | The data center to which the virtual machine belongs. |
| List | The virtual machine type (server or desktop). |
| String | The name of the quota associated with the virtual machine. |
| String | Keywords or text describing the virtual machine, optionally used when creating the virtual machine. |
| List | Sorts the returned results by one of the resource properties. |
| Integer | The page number of results to display. |
| Boolean | The virtual machine has pending configuration changes. |
Example
Vms: template.name = Win* and user.name = ""
This example returns a list of virtual machines whose base template name begins with Win and are assigned to any user.
Example
Vms: cluster = Default and os = windows7
This example returns a list of virtual machines that belong to the Default cluster and are running Windows 7.
1.3.16. Searching for Pools
The following table describes all search options for Pools.
Property (of resource or resource-type) | Type | Description (Reference) |
---|---|---|
| String | The name of the pool. |
| String | The description of the pool. |
| List | The type of pool. |
| List | Sorts the returned results by one of the resource properties. |
| Integer | The page number of results to display. |
Example
Pools: type = automatic
This example returns a list of pools with a type of automatic
.
1.3.17. Searching for Templates
The following table describes all search options for templates.
Property (of resource or resource-type) | Type | Description (Reference) |
---|---|---|
| String | The property of the virtual machines associated with the template. |
| String | The property of the hosts associated with the template. |
| String | The property of the events associated with the template. |
| String | The property of the users associated with the template. |
| String | The name of the template. |
| String | The domain of the template. |
| String | The type of operating system. |
| Integer | The date on which the template was created. Date format is mm/dd/yy. |
| Integer | The number of virtual machines created from the template. |
| Integer | Defined memory. |
| String | The description of the template. |
| String | The status of the template. |
| String | The cluster associated with the template. |
| String | The data center associated with the template. |
| String | The quota associated with the template. |
| List | Sorts the returned results by one of the resource properties. |
| Integer | The page number of results to display. |
Example
Template: Events.severity >= normal and Vms.uptime > 0
This example returns a list of templates where events of normal or greater severity have occurred on virtual machines derived from the template, and the virtual machines are still running.
1.3.18. Searching for Users
The following table describes all search options for users.
Property (of resource or resource-type) | Type | Description (Reference) |
---|---|---|
| Depends on property type | The property of the virtual machines associated with the user. |
| Depends on property type | The property of the hosts associated with the user. |
| Depends on property type | The property of the templates associated with the user. |
| Depends on property type | The property of the events associated with the user. |
| String | The name of the user. |
| String | The last name of the user. |
| String | The unique name of the user. |
| String | The department to which the user belongs. |
| String | The group to which the user belongs. |
| String | The title of the user. |
| String | The status of the user. |
| String | The role of the user. |
| String | The tag to which the user belongs. |
| String | The pool to which the user belongs. |
| List | Sorts the returned results by one of the resource properties. |
| Integer | The page number of results to display. |
Example
Users: Events.severity > normal and Vms.status = up or Vms.status = pause
This example returns a list of users where events of greater than normal severity have occurred on their virtual machines AND the virtual machines are still running; or the users' virtual machines are paused.
1.3.19. Searching for Events
The following table describes all search options you can use to search for events. Auto-completion is offered for many options as appropriate.
Property (of resource or resource-type) | Type | Description (Reference) |
---|---|---|
| Depends on property type | The property of the virtual machines associated with the event. |
| Depends on property type | The property of the hosts associated with the event. |
| Depends on property type | The property of the templates associated with the event. |
| Depends on property type | The property of the users associated with the event. |
| Depends on property type | The property of the clusters associated with the event. |
| Depends on property type | The property of the volumes associated with the event. |
| List | Type of the event. |
| List | The severity of the event: Warning/Error/Normal. |
| String | Description of the event type. |
| List | Day the event occurred. |
| String | The user name associated with the event. |
| String | The host associated with the event. |
| String | The virtual machine associated with the event. |
| String | The template associated with the event. |
| String | The storage associated with the event. |
| String | The data center associated with the event. |
| String | The volume associated with the event. |
| Integer | The identification number of the event. |
| List | Sorts the returned results by one of the resource properties. |
| Integer | The page number of results to display. |
Example
Events: Vms.name = testdesktop and Hosts.name = gonzo.example.com
This example returns a list of events, where the event occurred on the virtual machine named testdesktop
while it was running on the host gonzo.example.com
.