Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions source/ext/spellchecking/wordlists/opennebula.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ conf
config
cooldown
cpu
cpuset
cputune
cryptographic
css
customizable
Expand Down Expand Up @@ -329,6 +331,7 @@ edk
ee
eebc
eht
emulatorpin
entrypoint
epilog
eth
Expand Down
13 changes: 12 additions & 1 deletion source/management_and_operations/vm_management/vm_instances.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,21 @@ and details about it can be obtained with ``show``:
Searching for VM Instances
--------------------------------------------------------------------------------

You can search for VM instances by using the ``--search`` option of the ``onevm list`` command. This is specially useful on large environments with many VMs. The filter must be in a ``VM.KEY1=VALUE1&VM.KEY2=VALUE2`` format and will return all the VMs which fit the filter. The ``&`` works as logical AND. You can use ``*=VALUE`` to search the full VM body.
You can search for VM instances by using the ``--search`` option of the ``onevm list`` command. This is specially useful on large environments with many VMs. The filter must be in a ``VM.KEY1=VALUE1&VM.KEY2=VALUE2`` format and will return all the VMs which fit the filter. The ``&`` works as logical AND. You can use ``*=VALUE`` to search the full VM body or ``VM.TEMPLATE=VALUE`` to search whole template.

Searching is performed using JSON on the whole body of the VM. You can use the MySQL JSON path without the leading ``$.``, information about the path structure can be found in the [MySQL Documentation](https://dev.mysql.com/doc/refman/5.7/en/json.html#json-path-syntax) or [MariaDB Documentation](https://mariadb.com/kb/en/jsonpath-expressions/). Currently, the value is wrapped in ``%`` for the query, so it will match if it contains the value provided.

The ``VALUE`` part of a search query can utilize special characters to create flexible matching patterns:

* ``%``: Matches any string, allowing for wildcard searches. For example, ``a%a%a`` matches names containing three "a"s in any position, with any number of characters between them.
* ``_``: Matches any single character, enabling precise pattern matching. For instance, ``a_a_a`` matches names with three "a"s, each separated by exactly one character.
* ``&``: Cannot be used in the ``VALUE`` part of the search query, as it is always interpreted as logical AND operator and does not support escaping.

To search for strings that contain ``%`` or ``_`` literally, escape these characters with a backslash ``\``. For example:

* ``a\%a`` will search for "a%a" as an exact sequence.
* ``a\_a`` will match "a_a" without interpreting ``_`` as a single-character wildcard.

For example, for searching a VM with a specific MAC address:

.. prompt:: text $ auto
Expand Down
Loading
Loading