vm

vm - management user interface

Synopsis

vm [ OPTION ]... [ COMMAND_STRING ]

vm [ OPTION ]... COMMAND [ ARG ]...

Description

The vm utility serves as the primary tool for administering guest domains within a virtual machine environment. Its functionalities include domain creation, pausing, and shutdown, as well as listing existing domains. Libvirt, an open-source C toolkit, facilitates interaction with virtualization features present in contemporary Linux distributions and other operating systems. Licensed under the GNU Lesser General Public License, it enables the management of multiple operating system instances concurrently on a single hardware system, with resource allocation controlled by a Linux instance. This library is designed to offer a durable, consistent C API for long-term use.

The basic structure of most vm usage is:

vm [OPTION]... <command> <domain> [ARG]...

Where command represents one of the commands listed below; domain refers to the numeric domain ID, domain name, or domain UUID; and ARGS denote command-specific options. There are a few exceptions to this rule in cases where the command affects all domains, the entire machine, or the Xen hypervisor directly. These exceptions will be clearly outlined for each of those commands.

Assigning numeric names to domains is allowed, but doing so will result in a domain that can only be identified by its domain ID. In other words, if a numeric value is supplied, it will be interpreted as a domain ID, not as a name.

The vm utility offers two primary modes of operation:

  1. Single Command Execution: Users can execute a single COMMAND by specifying the command along with its arguments directly on the shell command line.

  2. Command String Execution: Alternatively, users can execute a sequence of COMMAND actions and their arguments by providing a COMMAND_STRING. This COMMAND_STRING is a single shell argument composed of multiple commands and their arguments, separated by whitespace and semicolons.

In the COMMAND_STRING, vm interprets single, double, and backslash escapes similarly to the shell. However, it’s important to note that when constructing the single shell argument for the COMMAND_STRING, an additional layer of shell escaping is necessary.

If no command is provided on the command line, vm initializes a minimal interpreter, awaiting user input. Typing the quit command within this interpreter will exit the program.

The vm utility understands the following OPTIONS.

-h, --help
    Ignore all other arguments, and behave as if the help command were given instead. 
-v, --version[=short]
    Ignore all other arguments, and prints the version of the libvirt library virsh is coming from 
-V, --version=long
    Ignore all other arguments, and prints the version of the libvirt library virsh is coming from and which options and driver are compiled in. 
-c, --connect URI
    Connect to the specified URI , as if by the connect command, instead of the default connection. 
-d, --debug LEVEL
    Enable debug messages at integer LEVEL and above. LEVEL can range from 0 to 4 (default). See the documentation of VIRSH_DEBUG environment variable below for the description of each LEVEL . 
-l, --log FILE
    Output logging details to FILE . 
-q, --quiet
    Avoid extra informational messages. 
-r, --readonly
    Make the initial connection read-only, as if by the --readonly option of the connect command. 
-t, --timing
    Output elapsed time information for each command. 
-e, --escape string
    Set alternative escape sequence for console command. By default, telnet's ^] is used. Allowed characters when using hat notation are: alphabetic character, @, [, ], \, ^, _.