vm
On this page
vm
- management user interface
Synopsis
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:
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:
Single Command Execution: Users can execute a single
COMMAND
by specifying the command along with its arguments directly on the shell command line.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
.