Information Technology Reference
In-Depth Information
Basic command-line examples
CLI is an interactive shell, and the user can type in the required command and press Tab
for autocomplete just like we do in Linux bash. To get the list of commands after you login
to the CLI shell for the first time, press your Tab key twice. This will give you a list of all
the commands, as shown in the following code:
[RHEVM shell (connected)]#
EOF add connect disconnect exit
help info ping shell status
update action clear console echo
file history list remove show
summary
[RHEVM shell (connected)]#
As an example, to list the virtual machines, you can type in help for the specific com-
mand, and this will open a help page on how to run the command with different options to
get the output. Execute the following help command from the shell for VMS:
[RHEVM shell (connected)]# help list
[RHEVM shell (connected)]# help list vms
The output of the help list vms command is shown as follows:
This example lists all virtual machines:
$ list vms
- This example lists all virtual machines with all (not
empty) properties,
(by default only id/name/description properties
displayed, using
--show-all option, all not empty properties will be
displayed,
to see entire resource - use 'show' command)
$ list vms --show-all
- This example lists only virtual machines that have a
name that starts
with "myvm":
$ list vms --query "name=myvm*"
Search WWH ::




Custom Search