.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "VIRSH 1" .TH VIRSH 1 "2014-09-27" "libvirt-0.9.12.3" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" virsh \- management user interface .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBvirsh\fR [\fI\s-1OPTION\s0\fR]... [\fI\s-1COMMAND_STRING\s0\fR] .PP \&\fBvirsh\fR [\fI\s-1OPTION\s0\fR]... \fI\s-1COMMAND\s0\fR [\fI\s-1ARG\s0\fR]... .SH "DESCRIPTION" .IX Header "DESCRIPTION" The \fBvirsh\fR program is the main interface for managing virsh guest domains. The program can be used to create, pause, and shutdown domains. It can also be used to list current domains. Libvirt is a C toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). It is free software available under the \s-1GNU\s0 Lesser General Public License. Virtualization of the Linux Operating System means the ability to run multiple instances of Operating Systems concurrently on a single hardware system where the basic resources are driven by a Linux instance. The library aims at providing a long term stable C \s-1API\s0. It currently supports Xen, QEmu, \&\s-1KVM\s0, \s-1LXC\s0, OpenVZ, VirtualBox and VMware \s-1ESX\s0. .PP The basic structure of most virsh usage is: .PP .Vb 1 \& virsh [OPTION]... [ARG]... .Ve .PP Where \fIcommand\fR is one of the commands listed below, \fIdomain-id\fR is the numeric domain id, or the domain name (which will be internally translated to domain id), and \fI\s-1ARGS\s0\fR are command specific options. There are a few exceptions to this rule in the cases where the command in question acts on all domains, the entire machine, or directly on the xen hypervisor. Those exceptions will be clear for each of those commands. .PP The \fBvirsh\fR program can be used either to run one \fI\s-1COMMAND\s0\fR by giving the command and its arguments on the shell command line, or a \fI\s-1COMMAND_STRING\s0\fR which is a single shell argument consisting of multiple \fI\s-1COMMAND\s0\fR actions and their arguments joined with whitespace, and separated by semicolons between commands. Within \fI\s-1COMMAND_STRING\s0\fR, virsh understands the same single, double, and backslash escapes as the shell, although you must add another layer of shell escaping in creating the single shell argument. If no command is given in the command line, \fBvirsh\fR will then start a minimal interpreter waiting for your commands, and the \fBquit\fR command will then exit the program. .PP The \fBvirsh\fR program understands the following \fI\s-1OPTIONS\s0\fR. .IP "\fB\-h\fR, \fB\-\-help\fR" 4 .IX Item "-h, --help" Ignore all other arguments, and behave as if the \fBhelp\fR command were given instead. .IP "\fB\-v\fR, \fB\-\-version[=short]\fR" 4 .IX Item "-v, --version[=short]" Ignore all other arguments, and prints the version of the libvirt library virsh is coming from .IP "\fB\-V\fR, \fB\-\-version=long\fR" 4 .IX Item "-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. .IP "\fB\-c\fR, \fB\-\-connect\fR \fI\s-1URI\s0\fR" 4 .IX Item "-c, --connect URI" Connect to the specified \fI\s-1URI\s0\fR, as if by the \fBconnect\fR command, instead of the default connection. .IP "\fB\-d\fR, \fB\-\-debug\fR \fI\s-1LEVEL\s0\fR" 4 .IX Item "-d, --debug LEVEL" Enable debug messages at integer \fI\s-1LEVEL\s0\fR and above. \fI\s-1LEVEL\s0\fR can range from 0 to 4 (default). See the documentation of \fB\s-1VIRSH_DEBUG\s0\fR environment variable below for the description of each \fI\s-1LEVEL\s0\fR. .IP "\fB\-l\fR, \fB\-\-log\fR \fI\s-1FILE\s0\fR" 4 .IX Item "-l, --log FILE" Output logging details to \fI\s-1FILE\s0\fR. .IP "\fB\-q\fR, \fB\-\-quiet\fR" 4 .IX Item "-q, --quiet" Avoid extra informational messages. .IP "\fB\-r\fR, \fB\-\-readonly\fR" 4 .IX Item "-r, --readonly" Make the initial connection read-only, as if by the \fI\-\-readonly\fR option of the \fBconnect\fR command. .IP "\fB\-t\fR, \fB\-\-timing\fR" 4 .IX Item "-t, --timing" Output elapsed time information for each command. .IP "\fB\-e\fR, \fB\-\-escape\fR \fIstring\fR" 4 .IX Item "-e, --escape string" Set alternative escape sequence for \fIconsole\fR command. By default, telnet's \fB^]\fR is used. Allowed characters when using hat notation are: alphabetic character, @, [, ], \e, ^, _. .SH "NOTES" .IX Header "NOTES" Most \fBvirsh\fR operations rely upon the libvirt library being able to connect to an already running libvirtd service. This can usually be done using the command \fBinvoke\-rc.d libvirt-bin start\fR. .PP Most \fBvirsh\fR commands require root privileges to run due to the communications channels used to talk to the hypervisor. Running as non root will return an error. .PP Most \fBvirsh\fR commands act synchronously, except maybe shutdown, setvcpus and setmem. In those cases the fact that the \fBvirsh\fR program returned, may not mean the action is complete and you must poll periodically to detect that the guest completed the operation. .PP \&\fBvirsh\fR strives for backward compatibility. Although the \fBhelp\fR command only lists the preferred usage of a command, if an older version of \fBvirsh\fR supported an alternate spelling of a command or option (such as \fI\-\-tunnelled\fR instead of \fI\-\-tunneled\fR), then scripts using that older spelling will continue to work. .PP Several \fBvirsh\fR commands take an optionally scaled integer; if no scale is provided, then the default is listed in the command (for historical reasons, some commands default to bytes, while other commands default to kibibytes). The following case-insensitive suffixes can be used to select a specfic scale: b, byte byte 1 \s-1KB\s0 kilobyte 1,000 k, KiB kibibyte 1,024 \s-1MB\s0 megabyte 1,000,000 M, MiB mebibyte 1,048,576 \s-1GB\s0 gigabyte 1,000,000,000 G, GiB gibibyte 1,073,741,824 \s-1TB\s0 terabyte 1,000,000,000,000 T, TiB tebibyte 1,099,511,627,776 \s-1PB\s0 petabyte 1,000,000,000,000,000 P, PiB pebibyte 1,125,899,906,842,624 \s-1EB\s0 exabyte 1,000,000,000,000,000,000 E, EiB exbibyte 1,152,921,504,606,846,976 .SH "GENERIC COMMANDS" .IX Header "GENERIC COMMANDS" The following commands are generic i.e. not specific to a domain. .IP "\fBhelp\fR [\fIcommand-or-group\fR]" 4 .IX Item "help [command-or-group]" This lists each of the virsh commands. When used without options, all commands are listed, one per line, grouped into related categories, displaying the keyword for each group. .Sp To display only commands for a specific group, give the keyword for that group as an option. For example: .Sp .Vb 1 \& virsh # help host \& \& Host and Hypervisor (help keyword \*(Aqhost\*(Aq): \& capabilities capabilities \& connect (re)connect to hypervisor \& freecell NUMA free memory \& hostname print the hypervisor hostname \& qemu\-attach Attach to existing QEMU process \& qemu\-monitor\-command QEMU Monitor Command \& sysinfo print the hypervisor sysinfo \& uri print the hypervisor canonical URI .Ve .Sp To display detailed information for a specific command, give its name as the option instead. For example: .Sp .Vb 3 \& virsh # help list \& NAME \& list \- list domains \& \& SYNOPSIS \& list [\-\-inactive] [\-\-all] \& \& DESCRIPTION \& Returns list of domains. \& \& OPTIONS \& \-\-inactive list inactive domains \& \-\-all list inactive & active domains .Ve .IP "\fBquit\fR, \fBexit\fR" 4 .IX Item "quit, exit" quit this interactive terminal .IP "\fBversion\fR" 4 .IX Item "version" Will print out the major version info about what this built from. .RS 4 .Sp .RS 4 \&\fBExample\fR .Sp \&\fBvirsh\fR version .Sp Compiled against library: libvir 0.0.6 .Sp Using library: libvir 0.0.6 .Sp Using \s-1API:\s0 Xen 3.0.0 .Sp Running hypervisor: Xen 3.0.0 .RE .RE .RS 4 .RE .IP "\fBcd\fR [\fIdirectory\fR]" 4 .IX Item "cd [directory]" Will change current directory to \fIdirectory\fR. The default directory for the \fBcd\fR command is the home directory or, if there is no \fI\s-1HOME\s0\fR variable in the environment, the root directory. .Sp This command is only available in interactive mode. .IP "\fBpwd\fR" 4 .IX Item "pwd" Will print the current directory. .IP "\fBconnect\fR \fI\s-1URI\s0\fR [\fI\-\-readonly\fR]" 4 .IX Item "connect URI [--readonly]" (Re)\-Connect to the hypervisor. When the shell is first started, this is automatically run with the \fI\s-1URI\s0\fR parameter requested by the \f(CW\*(C`\-c\*(C'\fR option on the command line. The \fI\s-1URI\s0\fR parameter specifies how to connect to the hypervisor. The documentation page at list the values supported, but the most common are: .RS 4 .IP "xen:///" 4 .IX Item "xen:///" this is used to connect to the local Xen hypervisor, this is the default .IP "qemu:///system" 4 .IX Item "qemu:///system" connect locally as root to the daemon supervising QEmu and \s-1KVM\s0 domains .IP "qemu:///session" 4 .IX Item "qemu:///session" connect locally as a normal user to his own set of QEmu and \s-1KVM\s0 domains .IP "lxc:///" 4 .IX Item "lxc:///" connect to a local linux container .RE .RS 4 .Sp For remote access see the documentation page at on how to make URIs. The \fI\-\-readonly\fR option allows for read-only connection .RE .IP "\fBuri\fR" 4 .IX Item "uri" Prints the hypervisor canonical \s-1URI\s0, can be useful in shell mode. .IP "\fBhostname\fR" 4 .IX Item "hostname" Print the hypervisor hostname. .IP "\fBsysinfo\fR" 4 .IX Item "sysinfo" Print the \s-1XML\s0 representation of the hypervisor sysinfo, if available. .IP "\fBnodeinfo\fR" 4 .IX Item "nodeinfo" Returns basic information about the node, like number and type of \s-1CPU\s0, and size of the physical memory. The output corresponds to virNodeInfo structure. Specifically, the \*(L"\s-1CPU\s0 socket(s)\*(R" field means number of \s-1CPU\s0 sockets per \s-1NUMA\s0 cell. .IP "\fBnodecpustats\fR [\fIcpu\fR] [\fI\-\-percent\fR]" 4 .IX Item "nodecpustats [cpu] [--percent]" Returns cpu stats of the node. If \fIcpu\fR is specified, this will prints specified cpu statistics only. If \fI\-\-percent\fR is specified, this will prints percentage of each kind of cpu statistics during 1 second. .IP "\fBnodememstats\fR [\fIcell\fR]" 4 .IX Item "nodememstats [cell]" Returns memory stats of the node. If \fIcell\fR is specified, this will prints specified cell statistics only. .IP "\fBnodesuspend\fR [\fItarget\fR] [\fIduration\fR] [\fIflags\fR]" 4 .IX Item "nodesuspend [target] [duration] [flags]" Puts the node (host machine) into a system-wide sleep state such as Suspend-to-RAM, Suspend-to-Disk or Hybrid-Suspend and sets up a Real-Time-Clock interrupt to fire (to wake up the node) after a time delay specified by the 'duration' parameter. .IP "\fBcapabilities\fR" 4 .IX Item "capabilities" Print an \s-1XML\s0 document describing the capabilities of the hypervisor we are currently connected to. This includes a section on the host capabilities in terms of \s-1CPU\s0 and features, and a set of description for each kind of guest which can be virtualized. For a more complete description see: The \s-1XML\s0 also show the \s-1NUMA\s0 topology information if available. .IP "\fBinject-nmi\fR \fIdomain-id\fR" 4 .IX Item "inject-nmi domain-id" Inject \s-1NMI\s0 to the guest. .IP "\fBlist\fR [\fI\-\-inactive\fR | \fI\-\-all\fR] [\fI\-\-managed\-save\fR] [\fI\-\-title\fR] { [\fI\-\-table\fR] | \fI\-\-name\fR | \fI\-\-uuid\fR } [\fI\-\-persistent\fR] [\fI\-\-transient\fR]" 4 .IX Item "list [--inactive | --all] [--managed-save] [--title] { [--table] | --name | --uuid } [--persistent] [--transient]" Prints information about existing domains. If no options are specified it prints out information about running domains. .Sp An example format for the list is as follows: .Sp \&\fBvirsh\fR list Id Name State .Sp \&\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- .Sp .Vb 2 \& 0 Domain\-0 running \& 2 fedora paused .Ve .Sp Name is the name of the domain. \s-1ID\s0 the domain numeric id. State is the run state (see below). .Sp \&\fB\s-1STATES\s0\fR .Sp The State field lists 8 states for a domain, and which ones the current domain is in. .RS 4 .IP "\fBrunning\fR" 4 .IX Item "running" The domain is currently running on a \s-1CPU\s0 .IP "\fBidle\fR" 4 .IX Item "idle" The domain is idle, and not running or runnable. This can be caused because the domain is waiting on \s-1IO\s0 (a traditional wait state) or has gone to sleep because there was nothing else for it to do. .IP "\fBpaused\fR" 4 .IX Item "paused" The domain has been paused, usually occurring through the administrator running \fBvirsh suspend\fR. When in a paused state the domain will still consume allocated resources like memory, but will not be eligible for scheduling by the hypervisor. .IP "\fBshutdown\fR" 4 .IX Item "shutdown" The domain is in the process of shutting down, i.e. the guest operating system has been notified and should be in the process of stopping its operations gracefully. .IP "\fBshut off\fR" 4 .IX Item "shut off" The domain is not running. Usually this indicates the domain has been shut down completely, or has not been started. .IP "\fBcrashed\fR" 4 .IX Item "crashed" The domain has crashed, which is always a violent ending. Usually this state can only occur if the domain has been configured not to restart on crash. .IP "\fBdying\fR" 4 .IX Item "dying" The domain is in process of dying, but hasn't completely shutdown or crashed. .IP "\fBpmsuspended\fR" 4 .IX Item "pmsuspended" The domain has been suspended by guest power management, e.g. entered into s3 state. .RE .RS 4 .Sp If \fI\-\-managed\-save\fR is specified, then domains that have managed save state (only possible if they are in the \fBshut off\fR state, so you need to specify \fI\-\-inactive\fR or \fI\-\-all\fR to actually list them) will instead show as \fBsaved\fR in the listing. This flag is usable only with the default \fI\-\-table\fR output. .Sp If \fI\-\-name\fR is specified, domain names are printed instead of the table formatted one per line. If \fI\-\-uuid\fR is specified domain's \s-1UUID\s0's are printed instead of names. Flag \fI\-\-table\fR specifies that the legacy table-formatted output should be used. This is the default. All of these are mutually exclusive. .Sp Flag \fI\-\-persistent\fR specifies that persistent domains should be printed. Similarly \fI\-\-transient\fR enables output of transient domains. These flags may be combined. Default behavior is as though both were specified. (Note that if any of these flags is specified, the check for the persistence state is done and may fail. If none of these flags is specified, the check is skipped.) .Sp If \fI\-\-title\fR is specified, then the short domain description (title) is printed in an extra column. This flag is usable only with the default \&\fI\-\-table\fR output. .Sp Example: .Sp \&\fBvirsh\fR list \-\-title Id Name State Title \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- 0 Domain\-0 running Mailserver 1 2 fedora paused .RE .IP "\fBfreecell\fR [{ [\fI\-\-cellno\fR] \fBcellno\fR | \fI\-\-all\fR }]" 4 .IX Item "freecell [{ [--cellno] cellno | --all }]" Prints the available amount of memory on the machine or within a \s-1NUMA\s0 cell. The freecell command can provide one of three different displays of available memory on the machine depending on the options specified. With no options, it displays the total free memory on the machine. With the \-\-all option, it displays the free memory in each cell and the total free memory on the machine. Finally, with a numeric argument or with \-\-cellno plus a cell number it will display the free memory for the specified cell only. .IP "\fBcpu-baseline\fR \fI\s-1FILE\s0\fR" 4 .IX Item "cpu-baseline FILE" Compute baseline \s-1CPU\s0 which will be supported by all host CPUs given in . The list of host CPUs is built by extracting all elements from the . Thus, the can contain either a set of elements separated by new lines or even a set of complete elements printed by \&\fBcapabilities\fR command. .IP "\fBcpu-compare\fR \fI\s-1FILE\s0\fR" 4 .IX Item "cpu-compare FILE" Compare \s-1CPU\s0 definition from \s-1XML\s0 with host \s-1CPU\s0. The \s-1XML\s0 may contain either host or guest \s-1CPU\s0 definition. The host \s-1CPU\s0 definition is the element and its contents as printed by \fBcapabilities\fR command. The guest \s-1CPU\s0 definition is the element and its contents from domain \s-1XML\s0 definition. For more information on guest \s-1CPU\s0 definition see: .IP "\fBecho\fR [\fI\-\-shell\fR] [\fI\-\-xml\fR] [\fIarg\fR...]" 4 .IX Item "echo [--shell] [--xml] [arg...]" Echo back each \fIarg\fR, separated by space. If \fI\-\-shell\fR is specified, then the output will be single-quoted where needed, so that it is suitable for reuse in a shell context. If \fI\-\-xml\fR is specified, then the output will be escaped for use in \s-1XML\s0. .SH "DOMAIN COMMANDS" .IX Header "DOMAIN COMMANDS" The following commands manipulate domains directly, as stated previously most commands take domain-id as the first parameter. The \&\fIdomain-id\fR can be specified as a short integer, a name or a full \s-1UUID\s0. .IP "\fBautostart\fR [\fI\-\-disable\fR] \fIdomain-id\fR" 4 .IX Item "autostart [--disable] domain-id" Configure a domain to be automatically started at boot. .Sp The option \fI\-\-disable\fR disables autostarting. .IP "\fBconsole\fR \fIdomain-id\fR [\fIdevname\fR] [\fI\-\-safe\fR] [\fI\-\-force\fR]" 4 .IX Item "console domain-id [devname] [--safe] [--force]" Connect the virtual serial console for the guest. The optional \&\fIdevname\fR parameter refers to the device alias of an alternate console, serial or parallel device configured for the guest. If omitted, the primary console will be opened. .Sp If the flag \fI\-\-safe\fR is specified, the connection is only attempted if the driver supports safe console handling. This flag specifies that the server has to ensure exclusive access to console devices. Optionally the \fI\-\-force\fR flag may be specified, requesting to disconnect any existing sessions, such as in a case of a broken connection. .IP "\fBcreate\fR \fI\s-1FILE\s0\fR [\fI\-\-console\fR] [\fI\-\-paused\fR] [\fI\-\-autodestroy\fR]" 4 .IX Item "create FILE [--console] [--paused] [--autodestroy]" Create a domain from an \s-1XML\s0 . An easy way to create the \s-1XML\s0 is to use the \fBdumpxml\fR command to obtain the definition of a pre-existing guest. The domain will be paused if the \fI\-\-paused\fR option is used and supported by the driver; otherwise it will be running. If \fI\-\-console\fR is requested, attach to the console after creation. If \fI\-\-autodestroy\fR is requested, then the guest will be automatically destroyed when virsh closes its connection to libvirt, or otherwise exits. .Sp \&\fBExample\fR .Sp .Vb 3 \& virsh dumpxml > domain.xml \& vi domain.xml (or make changes with your other text editor) \& virsh create < domain.xml .Ve .IP "\fBdefine\fR \fI\s-1FILE\s0\fR" 4 .IX Item "define FILE" Define a domain from an \s-1XML\s0 . The domain definition is registered but not started. If domain is already running, the changes will take effect on the next boot. .IP "\fBdesc\fR [[\fI\-\-live\fR] [\fI\-\-config\fR] | [\fI\-\-current\fR]] [\fI\-\-title\fR] [\fI\-\-edit\fR] [\fI\-\-new\-desc\fR New description or title message]" 4 .IX Item "desc [[--live] [--config] | [--current]] [--title] [--edit] [--new-desc New description or title message]" Show or modify description and title of a domain. These values are user fields that allow to store arbitrary textual data to allow easy identification of domains. Title should be short, although it's not enforced. .Sp Flags \fI\-\-live\fR or \fI\-\-config\fR select whether this command works on live or persistent definitions of the domain. If both \fI\-\-live\fR and \fI\-\-config\fR are specified, the \fI\-\-config\fR option takes precedence on getting the current description and both live configuration and config are updated while setting the description. \fI\-\-current\fR is exclusive and implied if none of these was specified. .Sp Flag \fI\-\-edit\fR specifies that an editor with the contents of current description or title should be opened and the contents saved back afterwards. .Sp Flag \fI\-\-title\fR selects operation on the title field instead of description. .Sp If neither of \fI\-\-edit\fR and \fI\-\-new_desc\fR are specified the note or description is displayed instead of being modified. .IP "\fBdestroy\fR \fIdomain-id\fR [\fI\-\-graceful\fR]" 4 .IX Item "destroy domain-id [--graceful]" Immediately terminate the domain domain-id. This doesn't give the domain \&\s-1OS\s0 any chance to react, and it's the equivalent of ripping the power cord out on a physical machine. In most cases you will want to use the \fBshutdown\fR command instead. However, this does not delete any storage volumes used by the guest, and if the domain is persistent, it can be restarted later. .Sp If \fIdomain-id\fR is transient, then the metadata of any snapshots will be lost once the guest stops running, but the snapshot contents still exist, and a new domain with the same name and \s-1UUID\s0 can restore the snapshot metadata with \fBsnapshot-create\fR. .Sp If \fI\-\-graceful\fR is specified, don't resort to extreme measures (e.g. \s-1SIGKILL\s0) when the guest doesn't stop after a reasonable timeout; return an error instead. .IP "\fBdomblkstat\fR \fIdomain\fR \fIblock-device\fR [\fI\-\-human\fR]" 4 .IX Item "domblkstat domain block-device [--human]" Get device block stats for a running domain. A \fIblock-device\fR corresponds to a unique target name () or source file () for one of the disk devices attached to \fIdomain\fR (see also \fBdomblklist\fR for listing these names). .Sp Use \fI\-\-human\fR for a more human readable output. .Sp Availability of these fields depends on hypervisor. Unsupported fields are missing from the output. Other fields may appear if communicating with a newer version of libvirtd. .Sp \&\fBExplanation of fields\fR (fields appear in the folowing order): rd_req \- count of read operations rd_bytes \- count of read bytes wr_req \- count of write operations wr_bytes \- count of written bytes errs \- error count flush_operations \- count of flush operations rd_total_times \- total time read operations took (ns) wr_total_times \- total time write operations took (ns) flush_total_times \- total time flush operations took (ns) <\-\- other fields provided by hypervisor \-\-> .IP "\fBdomifstat\fR \fIdomain\fR \fIinterface-device\fR" 4 .IX Item "domifstat domain interface-device" Get network interface stats for a running domain. .IP "\fBdomif-setlink\fR \fIdomain\fR \fIinterface-device\fR \fIstate\fR [\fI\-\-config\fR]" 4 .IX Item "domif-setlink domain interface-device state [--config]" Modify link state of the domain's virtual interface. Possible values for state are \*(L"up\*(R" and "down. If \fI\-\-config\fR is specified, only the persistent configuration of the domain is modified, for compatibility purposes, \&\fI\-\-persistent\fR is alias of \fI\-\-config\fR. \&\fIinterface-device\fR can be the interface's target name or the \s-1MAC\s0 address. .IP "\fBdomif-getlink\fR \fIdomain\fR \fIinterface-device\fR [\fI\-\-config\fR]" 4 .IX Item "domif-getlink domain interface-device [--config]" Query link state of the domain's virtual interface. If \fI\-\-config\fR is specified, query the persistent configuration, for compatibility purposes, \fI\-\-persistent\fR is alias of \fI\-\-config\fR. .Sp \&\fIinterface-device\fR can be the interface's target name or the \s-1MAC\s0 address. .IP "\fBdomiftune\fR \fIdomain\fR \fIinterface-device\fR [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]] [\fI\-\-inbound average,peak,burst\fR] [\fI\-\-outbound average,peak,burst\fR]" 4 .IX Item "domiftune domain interface-device [[--config] [--live] | [--current]] [--inbound average,peak,burst] [--outbound average,peak,burst]" Set or query the domain's network interface's bandwidth parameters. \&\fIinterface-device\fR can be the interface's target name (), or the \s-1MAC\s0 address. .Sp If no \fI\-\-inbound\fR or \fI\-\-outbound\fR is specified, this command will query and show the bandwidth settings. Otherwise, it will set the inbound or outbound bandwidth. \fIaverage,peak,burst\fR is the same as in command \fIattach-interface\fR. .Sp If \fI\-\-live\fR is specified, affect a running guest. If \fI\-\-config\fR is specified, affect the next boot of a persistent guest. If \fI\-\-current\fR is specified, affect the current guest state. Both \fI\-\-live\fR and \fI\-\-current\fR flags may be given, but \fI\-\-current\fR is exclusive. If no flag is specified, behavior is different depending on hypervisor. .IP "\fBdommemstat\fR \fIdomain\fR" 4 .IX Item "dommemstat domain" Get memory stats for a running domain. .IP "\fBdomblkerror\fR \fIdomain-id\fR" 4 .IX Item "domblkerror domain-id" Show errors on block devices. This command usually comes handy when \&\fBdomstate\fR command says that a domain was paused due to I/O error. The \fBdomblkerror\fR command lists all block devices in error state and the error seen on each of them. .IP "\fBdomblkinfo\fR \fIdomain\fR \fIblock-device\fR" 4 .IX Item "domblkinfo domain block-device" Get block device size info for a domain. A \fIblock-device\fR corresponds to a unique target name () or source file () for one of the disk devices attached to \fIdomain\fR (see also \fBdomblklist\fR for listing these names). .IP "\fBdomblklist\fR \fIdomain\fR [\fI\-\-inactive\fR] [\fI\-\-details\fR]" 4 .IX Item "domblklist domain [--inactive] [--details]" Print a table showing the brief information of all block devices associated with \fIdomain\fR. If \fI\-\-inactive\fR is specified, query the block devices that will be used on the next boot, rather than those currently in use by a running domain. If \fI\-\-details\fR is specified, disk type and device value will also be printed. Other contexts that require a block device name (such as \fIdomblkinfo\fR or \&\fIsnapshot-create\fR for disk snapshots) will accept either target or unique source names printed by this command. .IP "\fBdomiflist\fR \fIdomain\fR [\fI\-\-inactive\fR]" 4 .IX Item "domiflist domain [--inactive]" Print a table showing the brief information of all virtual interfaces associated with \fIdomain\fR. If \fI\-\-inactive\fR is specified, query the virtual interfaces that will be used on the next boot, rather than those currently in use by a running domain. Other contexts that require a \s-1MAC\s0 address of virtual interface (such as \fIdetach-interface\fR or \&\fIdomif-setlink\fR) will accept the \s-1MAC\s0 address printed by this command. .IP "\fBblockcopy\fR \fIdomain\fR \fIpath\fR \fIdest\fR [\fIbandwidth\fR] [\fI\-\-shallow\fR] [\fI\-\-reuse\-external\fR] [\fI\-\-raw\fR] [\fI\-\-wait\fR [\fI\-\-verbose\fR] [{\fI\-\-pivot\fR | \fI\-\-finish\fR}] [\fI\-\-timeout\fR \fBseconds\fR] [\fI\-\-async\fR]]" 4 .IX Item "blockcopy domain path dest [bandwidth] [--shallow] [--reuse-external] [--raw] [--wait [--verbose] [{--pivot | --finish}] [--timeout seconds] [--async]]" Copy a disk backing image chain to \fIdest\fR. By default, this command flattens the entire chain; but if \fI\-\-shallow\fR is specified, the copy shares the backing chain. .Sp If \fI\-\-reuse\-external\fR is specified, then \fIdest\fR must exist and have contents identical to the resulting backing file (that is, it must start with contents matching the backing file \fIdisk\fR if \fI\-\-shallow\fR is used, otherwise it must start empty); this option is typically used to set up a relative backing file name in the destination. .Sp The format of the destination is determined by the first match in the following list: if \fI\-\-raw\fR is specified, it will be raw; if \&\fI\-\-reuse\-external\fR is specified, the existing destination is probed for a format; and in all other cases, the destination format will match the source format. .Sp By default, the copy job runs in the background, and consists of two phases. Initially, the job must copy all data from the source, and during this phase, the job can only be canceled to revert back to the source disk, with no guarantees about the destination. After this phase completes, both the source and the destination remain mirrored until a call to \fBblockjob\fR with the \fI\-\-abort\fR and \fI\-\-pivot\fR flags pivots over to the copy, or a call without \fI\-\-pivot\fR leaves the destination as a faithful copy of that point in time. However, if \fI\-\-wait\fR is specified, then this command will block until the mirroring phase begins, or cancel the operation if the optional \fItimeout\fR in seconds elapses or \s-1SIGINT\s0 is sent (usually with \f(CW\*(C`Ctrl\-C\*(C'\fR). Using \fI\-\-verbose\fR along with \fI\-\-wait\fR will produce periodic status updates. Using \fI\-\-pivot\fR or \fI\-\-finish\fR along with \fI\-\-wait\fR will additionally end the job cleanly rather than leaving things in the mirroring phase. If job cancellation is triggered, \&\fI\-\-async\fR will return control to the user as fast as possible, otherwise the command may continue to block a little while longer until the job is done cleaning up. .Sp \&\fIpath\fR specifies fully-qualified path of the disk. \&\fIbandwidth\fR specifies copying bandwidth limit in Mbps. .IP "\fBblockpull\fR \fIdomain\fR \fIpath\fR [\fIbandwidth\fR] [\fIbase\fR] [\fI\-\-wait\fR [\fI\-\-verbose\fR] [\fI\-\-timeout\fR \fBseconds\fR] [\fI\-\-async\fR]]" 4 .IX Item "blockpull domain path [bandwidth] [base] [--wait [--verbose] [--timeout seconds] [--async]]" Populate a disk from its backing image chain. By default, this command flattens the entire chain; but if \fIbase\fR is specified, containing the name of one of the backing files in the chain, then that file becomes the new backing file and only the intermediate portion of the chain is pulled. Once all requested data from the backing image chain has been pulled, the disk no longer depends on that portion of the backing chain. .Sp By default, this command returns as soon as possible, and data for the entire disk is pulled in the background; the progress of the operation can be checked with \fBblockjob\fR. However, if \fI\-\-wait\fR is specified, then this command will block until the operation completes, or cancel the operation if the optional \fItimeout\fR in seconds elapses or \s-1SIGINT\s0 is sent (usually with \f(CW\*(C`Ctrl\-C\*(C'\fR). Using \fI\-\-verbose\fR along with \fI\-\-wait\fR will produce periodic status updates. If job cancellation is triggered, \fI\-\-async\fR will return control to the user as fast as possible, otherwise the command may continue to block a little while longer until the job is done cleaning up. .Sp \&\fIpath\fR specifies fully-qualified path of the disk; it corresponds to a unique target name () or source file () for one of the disk devices attached to \fIdomain\fR (see also \fBdomblklist\fR for listing these names). \&\fIbandwidth\fR specifies copying bandwidth limit in Mbps. .IP "\fBblkdeviotune\fR \fIdomain\fR \fIdevice\fR [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]] [[\fItotal-bytes-sec\fR] | [\fIread-bytes-sec\fR] [\fIwrite-bytes-sec\fR]] [[\fItotal-iops-sec\fR] | [\fIread-iops-sec\fR] [\fIwrite-iops-sec\fR]]" 4 .IX Item "blkdeviotune domain device [[--config] [--live] | [--current]] [[total-bytes-sec] | [read-bytes-sec] [write-bytes-sec]] [[total-iops-sec] | [read-iops-sec] [write-iops-sec]]" Set or query the block disk io parameters for a block device of \fIdomain\fR. \&\fIdevice\fR specifies a unique target name () or source file () for one of the disk devices attached to \&\fIdomain\fR (see also \fBdomblklist\fR for listing these names). .Sp If no limit is specified, it will query current I/O limits setting. Otherwise, alter the limits with these flags: \&\fI\-\-total\-bytes\-sec\fR specifies total throughput limit in bytes per second. \&\fI\-\-read\-bytes\-sec\fR specifies read throughput limit in bytes per second. \&\fI\-\-write\-bytes\-sec\fR specifies write throughput limit in bytes per second. \&\fI\-\-total\-iops\-sec\fR specifies total I/O operations limit per second. \&\fI\-\-read\-iops\-sec\fR specifies read I/O operations limit per second. \&\fI\-\-write\-iops\-sec\fR specifies write I/O operations limit per second. .Sp Older versions of virsh only accepted these options with underscore instead of dash, as in \fI\-\-total_bytes_sec\fR. .Sp Bytes and iops values are independent, but setting only one value (such as \-\-read\-bytes\-sec) resets the other two in that category to unlimited. An explicit 0 also clears any limit. A non-zero value for a given total cannot be mixed with non-zero values for read or write. .Sp If \fI\-\-live\fR is specified, affect a running guest. If \fI\-\-config\fR is specified, affect the next boot of a persistent guest. If \fI\-\-current\fR is specified, affect the current guest state. Both \fI\-\-live\fR and \fI\-\-current\fR flags may be given, but \fI\-\-current\fR is exclusive. If no flag is specified, behavior is different depending on hypervisor. .IP "\fBblockjob\fR \fIdomain\fR \fIpath\fR { [\fI\-\-abort\fR] [\fI\-\-async\fR] [\fI\-\-pivot\fR] | [\fI\-\-info\fR] | [\fIbandwidth\fR] }" 4 .IX Item "blockjob domain path { [--abort] [--async] [--pivot] | [--info] | [bandwidth] }" Manage active block operations. There are three modes: \fI\-\-info\fR, \&\fIbandwidth\fR, and \fI\-\-abort\fR; \fI\-\-info\fR is default except that \fI\-\-async\fR or \fI\-\-pivot\fR implies \fI\-\-abort\fR. .Sp \&\fIpath\fR specifies fully-qualified path of the disk; it corresponds to a unique target name () or source file () for one of the disk devices attached to \fIdomain\fR (see also \fBdomblklist\fR for listing these names). .Sp If \fI\-\-abort\fR is specified, the active job on the specified disk will be aborted. If \fI\-\-async\fR is also specified, this command will return immediately, rather than waiting for the cancelation to complete. If \&\fI\-\-pivot\fR is specified, this requests that an active copy job be pivoted over to the new copy. If \fI\-\-info\fR is specified, the active job information on the specified disk will be printed. \&\fIbandwidth\fR can be used to set bandwidth limit for the active job. .IP "\fBblockresize\fR \fIdomain\fR \fIpath\fR \fIsize\fR" 4 .IX Item "blockresize domain path size" Resize a block device of domain while the domain is running, \fIpath\fR specifies the absolute path of the block device; it corresponds to a unique target name () or source file () for one of the disk devices attached to \fIdomain\fR (see also \fBdomblklist\fR for listing these names). .Sp \&\fIsize\fR is a scaled integer (see \fB\s-1NOTES\s0\fR above) which defaults to KiB (blocks of 1024 bytes) if there is no suffix. You must use a suffix of \&\*(L"B\*(R" to get bytes (note that for historical reasons, this differs from \&\fBvol-resize\fR which defaults to bytes without a suffix). .IP "\fBdominfo\fR \fIdomain-id\fR" 4 .IX Item "dominfo domain-id" Returns basic information about the domain. .IP "\fBdomuuid\fR \fIdomain-name-or-id\fR" 4 .IX Item "domuuid domain-name-or-id" Convert a domain name or id to domain \s-1UUID\s0 .IP "\fBdomid\fR \fIdomain-name-or-uuid\fR" 4 .IX Item "domid domain-name-or-uuid" Convert a domain name (or \s-1UUID\s0) to a domain id .IP "\fBdomjobabort\fR \fIdomain-id-or-uuid\fR" 4 .IX Item "domjobabort domain-id-or-uuid" Abort the currently running domain job. .IP "\fBdomjobinfo\fR \fIdomain-id-or-uuid\fR" 4 .IX Item "domjobinfo domain-id-or-uuid" Returns information about jobs running on a domain. .IP "\fBdomname\fR \fIdomain-id-or-uuid\fR" 4 .IX Item "domname domain-id-or-uuid" Convert a domain Id (or \s-1UUID\s0) to domain name .IP "\fBdomstate\fR \fIdomain-id\fR [\fI\-\-reason\fR]" 4 .IX Item "domstate domain-id [--reason]" Returns state about a domain. \fI\-\-reason\fR tells virsh to also print reason for the state. .IP "\fBdomcontrol\fR \fIdomain-id\fR" 4 .IX Item "domcontrol domain-id" Returns state of an interface to \s-1VMM\s0 used to control a domain. For states other than \*(L"ok\*(R" or \*(L"error\*(R" the command also prints number of seconds elapsed since the control interface entered its current state. .IP "\fBdomxml-from-native\fR \fIformat\fR \fIconfig\fR" 4 .IX Item "domxml-from-native format config" Convert the file \fIconfig\fR in the native guest configuration format named by \fIformat\fR to a domain \s-1XML\s0 format. For \s-1QEMU/KVM\s0 hypervisor, the \fIformat\fR argument must be \fBqemu-argv\fR. For Xen hypervisor, the \&\fIformat\fR argument may be \fBxen-xm\fR or \fBxen-sxpr\fR. .IP "\fBdomxml-to-native\fR \fIformat\fR \fIxml\fR" 4 .IX Item "domxml-to-native format xml" Convert the file \fIxml\fR in domain \s-1XML\s0 format to the native guest configuration format named by \fIformat\fR. For \s-1QEMU/KVM\s0 hypervisor, the \fIformat\fR argument must be \fBqemu-argv\fR. For Xen hypervisor, the \&\fIformat\fR argument may be \fBxen-xm\fR or \fBxen-sxpr\fR. .IP "\fBdump\fR \fIdomain-id\fR \fIcorefilepath\fR [\fI\-\-bypass\-cache\fR] { [\fI\-\-live\fR] | [\fI\-\-crash\fR] | [\fI\-\-reset\fR] } [\fI\-\-verbose\fR]" 4 .IX Item "dump domain-id corefilepath [--bypass-cache] { [--live] | [--crash] | [--reset] } [--verbose]" Dumps the core of a domain to a file for analysis. If \fI\-\-live\fR is specified, the domain continues to run until the core dump is complete, rather than pausing up front. If \fI\-\-crash\fR is specified, the domain is halted with a crashed status, rather than merely left in a paused state. If \fI\-\-reset\fR is specified, the domain is reset after successful dump. Note, these three switches are mutually exclusive. If \fI\-\-bypass\-cache\fR is specified, the save will avoid the file system cache, although this may slow down the operation. .Sp The progress may be monitored using \fBdomjobinfo\fR virsh command and canceled with \fBdomjobabort\fR command (sent by another virsh instance). Another option is to send \s-1SIGINT\s0 (usually with \f(CW\*(C`Ctrl\-C\*(C'\fR) to the virsh process running \&\fBdump\fR command. \fI\-\-verbose\fR displays the progress of dump. .Sp \&\s-1NOTE:\s0 Some hypervisors may require the user to manually ensure proper permissions on file and path specified by argument \fIcorefilepath\fR. .IP "\fBdumpxml\fR \fIdomain-id\fR [\fI\-\-inactive\fR] [\fI\-\-security\-info\fR] [\fI\-\-update\-cpu\fR]" 4 .IX Item "dumpxml domain-id [--inactive] [--security-info] [--update-cpu]" Output the domain information as an \s-1XML\s0 dump to stdout, this format can be used by the \fBcreate\fR command. Additional options affecting the \s-1XML\s0 dump may be used. \fI\-\-inactive\fR tells virsh to dump domain configuration that will be used on next start of the domain as opposed to the current domain configuration. Using \fI\-\-security\-info\fR will also include security sensitive information in the \s-1XML\s0 dump. \fI\-\-update\-cpu\fR updates domain \s-1CPU\s0 requirements according to host \s-1CPU\s0. .IP "\fBedit\fR \fIdomain-id\fR" 4 .IX Item "edit domain-id" Edit the \s-1XML\s0 configuration file for a domain, which will affect the next boot of the guest. .Sp This is equivalent to: .Sp .Vb 3 \& virsh dumpxml \-\-inactive \-\-security\-info domain > domain.xml \& vi domain.xml (or make changes with your other text editor) \& virsh define domain.xml .Ve .Sp except that it does some error checking. .Sp The editor used can be supplied by the \f(CW$VISUAL\fR or \f(CW$EDITOR\fR environment variables, and defaults to \f(CW\*(C`vi\*(C'\fR. .IP "\fBmanagedsave\fR \fIdomain-id\fR [\fI\-\-bypass\-cache\fR] [{\fI\-\-running\fR | \fI\-\-paused\fR}] [\fI\-\-verbose\fR]" 4 .IX Item "managedsave domain-id [--bypass-cache] [{--running | --paused}] [--verbose]" Save and destroy (stop) a running domain, so it can be restarted from the same state at a later time. When the virsh \fBstart\fR command is next run for the domain, it will automatically be started from this saved state. If \fI\-\-bypass\-cache\fR is specified, the save will avoid the file system cache, although this may slow down the operation. .Sp The progress may be monitored using \fBdomjobinfo\fR virsh command and canceled with \fBdomjobabort\fR command (sent by another virsh instance). Another option is to send \s-1SIGINT\s0 (usually with \f(CW\*(C`Ctrl\-C\*(C'\fR) to the virsh process running \&\fBmanagedsave\fR command. \fI\-\-verbose\fR displays the progress of save. .Sp Normally, starting a managed save will decide between running or paused based on the state the domain was in when the save was done; passing either the \fI\-\-running\fR or \fI\-\-paused\fR flag will allow overriding which state the \fBstart\fR should use. .Sp The \fBdominfo\fR command can be used to query whether a domain currently has any managed save image. .IP "\fBmanagedsave-remove\fR \fIdomain-id\fR" 4 .IX Item "managedsave-remove domain-id" Remove the \fBmanagedsave\fR state file for a domain, if it exists. This ensures the domain will do a full boot the next time it is started. .IP "\fBmaxvcpus\fR [\fItype\fR]" 4 .IX Item "maxvcpus [type]" Provide the maximum number of virtual CPUs supported for a guest \s-1VM\s0 on this connection. If provided, the \fItype\fR parameter must be a valid type attribute for the element of \s-1XML\s0. .IP "\fBcpu-stats\fR \fIdomain\fR [\fI\-\-total\fR] [\fIstart\fR] [\fIcount\fR]" 4 .IX Item "cpu-stats domain [--total] [start] [count]" Provide cpu statistics information of a domain. The domain should be running. Default it shows stats for all CPUs, and a total. Use \&\fI\-\-total\fR for only the total stats, \fIstart\fR for only the per-cpu stats of the CPUs from \fIstart\fR, \fIcount\fR for only \fIcount\fR CPUs' stats. .IP "\fBmigrate\fR [\fI\-\-live\fR] [\fI\-\-direct\fR] [\fI\-\-p2p\fR [\fI\-\-tunnelled\fR]] [\fI\-\-persistent\fR] [\fI\-\-undefinesource\fR] [\fI\-\-suspend\fR] [\fI\-\-copy\-storage\-all\fR] [\fI\-\-copy\-storage\-inc\fR] [\fI\-\-change\-protection\fR] [\fI\-\-unsafe\fR] [\fI\-\-verbose\fR] \fIdomain-id\fR \fIdesturi\fR [\fImigrateuri\fR] [\fIdname\fR] [\fI\-\-timeout\fR \fBseconds\fR] [\fI\-\-xml\fR \fBfile\fR]" 4 .IX Item "migrate [--live] [--direct] [--p2p [--tunnelled]] [--persistent] [--undefinesource] [--suspend] [--copy-storage-all] [--copy-storage-inc] [--change-protection] [--unsafe] [--verbose] domain-id desturi [migrateuri] [dname] [--timeout seconds] [--xml file]" Migrate domain to another host. Add \fI\-\-live\fR for live migration; \fI\-\-p2p\fR for peer\-2\-peer migration; \fI\-\-direct\fR for direct migration; or \fI\-\-tunnelled\fR for tunnelled migration. \fI\-\-persistent\fR leaves the domain persistent on destination host, \fI\-\-undefinesource\fR undefines the domain on the source host, and \fI\-\-suspend\fR leaves the domain paused on the destination host. \&\fI\-\-copy\-storage\-all\fR indicates migration with non-shared storage with full disk copy, \fI\-\-copy\-storage\-inc\fR indicates migration with non-shared storage with incremental copy (same base image shared between source and destination). In both cases the disk images have to exist on destination host, the \&\fI\-\-copy\-storage\-...\fR options only tell libvirt to transfer data from the images on source host to the images found at the same place on the destination host. \fI\-\-change\-protection\fR enforces that no incompatible configuration changes will be made to the domain while the migration is underway; this flag is implicitly enabled when supported by the hypervisor, but can be explicitly used to reject the migration if the hypervisor lacks change protection support. \fI\-\-verbose\fR displays the progress of migration. .Sp In some cases libvirt may refuse to migrate the domain because doing so may lead to potential problems such as data corruption, and thus the migration is considered unsafe. For \s-1QEMU\s0 domain, this may happen if the domain uses disks without explicitly setting cache mode to \*(L"none\*(R". Migrating such domains is unsafe unless the disk images are stored on coherent clustered filesystem, such as \s-1GFS2\s0 or \s-1GPFS\s0. If you are sure the migration is safe or you just do not care, use \fI\-\-unsafe\fR to force the migration. .Sp The \fIdesturi\fR is the connection \s-1URI\s0 of the destination host, and \&\fImigrateuri\fR is the migration \s-1URI\s0, which usually can be omitted. \&\fIdname\fR is used for renaming the domain to new name during migration, which also usually can be omitted. Likewise, \fI\-\-xml\fR \fBfile\fR is usually omitted, but can be used to supply an alternative \s-1XML\s0 file for use on the destination to supply a larger set of changes to any host-specific portions of the domain \s-1XML\s0, such as accounting for naming differences between source and destination in accessing underlying storage. .Sp \&\fI\-\-timeout\fR \fBseconds\fR forces guest to suspend when live migration exceeds that many seconds, and then the migration will complete offline. It can only be used with \fI\-\-live\fR. .Sp Running migration can be canceled by interrupting virsh (usually using \&\f(CW\*(C`Ctrl\-C\*(C'\fR) or by \fBdomjobabort\fR command sent from another virsh instance. .Sp \&\fBNote\fR: The \fIdesturi\fR parameter for normal migration and peer2peer migration has different semantics: .RS 4 .IP "\(bu" 4 normal migration: the \fIdesturi\fR is an address of the target host as seen from the client machine. .IP "\(bu" 4 peer2peer migration: the \fIdesturi\fR is an address of the target host as seen from the source machine. .RE .RS 4 .RE .IP "\fBmigrate-setmaxdowntime\fR \fIdomain-id\fR \fIdowntime\fR" 4 .IX Item "migrate-setmaxdowntime domain-id downtime" Set maximum tolerable downtime for a domain which is being live-migrated to another host. The \fIdowntime\fR is a number of milliseconds the guest is allowed to be down at the end of live migration. .IP "\fBmigrate-setspeed\fR \fIdomain-id\fR \fIbandwidth\fR" 4 .IX Item "migrate-setspeed domain-id bandwidth" Set the maximum migration bandwidth (in Mbps) for a domain which is being migrated to another host. .IP "\fBmigrate-getspeed\fR \fIdomain-id\fR" 4 .IX Item "migrate-getspeed domain-id" Get the maximum migration bandwidth (in Mbps) for a domain. .IP "\fBnumatune\fR \fIdomain\fR [\fI\-\-mode\fR \fBmode\fR] [\fI\-\-nodeset\fR \fBnodeset\fR] [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]]" 4 .IX Item "numatune domain [--mode mode] [--nodeset nodeset] [[--config] [--live] | [--current]]" Set or get a domain's numa parameters, corresponding to the element of domain \s-1XML\s0. Without flags, the current settings are displayed. .Sp \&\fImode\fR can be one of `strict', `interleave' and `preferred'. For a running domain, the mode can't be changed, and the nodeset can be changed only if the domain was started with a mode of `strict'. .Sp \&\fInodeset\fR is a list of numa nodes used by the host for running the domain. Its syntax is a comma separated list, with '\-' for ranges and '^' for excluding a node. .Sp If \fI\-\-live\fR is specified, set scheduler information of a running guest. If \fI\-\-config\fR is specified, affect the next boot of a persistent guest. If \fI\-\-current\fR is specified, affect the current guest state. .IP "\fBreboot\fR \fIdomain-id\fR [\fI\-\-mode acpi|agent\fR]" 4 .IX Item "reboot domain-id [--mode acpi|agent]" Reboot a domain. This acts just as if the domain had the \fBreboot\fR command run from the console. The command returns as soon as it has executed the reboot action, which may be significantly before the domain actually reboots. .Sp The exact behavior of a domain when it reboots is set by the \&\fIon_reboot\fR parameter in the domain's \s-1XML\s0 definition. .Sp By default the hypervisor will try to pick a suitable shutdown method. To specify an alternative method, the \fI\-\-mode\fR parameter can specify \f(CW\*(C`acpi\*(C'\fR or \f(CW\*(C`agent\*(C'\fR. .IP "\fBreset\fR \fIdomain-id\fR" 4 .IX Item "reset domain-id" Reset a domain immediately without any guest shutdown. \fBreset\fR emulates the power reset button on a machine, where all guest hardware sees the \s-1RST\s0 line set and reinitializes internal state. .Sp \&\fBNote\fR: Reset without any guest \s-1OS\s0 shutdown risks data loss. .IP "\fBrestore\fR \fIstate-file\fR [\fI\-\-bypass\-cache\fR] [\fI\-\-xml\fR \fBfile\fR] [{\fI\-\-running\fR | \fI\-\-paused\fR}]" 4 .IX Item "restore state-file [--bypass-cache] [--xml file] [{--running | --paused}]" Restores a domain from a \fBvirsh save\fR state file. See \fIsave\fR for more info. .Sp If \fI\-\-bypass\-cache\fR is specified, the restore will avoid the file system cache, although this may slow down the operation. .Sp \&\fI\-\-xml\fR \fBfile\fR is usually omitted, but can be used to supply an alternative \s-1XML\s0 file for use on the restored guest with changes only in the host-specific portions of the domain \s-1XML\s0. For example, it can be used to account for file naming differences in underlying storage due to disk snapshots taken after the guest was saved. .Sp Normally, restoring a saved image will use the state recorded in the save image to decide between running or paused; passing either the \&\fI\-\-running\fR or \fI\-\-paused\fR flag will allow overriding which state the domain should be started in. .Sp \&\fBNote\fR: To avoid corrupting file system contents within the domain, you should not reuse the saved state file for a second \fBrestore\fR unless you have also reverted all storage volumes back to the same contents as when the state file was created. .IP "\fBsave\fR \fIdomain-id\fR \fIstate-file\fR [\fI\-\-bypass\-cache\fR] [\fI\-\-xml\fR \fBfile\fR] [{\fI\-\-running\fR | \fI\-\-paused\fR}] [\fI\-\-verbose\fR]" 4 .IX Item "save domain-id state-file [--bypass-cache] [--xml file] [{--running | --paused}] [--verbose]" Saves a running domain (\s-1RAM\s0, but not disk state) to a state file so that it can be restored later. Once saved, the domain will no longer be running on the system, thus the memory allocated for the domain will be free for other domains to use. \fBvirsh restore\fR restores from this state file. If \fI\-\-bypass\-cache\fR is specified, the save will avoid the file system cache, although this may slow down the operation. .Sp The progress may be monitored using \fBdomjobinfo\fR virsh command and canceled with \fBdomjobabort\fR command (sent by another virsh instance). Another option is to send \s-1SIGINT\s0 (usually with \f(CW\*(C`Ctrl\-C\*(C'\fR) to the virsh process running \&\fBsave\fR command. \fI\-\-verbose\fR displays the progress of save. .Sp This is roughly equivalent to doing a hibernate on a running computer, with all the same limitations. Open network connections may be severed upon restore, as \s-1TCP\s0 timeouts may have expired. .Sp \&\fI\-\-xml\fR \fBfile\fR is usually omitted, but can be used to supply an alternative \s-1XML\s0 file for use on the restored guest with changes only in the host-specific portions of the domain \s-1XML\s0. For example, it can be used to account for file naming differences that are planned to be made via disk snapshots of underlying storage after the guest is saved. .Sp Normally, restoring a saved image will decide between running or paused based on the state the domain was in when the save was done; passing either the \fI\-\-running\fR or \fI\-\-paused\fR flag will allow overriding which state the \fBrestore\fR should use. .Sp Domain saved state files assume that disk images will be unchanged between the creation and restore point. For a more complete system restore point, where the disk state is saved alongside the memory state, see the \fBsnapshot\fR family of commands. .IP "\fBsave-image-define\fR \fIfile\fR \fIxml\fR [{\fI\-\-running\fR | \fI\-\-paused\fR}]" 4 .IX Item "save-image-define file xml [{--running | --paused}]" Update the domain \s-1XML\s0 that will be used when \fIfile\fR is later used in the \fBrestore\fR command. The \fIxml\fR argument must be a file name containing the alternative \s-1XML\s0, with changes only in the host-specific portions of the domain \s-1XML\s0. For example, it can be used to account for file naming differences resulting from creating disk snapshots of underlying storage after the guest was saved. .Sp The save image records whether the domain should be restored to a running or paused state. Normally, this command does not alter the recorded state; passing either the \fI\-\-running\fR or \fI\-\-paused\fR flag will allow overriding which state the \fBrestore\fR should use. .IP "\fBsave-image-dumpxml\fR \fIfile\fR [\fI\-\-security\-info\fR]" 4 .IX Item "save-image-dumpxml file [--security-info]" Extract the domain \s-1XML\s0 that was in effect at the time the saved state file \fIfile\fR was created with the \fBsave\fR command. Using \&\fI\-\-security\-info\fR will also include security sensitive information. .IP "\fBsave-image-edit\fR \fIfile\fR [{\fI\-\-running\fR | \fI\-\-paused\fR}]" 4 .IX Item "save-image-edit file [{--running | --paused}]" Edit the \s-1XML\s0 configuration associated with a saved state file \fIfile\fR created by the \fBsave\fR command. .Sp The save image records whether the domain should be restored to a running or paused state. Normally, this command does not alter the recorded state; passing either the \fI\-\-running\fR or \fI\-\-paused\fR flag will allow overriding which state the \fBrestore\fR should use. .Sp This is equivalent to: .Sp .Vb 3 \& virsh save\-image\-dumpxml state\-file > state\-file.xml \& vi state\-file.xml (or make changes with your other text editor) \& virsh save\-image\-define state\-file state\-file\-xml .Ve .Sp except that it does some error checking. .Sp The editor used can be supplied by the \f(CW$VISUAL\fR or \f(CW$EDITOR\fR environment variables, and defaults to \f(CW\*(C`vi\*(C'\fR. .IP "\fBschedinfo\fR [\fI\-\-set\fR \fBparameter=value\fR] \fIdomain-id\fR [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]]" 4 .IX Item "schedinfo [--set parameter=value] domain-id [[--config] [--live] | [--current]]" .PD 0 .IP "\fBschedinfo\fR [\fI\-\-weight\fR \fBnumber\fR] [\fI\-\-cap\fR \fBnumber\fR] \fIdomain-id\fR" 4 .IX Item "schedinfo [--weight number] [--cap number] domain-id" .PD Allows you to show (and set) the domain scheduler parameters. The parameters available for each hypervisor are: .Sp \&\s-1LXC\s0 (posix scheduler) : cpu_shares .Sp \&\s-1QEMU/KVM\s0 (posix scheduler): cpu_shares, vcpu_period, vcpu_quota .Sp Xen (credit scheduler): weight, cap .Sp \&\s-1ESX\s0 (allocation scheduler): reservation, limit, shares .Sp If \fI\-\-live\fR is specified, set scheduler information of a running guest. If \fI\-\-config\fR is specified, affect the next boot of a persistent guest. If \fI\-\-current\fR is specified, affect the current guest state. .Sp \&\fBNote\fR: The cpu_shares parameter has a valid value range of 0\-262144; Negative values are wrapped to positive, and larger values are capped at the maximum. Therefore, \-1 is a useful shorthand for 262144. On the Linux kernel, the values 0 and 1 are automatically converted to a minimal value of 2. .Sp \&\fBNote\fR: The weight and cap parameters are defined only for the \&\s-1XEN_CREDIT\s0 scheduler and are now \fI\s-1DEPRECATED\s0\fR. .Sp \&\fBNote\fR: The vcpu_period parameter has a valid value range of 1000\-1000000 or 0, and the vcpu_quota parameter has a valid value range of 1000\-18446744073709551 or less than 0. The value 0 for either parameter is the same as not specifying that parameter. .IP "\fBscreenshot\fR \fIdomain-id\fR [\fIimagefilepath\fR] [\fI\-\-screen\fR \fBscreenID\fR]" 4 .IX Item "screenshot domain-id [imagefilepath] [--screen screenID]" Takes a screenshot of a current domain console and stores it into a file. Optionally, if hypervisor supports more displays for a domain, \fIscreenID\fR allows to specify which screen will be captured. It is the sequential number of screen. In case of multiple graphics cards, heads are enumerated before devices, e.g. having two graphics cards, both with four heads, screen \s-1ID\s0 5 addresses the second head on the second card. .IP "\fBsend-key\fR \fIdomain-id\fR [\fI\-\-codeset\fR \fBcodeset\fR] [\fI\-\-holdtime\fR \fBholdtime\fR] \fIkeycode\fR..." 4 .IX Item "send-key domain-id [--codeset codeset] [--holdtime holdtime] keycode..." Parse the \fIkeycode\fR sequence as keystrokes to send to \fIdomain-id\fR. Each \fIkeycode\fR can either be a numeric value or a symbolic name from the corresponding codeset. If \fI\-\-holdtime\fR is given, each keystroke will be held for that many milliseconds. The default codeset is \&\fBlinux\fR, but use of the \fI\-\-codeset\fR option allows other codesets to be chosen. .RS 4 .IP "\fBlinux\fR" 4 .IX Item "linux" The numeric values are those defined by the Linux generic input event subsystem. The symbolic names match the corresponding Linux key constant macro names. .IP "\fBxt\fR" 4 .IX Item "xt" The numeric values are those defined by the original \s-1XT\s0 keyboard controller. No symbolic names are provided .IP "\fBatset1\fR" 4 .IX Item "atset1" The numeric values are those defined by the \s-1AT\s0 keyboard controller, set 1 (aka \s-1XT\s0 compatible set). Extended keycoes from \fBatset1\fR may differ from extended keycodes in the \fBxt\fR codeset. No symbolic names are provided .IP "\fBatset2\fR" 4 .IX Item "atset2" The numeric values are those defined by the \s-1AT\s0 keyboard controller, set 2. No symbolic names are provided .IP "\fBatset3\fR" 4 .IX Item "atset3" The numeric values are those defined by the \s-1AT\s0 keyboard controller, set 3 (aka \s-1PS/2\s0 compatible set). No symbolic names are provided .IP "\fBos_x\fR" 4 .IX Item "os_x" The numeric values are those defined by the OS-X keyboard input subsystem. The symbolic names match the corresponding OS-X key constant macro names .IP "\fBxt_kbd\fR" 4 .IX Item "xt_kbd" The numeric values are those defined by the Linux \s-1KBD\s0 device. These are a variant on the original \s-1XT\s0 codeset, but often with different encoding for extended keycodes. No symbolic names are provided. .IP "\fBwin32\fR" 4 .IX Item "win32" The numeric values are those defined by the Win32 keyboard input subsystem. The symbolic names match the corresponding Win32 key constant macro names .IP "\fBusb\fR" 4 .IX Item "usb" The numeric values are those defined by the \s-1USB\s0 \s-1HID\s0 specification for keyboard input. No symbolic names are provided .IP "\fBrfb\fR" 4 .IX Item "rfb" The numeric values are those defined by the \s-1RFB\s0 extension for sending raw keycodes. These are a variant on the \s-1XT\s0 codeset, but extended keycodes have the low bit of the second byte set, instead of the high bit of the first byte. No symbolic names are provided. .RE .RS 4 .Sp \&\fBExamples\fR # send three strokes 'k', 'e', 'y', using xt codeset virsh send-key dom \-\-codeset xt 37 18 21 # send one stroke 'right\-ctrl+C' virsh send-key dom \s-1KEY_RIGHTCTRL\s0 \s-1KEY_C\s0 # send a tab, held for 1 second virsh send-key \-\-holdtime 1000 0xf .RE .IP "\fBsetmem\fR \fIdomain-id\fR \fBsize\fR [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]]" 4 .IX Item "setmem domain-id size [[--config] [--live] | [--current]]" Change the memory allocation for a guest domain. If \fI\-\-live\fR is specified, perform a memory balloon of a running guest. If \fI\-\-config\fR is specified, affect the next boot of a persistent guest. If \fI\-\-current\fR is specified, affect the current guest state. Both \fI\-\-live\fR and \fI\-\-config\fR flags may be given, but \fI\-\-current\fR is exclusive. If no flag is specified, behavior is different depending on hypervisor. .Sp \&\fIsize\fR is a scaled integer (see \fB\s-1NOTES\s0\fR above); it defaults to kibibytes (blocks of 1024 bytes) unless you provide a suffix (and the older option name \fI\-\-kilobytes\fR is available as a deprecated synonym) . Libvirt rounds up to the nearest kibibyte. Some hypervisors require a larger granularity than KiB, and requests that are not an even multiple will be rounded up. For example, vSphere/ESX rounds the parameter up to mebibytes (1024 kibibytes). .Sp For Xen, you can only adjust the memory of a running domain if the domain is paravirtualized or running the \s-1PV\s0 balloon driver. .IP "\fBsetmaxmem\fR \fIdomain-id\fR \fBsize\fR [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]]" 4 .IX Item "setmaxmem domain-id size [[--config] [--live] | [--current]]" Change the maximum memory allocation limit for a guest domain. If \fI\-\-live\fR is specified, affect a running guest. If \fI\-\-config\fR is specified, affect the next boot of a persistent guest. If \fI\-\-current\fR is specified, affect the current guest state. Both \fI\-\-live\fR and \fI\-\-config\fR flags may be given, but \fI\-\-current\fR is exclusive. If no flag is specified, behavior is different depending on hypervisor. .Sp This command works for at least the Xen, \s-1QEMU/KVM\s0 and vSphere/ESX hypervisors. .Sp \&\fIsize\fR is a scaled integer (see \fB\s-1NOTES\s0\fR above); it defaults to kibibytes (blocks of 1024 bytes) unless you provide a suffix (and the older option name \fI\-\-kilobytes\fR is available as a deprecated synonym) . Libvirt rounds up to the nearest kibibyte. Some hypervisors require a larger granularity than KiB, and requests that are not an even multiple will be rounded up. For example, vSphere/ESX rounds the parameter up to mebibytes (1024 kibibytes). .IP "\fBmemtune\fR \fIdomain-id\fR [\fI\-\-hard\-limit\fR \fBsize\fR] [\fI\-\-soft\-limit\fR \fBsize\fR] [\fI\-\-swap\-hard\-limit\fR \fBsize\fR] [\fI\-\-min\-guarantee\fR \fBsize\fR] [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]]" 4 .IX Item "memtune domain-id [--hard-limit size] [--soft-limit size] [--swap-hard-limit size] [--min-guarantee size] [[--config] [--live] | [--current]]" Allows you to display or set the domain memory parameters. Without flags, the current settings are displayed; with a flag, the appropriate limit is adjusted if supported by the hypervisor. \s-1LXC\s0 and \&\s-1QEMU/KVM\s0 support \fI\-\-hard\-limit\fR, \fI\-\-soft\-limit\fR, and \fI\-\-swap\-hard\-limit\fR. \&\fI\-\-min\-guarantee\fR is supported only by \s-1ESX\s0 hypervisor. Each of these limits are scaled integers (see \fB\s-1NOTES\s0\fR above), with a default of kibibytes (blocks of 1024 bytes) if no suffix is present. .Sp If \fI\-\-live\fR is specified, affect a running guest. If \fI\-\-config\fR is specified, affect the next boot of a persistent guest. If \fI\-\-current\fR is specified, affect the current guest state. Both \fI\-\-live\fR and \fI\-\-config\fR flags may be given, but \fI\-\-current\fR is exclusive. If no flag is specified, behavior is different depending on hypervisor. .Sp For \s-1QEMU/KVM\s0, the parameters are applied to the \s-1QEMU\s0 process as a whole. Thus, when counting them, one needs to add up guest \s-1RAM\s0, guest video \s-1RAM\s0, and some memory overhead of \s-1QEMU\s0 itself. The last piece is hard to determine so one needs guess and try. .RS 4 .IP "\fI\-\-hard\-limit\fR" 4 .IX Item "--hard-limit" The maximum memory the guest can use. .IP "\fI\-\-soft\-limit\fR" 4 .IX Item "--soft-limit" The memory limit to enforce during memory contention. .IP "\fI\-\-swap\-hard\-limit\fR" 4 .IX Item "--swap-hard-limit" The maximum memory plus swap the guest can use. This has to be more than hard-limit value provided. .IP "\fI\-\-min\-guarantee\fR" 4 .IX Item "--min-guarantee" The guaranteed minimum memory allocation for the guest. .RE .RS 4 .Sp Specifying \-1 as a value for these limits is interpreted as unlimited. .RE .IP "\fBblkiotune\fR \fIdomain-id\fR [\fI\-\-weight\fR \fBweight\fR] [\fI\-\-device\-weights\fR \fBdevice-weights\fR] [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]]" 4 .IX Item "blkiotune domain-id [--weight weight] [--device-weights device-weights] [[--config] [--live] | [--current]]" Display or set the blkio parameters. \s-1QEMU/KVM\s0 supports \fI\-\-weight\fR. \&\fI\-\-weight\fR is in range [100, 1000]. .Sp \&\fBdevice-weights\fR is a single string listing one or more device/weight pairs, in the format of /path/to/device,weight,/path/to/device,weight. Each weight is in the range [100, 1000], or the value 0 to remove that device from per-device listings. Only the devices listed in the string are modified; any existing per-device weights for other devices remain unchanged. .Sp If \fI\-\-live\fR is specified, affect a running guest. If \fI\-\-config\fR is specified, affect the next boot of a persistent guest. If \fI\-\-current\fR is specified, affect the current guest state. Both \fI\-\-live\fR and \fI\-\-config\fR flags may be given, but \fI\-\-current\fR is exclusive. If no flag is specified, behavior is different depending on hypervisor. .IP "\fBsetvcpus\fR \fIdomain-id\fR \fIcount\fR [\fI\-\-maximum\fR] [[\fI\-\-config\fR] [\fI\-\-live\fR] | [\fI\-\-current\fR]]" 4 .IX Item "setvcpus domain-id count [--maximum] [[--config] [--live] | [--current]]" Change the number of virtual CPUs active in a guest domain. By default, this command works on active guest domains. To change the settings for an inactive guest domain, use the \fI\-\-config\fR flag. .Sp The \fIcount\fR value may be limited by host, hypervisor, or a limit coming from the original description of the guest domain. For Xen, you can only adjust the virtual CPUs of a running domain if the domain is paravirtualized. .Sp If the \fI\-\-config\fR flag is specified, the change is made to the stored \s-1XML\s0 configuration for the guest domain, and will only take effect when the guest domain is next started. .Sp If \fI\-\-live\fR is specified, the guest domain must be active, and the change takes place immediately. Both the \fI\-\-config\fR and \fI\-\-live\fR flags may be specified together if supported by the hypervisor. .Sp If \fI\-\-current\fR is specified, affect the current guest state. .Sp When no flags are given, the \fI\-\-live\fR flag is assumed and the guest domain must be active. In this situation it is up to the hypervisor whether the \fI\-\-config\fR flag is also assumed, and therefore whether the \s-1XML\s0 configuration is adjusted to make the change persistent. .Sp The \fI\-\-maximum\fR flag controls the maximum number of virtual cpus that can be hot-plugged the next time the domain is booted. As such, it must only be used with the \fI\-\-config\fR flag, and not with the \fI\-\-live\fR flag. .IP "\fBshutdown\fR \fIdomain-id\fR [\fI\-\-mode acpi|agent\fR]" 4 .IX Item "shutdown domain-id [--mode acpi|agent]" Gracefully shuts down a domain. This coordinates with the domain \s-1OS\s0 to perform graceful shutdown, so there is no guarantee that it will succeed, and may take a variable length of time depending on what services must be shutdown in the domain. .Sp The exact behavior of a domain when it shuts down is set by the \&\fIon_shutdown\fR parameter in the domain's \s-1XML\s0 definition. .Sp If \fIdomain-id\fR is transient, then the metadata of any snapshots will be lost once the guest stops running, but the snapshot contents still exist, and a new domain with the same name and \s-1UUID\s0 can restore the snapshot metadata with \fBsnapshot-create\fR. .Sp By default the hypervisor will try to pick a suitable shutdown method. To specify an alternative method, the \fI\-\-mode\fR parameter can specify \f(CW\*(C`acpi\*(C'\fR or \f(CW\*(C`agent\*(C'\fR. .IP "\fBstart\fR \fIdomain-name\fR [\fI\-\-console\fR] [\fI\-\-paused\fR] [\fI\-\-autodestroy\fR] [\fI\-\-bypass\-cache\fR] [\fI\-\-force\-boot\fR]" 4 .IX Item "start domain-name [--console] [--paused] [--autodestroy] [--bypass-cache] [--force-boot]" Start a (previously defined) inactive domain, either from the last \&\fBmanagedsave\fR state, or via a fresh boot if no managedsave state is present. The domain will be paused if the \fI\-\-paused\fR option is used and supported by the driver; otherwise it will be running. If \fI\-\-console\fR is requested, attach to the console after creation. If \fI\-\-autodestroy\fR is requested, then the guest will be automatically destroyed when virsh closes its connection to libvirt, or otherwise exits. If \fI\-\-bypass\-cache\fR is specified, and managedsave state exists, the restore will avoid the file system cache, although this may slow down the operation. If \fI\-\-force\-boot\fR is specified, then any managedsave state is discarded and a fresh boot occurs. .IP "\fBsuspend\fR \fIdomain-id\fR" 4 .IX Item "suspend domain-id" Suspend a running domain. It is kept in memory but won't be scheduled anymore. .IP "\fBresume\fR \fIdomain-id\fR" 4 .IX Item "resume domain-id" Moves a domain out of the suspended state. This will allow a previously suspended domain to now be eligible for scheduling by the underlying hypervisor. .IP "\fBdompmsuspend\fR \fIdomain-id\fR \fItarget\fR" 4 .IX Item "dompmsuspend domain-id target" Suspend a running domain into one of these states (possible \fItarget\fR values): mem equivallent of S3 \s-1ACPI\s0 state disk equivallent of S4 \s-1ACPI\s0 state hybrid \s-1RAM\s0 is saved to disk but not powered off .IP "\fBdompmwakeup\fR \fIdomain-id\fR" 4 .IX Item "dompmwakeup domain-id" Wakeup a domain suspended by dompmsuspend command. Injects a wakeup into the guest that previously used dompmsuspend, rather than waiting for the previously requested duration (if any) to elapse. .IP "\fBttyconsole\fR \fIdomain-id\fR" 4 .IX Item "ttyconsole domain-id" Output the device used for the \s-1TTY\s0 console of the domain. If the information is not available the processes will provide an exit code of 1. .IP "\fBundefine\fR \fIdomain-id\fR [\fI\-\-managed\-save\fR] [\fI\-\-snapshots\-metadata\fR] [ {\fI\-\-storage\fR \fBvolumes\fR | \fI\-\-remove\-all\-storage\fR} \fI\-\-wipe\-storage\fR]" 4 .IX Item "undefine domain-id [--managed-save] [--snapshots-metadata] [ {--storage volumes | --remove-all-storage} --wipe-storage]" Undefine a domain. If the domain is running, this converts it to a transient domain, without stopping it. If the domain is inactive, the domain configuration is removed. .Sp The \fI\-\-managed\-save\fR flag guarantees that any managed save image (see the \fBmanagedsave\fR command) is also cleaned up. Without the flag, attempts to undefine a domain with a managed save image will fail. .Sp The \fI\-\-snapshots\-metadata\fR flag guarantees that any snapshots (see the \&\fBsnapshot-list\fR command) are also cleaned up when undefining an inactive domain. Without the flag, attempts to undefine an inactive domain with snapshot metadata will fail. If the domain is active, this flag is ignored. .Sp The \fI\-\-storage\fR flag takes a parameter \fBvolumes\fR, which is a comma separated list of volume target names or source paths of storage volumes to be removed along with the undefined domain. Volumes can be undefined and thus removed only on inactive domains. Volume deletion is only attempted after the domain is undefined; if not all of the requested volumes could be deleted, the error message indicates what still remains behind. If a volume path is not found in the domain definition, it's treated as if the volume was successfully deleted. (See \fBdomblklist\fR for list of target names associated to a domain). Example: \-\-storage vda,/path/to/storage.img .Sp The \fI\-\-remove\-all\-storage\fR flag specifies that all of the domain's storage volumes should be deleted. .Sp The flag \fI\-\-wipe\-storage\fR specifies that the storage volumes should be wiped before removal. .Sp \&\s-1NOTE:\s0 For an inactive domain, the domain name or \s-1UUID\s0 must be used as the \&\fIdomain-id\fR. .IP "\fBvcpucount\fR \fIdomain-id\fR [{\fI\-\-maximum\fR | \fI\-\-active\fR} {\fI\-\-config\fR | \fI\-\-live\fR | \fI\-\-current\fR}]" 4 .IX Item "vcpucount domain-id [{--maximum | --active} {--config | --live | --current}]" Print information about the virtual cpu counts of the given \&\fIdomain-id\fR. If no flags are specified, all possible counts are listed in a table; otherwise, the output is limited to just the numeric value requested. For historical reasons, the table lists the label \*(L"current\*(R" on the rows that can be queried in isolation via the \fI\-\-active\fR flag, rather than relating to the \fI\-\-current\fR flag. .Sp \&\fI\-\-maximum\fR requests information on the maximum cap of vcpus that a domain can add via \fBsetvcpus\fR, while \fI\-\-active\fR shows the current usage; these two flags cannot both be specified. \fI\-\-config\fR requires a persistent domain and requests information regarding the next time the domain will be booted, \fI\-\-live\fR requires a running domain and lists current values, and \fI\-\-current\fR queries according to the current state of the domain (corresponding to \fI\-\-live\fR if running, or \&\fI\-\-config\fR if inactive); these three flags are mutually exclusive. Thus, this command always takes exactly zero or two flags. .IP "\fBvcpuinfo\fR \fIdomain-id\fR" 4 .IX Item "vcpuinfo domain-id" Returns basic information about the domain virtual CPUs, like the number of vCPUs, the running time, the affinity to physical processors. .IP "\fBvcpupin\fR \fIdomain-id\fR [\fIvcpu\fR] [\fIcpulist\fR] [[\fI\-\-live\fR] [\fI\-\-config\fR] | [\fI\-\-current\fR]]" 4 .IX Item "vcpupin domain-id [vcpu] [cpulist] [[--live] [--config] | [--current]]" Query or change the pinning of domain VCPUs to host physical CPUs. To pin a single \fIvcpu\fR, specify \fIcpulist\fR; otherwise, you can query one \&\fIvcpu\fR or omit \fIvcpu\fR to list all at once. .Sp \&\fIcpulist\fR is a list of physical \s-1CPU\s0 numbers. Its syntax is a comma separated list and a special markup using '\-' and '^' (ex. '0\-4', '0\-3,^2') can also be allowed. The '\-' denotes the range and the '^' denotes exclusive. If you want to reset vcpupin setting, that is, to pin vcpu all physical cpus, simply specify 'r' as a cpulist. If \fI\-\-live\fR is specified, affect a running guest. If \fI\-\-config\fR is specified, affect the next boot of a persistent guest. If \fI\-\-current\fR is specified, affect the current guest state. Both \fI\-\-live\fR and \fI\-\-config\fR flags may be given if \fIcpulist\fR is present, but \fI\-\-current\fR is exclusive. If no flag is specified, behavior is different depending on hypervisor. .Sp \&\fBNote\fR: The expression is sequentially evaluated, so \*(L"0\-15,^8\*(R" is identical to \*(L"9\-14,0\-7,15\*(R" but not identical to \*(L"^8,0\-15\*(R". .IP "\fBvncdisplay\fR \fIdomain-id\fR" 4 .IX Item "vncdisplay domain-id" Output the \s-1IP\s0 address and port number for the \s-1VNC\s0 display. If the information is not available the processes will provide an exit code of 1. .SH "DEVICE COMMANDS" .IX Header "DEVICE COMMANDS" The following commands manipulate devices associated to domains. The domain-id can be specified as a short integer, a name or a full \s-1UUID\s0. To better understand the values allowed as options for the command reading the documentation at on the format of the device sections to get the most accurate set of accepted values. .IP "\fBattach-device\fR \fIdomain-id\fR \fI\s-1FILE\s0\fR [\fI\-\-config\fR]" 4 .IX Item "attach-device domain-id FILE [--config]" Attach a device to the domain, using a device definition in an \s-1XML\s0 file using a device definition element such as or as the top-level element. See the documentation at to learn about libvirt \s-1XML\s0 format for a device. If \fI\-\-config\fR is specified the command alters the persistent domain configuration with the device attach taking effect the next time libvirt starts the domain. For compatibility purposes, \fI\-\-persistent\fR is an alias of \fI\-\-config\fR. For cdrom and floppy devices, this command only replaces the media within an existing device; consider using \fBupdate-device\fR for this usage. For passthrough host devices, see also \fBnodedev-detach\fR, needed if the device does not use managed mode. .IP "\fBattach-disk\fR \fIdomain-id\fR \fIsource\fR \fItarget\fR [\fI\-\-driver driver\fR] [\fI\-\-subdriver subdriver\fR] [\fI\-\-cache cache\fR] [\fI\-\-type type\fR] [\fI\-\-mode mode\fR] [\fI\-\-config\fR] [\fI\-\-sourcetype soucetype\fR] [\fI\-\-serial serial\fR] [\fI\-\-shareable\fR] [\fI\-\-rawio\fR] [\fI\-\-address address\fR] [\fI\-\-multifunction\fR]" 4 .IX Item "attach-disk domain-id source target [--driver driver] [--subdriver subdriver] [--cache cache] [--type type] [--mode mode] [--config] [--sourcetype soucetype] [--serial serial] [--shareable] [--rawio] [--address address] [--multifunction]" Attach a new disk device to the domain. \&\fIsource\fR and \fItarget\fR are paths for the files and devices. \&\fIdriver\fR can be \fIfile\fR, \fItap\fR or \fIphy\fR for the Xen hypervisor depending on the kind of access; or \fIqemu\fR for the \s-1QEMU\s0 emulator. \&\fItype\fR can indicate \fIcdrom\fR or \fIfloppy\fR as alternative to the disk default, although this use only replaces the media within the existing virtual cdrom or floppy device; consider using \fBupdate-device\fR for this usage instead. \&\fImode\fR can specify the two specific mode \fIreadonly\fR or \fIshareable\fR. \&\fI\-\-config\fR indicates the changes will affect the next boot of the domain, for compatibility purposes, \fI\-\-persistent\fR is alias of \fI\-\-config\fR. \&\fIsourcetype\fR can indicate the type of source (block|file) \&\fIcache\fR can be one of \*(L"default\*(R", \*(L"none\*(R", \*(L"writethrough\*(R", \*(L"writeback\*(R", \&\*(L"directsync\*(R" or \*(L"unsafe\*(R". \&\fIserial\fR is the serial of disk device. \fIshareable\fR indicates the disk device is shareable between domains. \&\fIrawio\fR indicates the disk needs rawio capability. \&\fIaddress\fR is the address of disk device in the form of pci:domain.bus.slot.function, scsi:controller.bus.unit or ide:controller.bus.unit. \&\fImultifunction\fR indicates specified pci address is a multifunction pci device address. .IP "\fBattach-interface\fR \fIdomain-id\fR \fItype\fR \fIsource\fR [\fI\-\-target target\fR] [\fI\-\-mac mac\fR] [\fI\-\-script script\fR] [\fI\-\-model model\fR] [\fI\-\-config\fR] [\fI\-\-inbound average,peak,burst\fR] [\fI\-\-outbound average,peak,burst\fR]" 4 .IX Item "attach-interface domain-id type source [--target target] [--mac mac] [--script script] [--model model] [--config] [--inbound average,peak,burst] [--outbound average,peak,burst]" Attach a new network interface to the domain. \&\fItype\fR can be either \fInetwork\fR to indicate a physical network device or \&\fIbridge\fR to indicate a bridge to a device. \&\fIsource\fR indicates the source device. \&\fItarget\fR allows to indicate the target device in the guest. \&\fImac\fR allows to specify the \s-1MAC\s0 address of the network interface. \&\fIscript\fR allows to specify a path to a script handling a bridge instead of the default one. \&\fImodel\fR allows to specify the model type. \&\fI\-\-config\fR indicates the changes will affect the next boot of the domain, for compatibility purposes, \fI\-\-persistent\fR is alias of \fI\-\-config\fR. \&\fIinbound\fR and \fIoutbound\fR control the bandwidth of the interface. \fIpeak\fR and \fIburst\fR are optional, so \*(L"average,peak\*(R", \*(L"average,,burst\*(R" and \&\*(L"average\*(R" are also legal. .Sp \&\fBNote\fR: the optional target value is the name of a device to be created as the back-end on the node. If not provided a device named \*(L"vnetN\*(R" or \*(L"vifN\*(R" will be created automatically. .IP "\fBdetach-device\fR \fIdomain-id\fR \fI\s-1FILE\s0\fR [\fI\-\-config\fR]" 4 .IX Item "detach-device domain-id FILE [--config]" Detach a device from the domain, takes the same kind of \s-1XML\s0 descriptions as command \fBattach-device\fR. If \fI\-\-config\fR is specified, alter persistent configuration, effect observed on next boot, for compatibility purposes, \fI\-\-persistent\fR is alias of \&\fI\-\-config\fR. For passthrough host devices, see also \fBnodedev-reattach\fR, needed if the device does not use managed mode. .IP "\fBdetach-disk\fR \fIdomain-id\fR \fItarget\fR [\fI\-\-config\fR]" 4 .IX Item "detach-disk domain-id target [--config]" Detach a disk device from a domain. The \fItarget\fR is the device as seen from the domain. If \fI\-\-config\fR is specified, alter persistent configuration, effect observed on next boot, for compatibility purposes, \fI\-\-persistent\fR is alias of \&\fI\-\-config\fR. .IP "\fBdetach-interface\fR \fIdomain-id\fR \fItype\fR [\fI\-\-mac mac\fR] [\fI\-\-config\fR]" 4 .IX Item "detach-interface domain-id type [--mac mac] [--config]" Detach a network interface from a domain. \&\fItype\fR can be either \fInetwork\fR to indicate a physical network device or \&\fIbridge\fR to indicate a bridge to a device. It is recommended to use the \&\fImac\fR option to distinguish between the interfaces if more than one are present on the domain. If \fI\-\-config\fR is specified, alter persistent configuration, effect observed on next boot, for compatibility purposes, \fI\-\-persistent\fR is alias of \&\fI\-\-config\fR. .IP "\fBupdate-device\fR \fIdomain-id\fR \fIfile\fR [\fI\-\-config\fR] [\fI\-\-force\fR]" 4 .IX Item "update-device domain-id file [--config] [--force]" Update the characteristics of a device associated with \fIdomain-id\fR, based on the device definition in an \s-1XML\s0 \fIfile\fR. If the \fI\-\-config\fR option is used, the changes will take affect the next time libvirt starts the domain. For compatibility purposes, \fI\-\-persistent\fR is alias of \fI\-\-config\fR. The \fI\-\-force\fR option can be used to force device update, e.g., to eject a CD-ROM even if it is locked/mounted in the domain. See the documentation at to learn about libvirt \s-1XML\s0 format for a device. .IP "\fBchange-media\fR \fIdomain-id\fR \fIpath\fR [\fI\-\-eject\fR] [\fI\-\-insert\fR] [\fI\-\-update\fR] [\fIsource\fR] [\fI\-\-force\fR] [[\fI\-\-live\fR] [\fI\-\-config\fR] | [\fI\-\-current\fR]]" 4 .IX Item "change-media domain-id path [--eject] [--insert] [--update] [source] [--force] [[--live] [--config] | [--current]]" Change media of \s-1CDROM\s0 or floppy drive. \fIpath\fR can be the fully-qualified path or the unique target name () of the disk device. \fIsource\fR specifies the path of the media to be inserted or updated. .Sp \&\fI\-\-eject\fR indicates the media will be ejected. \&\fI\-\-insert\fR indicates the media will be inserted. \fIsource\fR must be specified. If the device has source (e.g. ), and \fIsource\fR is not specified, \fI\-\-update\fR is equal to \fI\-\-eject\fR. If the device has no source, and \fIsource\fR is specified, \fI\-\-update\fR is equal to \fI\-\-insert\fR. If the device has source, and \fIsource\fR is specified, \fI\-\-update\fR behaves like combination of \fI\-\-eject\fR and \fI\-\-insert\fR. If none of \fI\-\-eject\fR, \fI\-\-insert\fR, and \fI\-\-update\fR is specified, \fI\-\-update\fR is used by default. The \fI\-\-force\fR option can be used to force media changing. If \fI\-\-live\fR is specified, alter live configuration of running guest. If \fI\-\-config\fR is specified, alter persistent configuration, effect observed on next boot. \&\fI\-\-current\fR can be either or both of \fIlive\fR and \fIconfig\fR, depends on the hypervisor's implementation. Both \fI\-\-live\fR and \fI\-\-config\fR flags may be given, but \fI\-\-current\fR is exclusive. If no flag is specified, behavior is different depending on hypervisor. .SH "NODEDEV COMMANDS" .IX Header "NODEDEV COMMANDS" The following commands manipulate host devices that are intended to be passed through to guest domains via elements in a domain's section. A node device key is generally specified by the bus name followed by its address, using underscores between all components, such as pci_0000_00_02_1, usb_1_5_3, or net_eth1_00_27_13_6a_fe_00. The \fBnodedev-list\fR gives the full list of host devices that are known to libvirt, although this includes devices that cannot be assigned to a guest (for example, attempting to detach the \s-1PCI\s0 device that controls the host's hard disk controller where the guest's disk images live could cause the host system to lock up or reboot). .PP For more information on node device definition see: . .PP Passthrough devices cannot be simultaneously used by the host and its guest domains, nor by multiple active guests at once. If the description includes the attribute \fBmanaged='yes'\fR, and the hypervisor driver supports it, then the device is in managed mode, and attempts to use that passthrough device in an active guest will automatically behave as if \fBnodedev-detach\fR (guest start, device hot-plug) and \fBnodedev-reattach\fR (guest stop, device hot-unplug) were called at the right points (currently, qemu does this for \s-1PCI\s0 devices, but not \s-1USB\s0). If a device is not marked as managed, then it must manually be detached before guests can use it, and manually reattached to be returned to the host. Also, if a device is manually detached, then the host does not regain control of the device without a matching reattach, even if the guests use the device in managed mode. .IP "\fBnodedev-create\fR \fI\s-1FILE\s0\fR" 4 .IX Item "nodedev-create FILE" Create a device on the host node that can then be assigned to virtual machines. Normally, libvirt is able to automatically determine which host nodes are available for use, but this allows registration of host hardware that libvirt did not automatically detect. \fIfile\fR contains xml for a top-level description of a node device. .IP "\fBnodedev-destroy\fR \fInodedev\fR" 4 .IX Item "nodedev-destroy nodedev" Destroy (stop) a device on the host. Note that this makes libvirt quit managing a host device, and may even make that device unusable by the rest of the physical host until a reboot. .IP "\fBnodedev-detach\fR \fInodedev\fR" 4 .IX Item "nodedev-detach nodedev" Detach \fInodedev\fR from the host, so that it can safely be used by guests via passthrough. This is reversed with \&\fBnodedev-reattach\fR, and is done automatically for managed devices. For compatibility purposes, this command can also be spelled \&\fBnodedev-dettach\fR. .IP "\fBnodedev-dumpxml\fR \fInodedev\fR" 4 .IX Item "nodedev-dumpxml nodedev" Dump a \s-1XML\s0 representation for the given node device, including such information as the device name, which bus owns the device, the vendor and product id, and any capabilities of the device usable by libvirt (such as whether device reset is supported). .IP "\fBnodedev-list\fR \fIcap\fR \fI\-\-tree\fR" 4 .IX Item "nodedev-list cap --tree" List all of the devices available on the node that are known by libvirt. If \fIcap\fR is used, the list is filtered to show only the nodes that include the given capability. If \fI\-\-tree\fR is used, the output is formatted in a tree representing parents of each node. .IP "\fBnodedev-reattach\fR \fInodedev\fR" 4 .IX Item "nodedev-reattach nodedev" Declare that \fInodedev\fR is no longer in use by any guests, and that the host can resume normal use of the device. This is done automatically for devices in managed mode, but must be done explicitly to match any explicit \fBnodedev-detach\fR. .IP "\fBnodedev-reset\fR \fInodedev\fR" 4 .IX Item "nodedev-reset nodedev" Trigger a device reset for \fInodedev\fR, useful prior to transferring a node device between guest passthrough or the host. Libvirt will often do this action implicitly when required, but this command allows an explicit reset when needed. .SH "VIRTUAL NETWORK COMMANDS" .IX Header "VIRTUAL NETWORK COMMANDS" The following commands manipulate networks. Libvirt has the capability to define virtual networks which can then be used by domains and linked to actual network devices. For more detailed information about this feature see the documentation at . Many of the commands for virtual networks are similar to the ones used for domains, but the way to name a virtual network is either by its name or \s-1UUID\s0. .IP "\fBnet-autostart\fR \fInetwork\fR [\fI\-\-disable\fR]" 4 .IX Item "net-autostart network [--disable]" Configure a virtual network to be automatically started at boot. The \fI\-\-disable\fR option disable autostarting. .IP "\fBnet-create\fR \fIfile\fR" 4 .IX Item "net-create file" Create a virtual network from an \s-1XML\s0 \fIfile\fR, see the documentation at to get a description of the \&\s-1XML\s0 network format used by libvirt. .IP "\fBnet-define\fR \fIfile\fR" 4 .IX Item "net-define file" Define a virtual network from an \s-1XML\s0 \fIfile\fR, the network is just defined but not instantiated. .IP "\fBnet-destroy\fR \fInetwork\fR" 4 .IX Item "net-destroy network" Destroy (stop) a given virtual network specified by its name or \s-1UUID\s0. This takes effect immediately. .IP "\fBnet-dumpxml\fR \fInetwork\fR [\fI\-\-inactive\fR]" 4 .IX Item "net-dumpxml network [--inactive]" Output the virtual network information as an \s-1XML\s0 dump to stdout. If \fI\-\-inactive\fR is specified, then physical functions are not expanded into their associated virtual functions. .IP "\fBnet-edit\fR \fInetwork\fR" 4 .IX Item "net-edit network" Edit the \s-1XML\s0 configuration file for a network. .Sp This is equivalent to: .Sp .Vb 3 \& virsh net\-dumpxml network > network.xml \& vi network.xml (or make changes with your other text editor) \& virsh net\-define network.xml .Ve .Sp except that it does some error checking. .Sp The editor used can be supplied by the \f(CW$VISUAL\fR or \f(CW$EDITOR\fR environment variables, and defaults to \f(CW\*(C`vi\*(C'\fR. .IP "\fBnet-info\fR \fInetwork\fR" 4 .IX Item "net-info network" Returns basic information about the \fInetwork\fR object. .IP "\fBnet-list\fR [\fI\-\-inactive\fR | \fI\-\-all\fR]" 4 .IX Item "net-list [--inactive | --all]" Returns the list of active networks, if \fI\-\-all\fR is specified this will also include defined but inactive networks, if \fI\-\-inactive\fR is specified only the inactive ones will be listed. .IP "\fBnet-name\fR \fInetwork-UUID\fR" 4 .IX Item "net-name network-UUID" Convert a network \s-1UUID\s0 to network name. .IP "\fBnet-start\fR \fInetwork\fR" 4 .IX Item "net-start network" Start a (previously defined) inactive network. .IP "\fBnet-undefine\fR \fInetwork\fR" 4 .IX Item "net-undefine network" Undefine the configuration for an inactive network. .IP "\fBnet-uuid\fR \fInetwork-name\fR" 4 .IX Item "net-uuid network-name" Convert a network name to network \s-1UUID\s0. .SH "INTERFACE COMMANDS" .IX Header "INTERFACE COMMANDS" The following commands manipulate host interfaces. Often, these host interfaces can then be used by name within domain elements (such as a system-created bridge interface), but there is no requirement that host interfaces be tied to any particular guest configuration \s-1XML\s0 at all. .PP Many of the commands for host interfaces are similar to the ones used for domains, and the way to name an interface is either by its name or its \s-1MAC\s0 address. However, using a \s-1MAC\s0 address for an \fIiface\fR argument only works when that address is unique (if an interface and a bridge share the same \s-1MAC\s0 address, which is often the case, then using that \s-1MAC\s0 address results in an error due to ambiguity, and you must resort to a name instead). .IP "\fBiface-bridge\fR \fIinterface\fR \fIbridge\fR [\fI\-\-no\-stp\fR] [\fIdelay\fR] [\fI\-\-no\-start\fR]" 4 .IX Item "iface-bridge interface bridge [--no-stp] [delay] [--no-start]" Create a bridge device named \fIbridge\fR, and attach the existing network device \fIinterface\fR to the new bridge. The new bridge defaults to starting immediately, with \s-1STP\s0 enabled and a delay of 0; these settings can be altered with \fI\-\-no\-stp\fR, \fI\-\-no\-start\fR, and an integer number of seconds for \fIdelay\fR. All \s-1IP\s0 address configuration of \fIinterface\fR will be moved to the new bridge device. .Sp See also \fBiface-unbridge\fR for undoing this operation. .IP "\fBiface-define\fR \fIfile\fR" 4 .IX Item "iface-define file" Define a host interface from an \s-1XML\s0 \fIfile\fR, the interface is just defined but not started. .IP "\fBiface-destroy\fR \fIinterface\fR" 4 .IX Item "iface-destroy interface" Destroy (stop) a given host interface, such as by running \*(L"if-down\*(R" to disable that interface from active use. This takes effect immediately. .IP "\fBiface-dumpxml\fR \fIinterface\fR [\fI\-\-inactive\fR]" 4 .IX Item "iface-dumpxml interface [--inactive]" Output the host interface information as an \s-1XML\s0 dump to stdout. If \&\fI\-\-inactive\fR is specified, then the output reflects the persistent state of the interface that will be used the next time it is started. .IP "\fBiface-edit\fR \fIinterface\fR" 4 .IX Item "iface-edit interface" Edit the \s-1XML\s0 configuration file for a host interface. .Sp This is equivalent to: .Sp .Vb 3 \& virsh iface\-dumpxml iface > iface.xml \& vi iface.xml (or make changes with your other text editor) \& virsh iface\-define iface.xml .Ve .Sp except that it does some error checking. .Sp The editor used can be supplied by the \f(CW$VISUAL\fR or \f(CW$EDITOR\fR environment variables, and defaults to \f(CW\*(C`vi\*(C'\fR. .IP "\fBiface-list\fR [\fI\-\-inactive\fR | \fI\-\-all\fR]" 4 .IX Item "iface-list [--inactive | --all]" Returns the list of active host interfaces. If \fI\-\-all\fR is specified this will also include defined but inactive interfaces. If \&\fI\-\-inactive\fR is specified only the inactive ones will be listed. .IP "\fBiface-name\fR \fIinterface\fR" 4 .IX Item "iface-name interface" Convert a host interface \s-1MAC\s0 to interface name, if the \s-1MAC\s0 address is unique among the host's interfaces. .Sp \&\fIinterface\fR specifies the interface \s-1MAC\s0 address. .IP "\fBiface-mac\fR \fIinterface\fR" 4 .IX Item "iface-mac interface" Convert a host interface name to \s-1MAC\s0 address. .Sp \&\fIinterface\fR specifies the interface name. .IP "\fBiface-start\fR \fIinterface\fR" 4 .IX Item "iface-start interface" Start a (previously defined) host interface, such as by running \*(L"if-up\*(R". .IP "\fBiface-unbridge\fR \fIbridge\fR [\fI\-\-no\-start\fR]" 4 .IX Item "iface-unbridge bridge [--no-start]" Tear down a bridge device named \fIbridge\fR, releasing its underlying interface back to normal usage, and moving all \s-1IP\s0 address configuration from the bridge device to the underlying device. The underlying interface is restarted unless \fI\-\-no\-start\fR is present; this flag is present for symmetry, but generally not recommended. .Sp See also \fBiface-bridge\fR for creating a bridge. .IP "\fBiface-undefine\fR \fIinterface\fR" 4 .IX Item "iface-undefine interface" Undefine the configuration for an inactive host interface. .IP "\fBiface-begin\fR" 4 .IX Item "iface-begin" Create a snapshot of current host interface settings, which can later be committed (\fIiface-commit\fR) or restored (\fIiface-rollback\fR). If a snapshot already exists, then this command will fail until the previous snapshot has been committed or restored. Undefined behavior results if any external changes are made to host interfaces outside of the libvirt \s-1API\s0 between the beginning of a snapshot and its eventual commit or rollback. .IP "\fBiface-commit\fR" 4 .IX Item "iface-commit" Declare all changes since the last \fIiface-begin\fR as working, and delete the rollback point. If no interface snapshot has already been started, then this command will fail. .IP "\fBiface-rollback\fR" 4 .IX Item "iface-rollback" Revert all host interface settings back to the state recorded in the last \fIiface-begin\fR. If no interface snapshot has already been started, then this command will fail. Rebooting the host also serves as an implicit rollback point. .SH "STORAGE POOL COMMANDS" .IX Header "STORAGE POOL COMMANDS" The following commands manipulate storage pools. Libvirt has the capability to manage various storage solutions, including files, raw partitions, and domain-specific formats, used to provide the storage volumes visible as devices within virtual machines. For more detailed information about this feature, see the documentation at . Many of the commands for pools are similar to the ones used for domains. .IP "\fBfind-storage-pool-sources\fR \fItype\fR [\fIsrcSpec\fR]" 4 .IX Item "find-storage-pool-sources type [srcSpec]" Returns \s-1XML\s0 describing all storage pools of a given \fItype\fR that could be found. If \fIsrcSpec\fR is provided, it is a file that contains \s-1XML\s0 to further restrict the query for pools. .IP "\fBfind-storage-pool-sources-as\fR \fItype\fR [\fIhost\fR] [\fIport\fR] [\fIinitiator\fR]" 4 .IX Item "find-storage-pool-sources-as type [host] [port] [initiator]" Returns \s-1XML\s0 describing all storage pools of a given \fItype\fR that could be found. If \fIhost\fR, \fIport\fR, or \fIinitiator\fR are provided, they control where the query is performed. .IP "\fBpool-autostart\fR \fIpool-or-uuid\fR [\fI\-\-disable\fR]" 4 .IX Item "pool-autostart pool-or-uuid [--disable]" Configure whether \fIpool\fR should automatically start at boot. .IP "\fBpool-build\fR \fIpool-or-uuid\fR [\fI\-\-overwrite\fR] [\fI\-\-no\-overwrite\fR]" 4 .IX Item "pool-build pool-or-uuid [--overwrite] [--no-overwrite]" Build a given pool. .Sp Options \fI\-\-overwrite\fR and \fI\-\-no\-overwrite\fR can only be used for \&\fBpool-build\fR a filesystem pool. If neither of them is specified, \&\fBpool-build\fR on a filesystem pool only makes the directory; If \&\fI\-\-no\-overwrite\fR is specified, it probes to determine if a filesystem already exists on the target device, returning an error if exists, or using mkfs to format the target device if not; If \&\fI\-\-overwrite\fR is specified, mkfs is always executed, any existed data on the target device is overwritten unconditionally. .IP "\fBpool-create\fR \fIfile\fR" 4 .IX Item "pool-create file" Create and start a pool object from the \s-1XML\s0 \fIfile\fR. .IP "\fBpool-create-as\fR \fIname\fR \fI\-\-print\-xml\fR \fItype\fR [\fIsource-host\fR] [\fIsource-path\fR] [\fIsource-dev\fR] [\fIsource-name\fR] [] [\fI\-\-source\-format format\fR]" 4 .IX Item "pool-create-as name --print-xml type [source-host] [source-path] [source-dev] [source-name] [] [--source-format format]" Create and start a pool object \fIname\fR from the raw parameters. If \&\fI\-\-print\-xml\fR is specified, then print the \s-1XML\s0 of the pool object without creating the pool. Otherwise, the pool has the specified \&\fItype\fR. .IP "\fBpool-define\fR \fIfile\fR" 4 .IX Item "pool-define file" Create, but do not start, a pool object from the \s-1XML\s0 \fIfile\fR. .IP "\fBpool-define-as\fR \fIname\fR \fI\-\-print\-xml\fR \fItype\fR [\fIsource-host\fR] [\fIsource-path\fR] [\fIsource-dev\fR] [\fIsource-name\fR] [] [\fI\-\-source\-format format\fR]" 4 .IX Item "pool-define-as name --print-xml type [source-host] [source-path] [source-dev] [source-name] [] [--source-format format]" Create, but do not start, a pool object \fIname\fR from the raw parameters. If \&\fI\-\-print\-xml\fR is specified, then print the \s-1XML\s0 of the pool object without defining the pool. Otherwise, the pool has the specified \&\fItype\fR. .IP "\fBpool-destroy\fR \fIpool-or-uuid\fR" 4 .IX Item "pool-destroy pool-or-uuid" Destroy (stop) a given \fIpool\fR object. Libvirt will no longer manage the storage described by the pool object, but the raw data contained in the pool is not changed, and can be later recovered with \&\fBpool-create\fR. .IP "\fBpool-delete\fR \fIpool-or-uuid\fR" 4 .IX Item "pool-delete pool-or-uuid" Destroy the resources used by a given \fIpool\fR object. This operation is non-recoverable. The \fIpool\fR object will still exist after this command, ready for the creation of new storage volumes. .IP "\fBpool-dumpxml\fR \fIpool-or-uuid\fR" 4 .IX Item "pool-dumpxml pool-or-uuid" Returns the \s-1XML\s0 information about the \fIpool\fR object. .IP "\fBpool-edit\fR \fIpool-or-uuid\fR" 4 .IX Item "pool-edit pool-or-uuid" Edit the \s-1XML\s0 configuration file for a storage pool. .Sp This is equivalent to: .Sp .Vb 3 \& virsh pool\-dumpxml pool > pool.xml \& vi pool.xml (or make changes with your other text editor) \& virsh pool\-define pool.xml .Ve .Sp except that it does some error checking. .Sp The editor used can be supplied by the \f(CW$VISUAL\fR or \f(CW$EDITOR\fR environment variables, and defaults to \f(CW\*(C`vi\*(C'\fR. .IP "\fBpool-info\fR \fIpool-or-uuid\fR" 4 .IX Item "pool-info pool-or-uuid" Returns basic information about the \fIpool\fR object. .IP "\fBpool-list\fR [\fI\-\-inactive\fR | \fI\-\-all\fR] [\fI\-\-details\fR]" 4 .IX Item "pool-list [--inactive | --all] [--details]" List pool objects known to libvirt. By default, only pools in use by active domains are listed; \fI\-\-inactive\fR lists just the inactive pools, and \fI\-\-all\fR lists all pools. The \fI\-\-details\fR option instructs virsh to additionally display pool persistence and capacity related information where available. .IP "\fBpool-name\fR \fIuuid\fR" 4 .IX Item "pool-name uuid" Convert the \fIuuid\fR to a pool name. .IP "\fBpool-refresh\fR \fIpool-or-uuid\fR" 4 .IX Item "pool-refresh pool-or-uuid" Refresh the list of volumes contained in \fIpool\fR. .IP "\fBpool-start\fR \fIpool-or-uuid\fR" 4 .IX Item "pool-start pool-or-uuid" Start the storage \fIpool\fR, which is previously defined but inactive. .IP "\fBpool-undefine\fR \fIpool-or-uuid\fR" 4 .IX Item "pool-undefine pool-or-uuid" Undefine the configuration for an inactive \fIpool\fR. .IP "\fBpool-uuid\fR \fIpool\fR" 4 .IX Item "pool-uuid pool" Returns the \s-1UUID\s0 of the named \fIpool\fR. .SH "VOLUME COMMANDS" .IX Header "VOLUME COMMANDS" .IP "\fBvol-create\fR \fIpool-or-uuid\fR \fI\s-1FILE\s0\fR" 4 .IX Item "vol-create pool-or-uuid FILE" Create a volume from an \s-1XML\s0 . \&\fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool to create the volume in. \&\fI\s-1FILE\s0\fR is the \s-1XML\s0 with the volume definition. An easy way to create the \&\s-1XML\s0 is to use the \fBvol-dumpxml\fR command to obtain the definition of a pre-existing volume. .Sp \&\fBExample\fR .Sp .Vb 3 \& virsh vol\-dumpxml \-\-pool storagepool1 appvolume1 > newvolume.xml \& vi newvolume.xml (or make changes with your other text editor) \& virsh vol\-create differentstoragepool newvolume.xml .Ve .IP "\fBvol-create-from\fR \fIpool-or-uuid\fR \fI\s-1FILE\s0\fR [\fI\-\-inputpool\fR \fIpool-or-uuid\fR] \fIvol-name-or-key-or-path\fR" 4 .IX Item "vol-create-from pool-or-uuid FILE [--inputpool pool-or-uuid] vol-name-or-key-or-path" Create a volume, using another volume as input. \&\fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool to create the volume in. \&\fI\s-1FILE\s0\fR is the \s-1XML\s0 with the volume definition. \&\fI\-\-inputpool\fR \fIpool-or-uuid\fR is the name or uuid of the storage pool the source volume is in. \&\fIvol-name-or-key-or-path\fR is the name or key or path of the source volume. .IP "\fBvol-create-as\fR \fIpool-or-uuid\fR \fIname\fR \fIcapacity\fR [\fI\-\-allocation\fR \fIsize\fR] [\fI\-\-format\fR \fIstring\fR] [\fI\-\-backing\-vol\fR \fIvol-name-or-key-or-path\fR] [\fI\-\-backing\-vol\-format\fR \fIstring\fR]" 4 .IX Item "vol-create-as pool-or-uuid name capacity [--allocation size] [--format string] [--backing-vol vol-name-or-key-or-path] [--backing-vol-format string]" Create a volume from a set of arguments. \&\fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool to create the volume in. \&\fIname\fR is the name of the new volume. \&\fIcapacity\fR is the size of the volume to be created, as a scaled integer (see \fB\s-1NOTES\s0\fR above), defaulting to bytes if there is no suffix. \&\fI\-\-allocation\fR \fIsize\fR is the initial size to be allocated in the volume, also as a scaled integer defaulting to bytes. \&\fI\-\-format\fR \fIstring\fR is used in file based storage pools to specify the volume file format to use; raw, bochs, qcow, qcow2, vmdk. \&\fI\-\-backing\-vol\fR \fIvol-name-or-key-or-path\fR is the source backing volume to be used if taking a snapshot of an existing volume. \&\fI\-\-backing\-vol\-format\fR \fIstring\fR is the format of the snapshot backing volume; raw, bochs, qcow, qcow2, vmdk, host_device. .IP "\fBvol-clone\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] \fIvol-name-or-key-or-path\fR \fIname\fR" 4 .IX Item "vol-clone [--pool pool-or-uuid] vol-name-or-key-or-path name" Clone an existing volume. Less powerful, but easier to type, version of \&\fBvol-create-from\fR. \&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool to create the volume in. \&\fIvol-name-or-key-or-path\fR is the name or key or path of the source volume. \&\fIname\fR is the name of the new volume. .IP "\fBvol-delete\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] \fIvol-name-or-key-or-path\fR" 4 .IX Item "vol-delete [--pool pool-or-uuid] vol-name-or-key-or-path" Delete a given volume. \&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume is in. \&\fIvol-name-or-key-or-path\fR is the name or key or path of the volume to delete. .IP "\fBvol-upload\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] [\fI\-\-offset\fR \fIbytes\fR] [\fI\-\-length\fR \fIbytes\fR] \fIvol-name-or-key-or-path\fR \fIlocal-file\fR" 4 .IX Item "vol-upload [--pool pool-or-uuid] [--offset bytes] [--length bytes] vol-name-or-key-or-path local-file" Upload the contents of \fIlocal-file\fR to a storage volume. \&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume is in. \&\fIvol-name-or-key-or-path\fR is the name or key or path of the volume to wipe. \&\fI\-\-offset\fR is the position in the storage volume at which to start writing the data. \fI\-\-length\fR is an upper bound of the amount of data to be uploaded. An error will occurr if the \fIlocal-file\fR is greater than the specified length. .IP "\fBvol-download\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] [\fI\-\-offset\fR \fIbytes\fR] [\fI\-\-length\fR \fIbytes\fR] \fIvol-name-or-key-or-path\fR \fIlocal-file\fR" 4 .IX Item "vol-download [--pool pool-or-uuid] [--offset bytes] [--length bytes] vol-name-or-key-or-path local-file" Download the contents of \fIlocal-file\fR from a storage volume. \&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume is in. \&\fIvol-name-or-key-or-path\fR is the name or key or path of the volume to wipe. \&\fI\-\-offset\fR is the position in the storage volume at which to start reading the data. \fI\-\-length\fR is an upper bound of the amount of data to be downloaded. .IP "\fBvol-wipe\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] [\fI\-\-algorithm\fR \fIalgorithm\fR] \fIvol-name-or-key-or-path\fR" 4 .IX Item "vol-wipe [--pool pool-or-uuid] [--algorithm algorithm] vol-name-or-key-or-path" Wipe a volume, ensure data previously on the volume is not accessible to future reads. \fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume is in. \&\fIvol-name-or-key-or-path\fR is the name or key or path of the volume to wipe. It is possible to choose different wiping algorithms instead of re-writing volume with zeroes. This can be done via \fI\-\-algorithm\fR switch. .Sp \&\fBSupported algorithms\fR zero \- 1\-pass all zeroes nnsa \- 4\-pass \s-1NNSA\s0 Policy Letter \s-1NAP\-14\s0.1\-C (\s-1XVI\-8\s0) for sanitizing removable and non-removable hard disks: random x2, 0x00, verify. dod \- 4\-pass DoD 5220.22\-M section 8\-306 procedure for sanitizing removeable and non-removeable rigid disks: random, 0x00, 0xff, verify. bsi \- 9\-pass method recommended by the German Center of Security in Information Technologies (http://www.bsi.bund.de): 0xff, 0xfe, 0xfd, 0xfb, 0xf7, 0xef, 0xdf, 0xbf, 0x7f. gutmann \- The canonical 35\-pass sequence described in Gutmann's paper. schneier \- 7\-pass method described by Bruce Schneier in \*(L"Applied Cryptography\*(R" (1996): 0x00, 0xff, random x5. pfitzner7 \- Roy Pfitzner's 7\-random\-pass method: random x7. pfitzner33 \- Roy Pfitzner's 33\-random\-pass method: random x33. random \- 1\-pass pattern: random. .Sp \&\fBNote\fR: The availability of algorithms may be limited by the version of the \f(CW\*(C`scrub\*(C'\fR binary installed on the host. .IP "\fBvol-dumpxml\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] \fIvol-name-or-key-or-path\fR" 4 .IX Item "vol-dumpxml [--pool pool-or-uuid] vol-name-or-key-or-path" Output the volume information as an \s-1XML\s0 dump to stdout. \&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume is in. \fIvol-name-or-key-or-path\fR is the name or key or path of the volume to output the \s-1XML\s0 of. .IP "\fBvol-info\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] \fIvol-name-or-key-or-path\fR" 4 .IX Item "vol-info [--pool pool-or-uuid] vol-name-or-key-or-path" Returns basic information about the given storage volume. \&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume is in. \fIvol-name-or-key-or-path\fR is the name or key or path of the volume to return information for. .IP "\fBvol-list\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] [\fI\-\-details\fR]" 4 .IX Item "vol-list [--pool pool-or-uuid] [--details]" Return the list of volumes in the given storage pool. \&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool. The \fI\-\-details\fR option instructs virsh to additionally display volume type and capacity related information where available. .IP "\fBvol-pool\fR [\fI\-\-uuid\fR] \fIvol-key-or-path\fR" 4 .IX Item "vol-pool [--uuid] vol-key-or-path" Return the pool name or \s-1UUID\s0 for a given volume. By default, the pool name is returned. If the \fI\-\-uuid\fR option is given, the pool \s-1UUID\s0 is returned instead. \&\fIvol-key-or-path\fR is the key or path of the volume to return the pool information for. .IP "\fBvol-path\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] \fIvol-name-or-key\fR" 4 .IX Item "vol-path [--pool pool-or-uuid] vol-name-or-key" Return the path for a given volume. \&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume is in. \&\fIvol-name-or-key\fR is the name or key of the volume to return the path for. .IP "\fBvol-name\fR \fIvol-key-or-path\fR" 4 .IX Item "vol-name vol-key-or-path" Return the name for a given volume. \&\fIvol-key-or-path\fR is the key or path of the volume to return the name for. .IP "\fBvol-key\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] \fIvol-name-or-path\fR" 4 .IX Item "vol-key [--pool pool-or-uuid] vol-name-or-path" Return the volume key for a given volume. \&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume is in. \fIvol-name-or-path\fR is the name or path of the volume to return the volume key for. .IP "\fBvol-resize\fR [\fI\-\-pool\fR \fIpool-or-uuid\fR] \fIvol-name-or-path\fR \fIpool-or-uuid\fR \fIcapacity\fR [\fI\-\-allocate\fR] [\fI\-\-delta\fR] [\fI\-\-shrink\fR]" 4 .IX Item "vol-resize [--pool pool-or-uuid] vol-name-or-path pool-or-uuid capacity [--allocate] [--delta] [--shrink]" Resize the capacity of the given volume, in bytes. \&\fI\-\-pool\fR \fIpool-or-uuid\fR is the name or \s-1UUID\s0 of the storage pool the volume is in. \fIvol-name-or-key-or-path\fR is the name or key or path of the volume to resize. The new capacity might be sparse unless \fI\-\-allocate\fR is specified. Normally, \fIcapacity\fR is the new size, but if \fI\-\-delta\fR is present, then it is added to the existing size. Attempts to shrink the volume will fail unless \fI\-\-shrink\fR is present; \fIcapacity\fR cannot be negative unless \fI\-\-shrink\fR is provided, but a negative sign is not necessary. \fIcapacity\fR is a scaled integer (see \fB\s-1NOTES\s0\fR above), which defaults to bytes if there is no suffix. This command is only safe for storage volumes not in use by an active guest; see also \&\fBblockresize\fR for live resizing. .SH "SECRET COMMMANDS" .IX Header "SECRET COMMMANDS" The following commands manipulate \*(L"secrets\*(R" (e.g. passwords, passphrases and encryption keys). Libvirt can store secrets independently from their use, and other objects (e.g. volumes or domains) can refer to the secrets for encryption or possibly other uses. Secrets are identified using an \s-1UUID\s0. See for documentation of the \s-1XML\s0 format used to represent properties of secrets. .IP "\fBsecret-define\fR \fIfile\fR" 4 .IX Item "secret-define file" Create a secret with the properties specified in \fIfile\fR, with no associated secret value. If \fIfile\fR does not specify a \s-1UUID\s0, choose one automatically. If \fIfile\fR specifies an \s-1UUID\s0 of an existing secret, replace its properties by properties defined in \fIfile\fR, without affecting the secret value. .IP "\fBsecret-dumpxml\fR \fIsecret\fR" 4 .IX Item "secret-dumpxml secret" Output properties of \fIsecret\fR (specified by its \s-1UUID\s0) as an \s-1XML\s0 dump to stdout. .IP "\fBsecret-set-value\fR \fIsecret\fR \fIbase64\fR" 4 .IX Item "secret-set-value secret base64" Set the value associated with \fIsecret\fR (specified by its \s-1UUID\s0) to the value Base64\-encoded value \fIbase64\fR. .IP "\fBsecret-get-value\fR \fIsecret\fR" 4 .IX Item "secret-get-value secret" Output the value associated with \fIsecret\fR (specified by its \s-1UUID\s0) to stdout, encoded using Base64. .IP "\fBsecret-undefine\fR \fIsecret\fR" 4 .IX Item "secret-undefine secret" Delete a \fIsecret\fR (specified by its \s-1UUID\s0), including the associated value, if any. .IP "\fBsecret-list\fR" 4 .IX Item "secret-list" Output a list of UUIDs of known secrets to stdout. .SH "SNAPSHOT COMMMANDS" .IX Header "SNAPSHOT COMMMANDS" The following commands manipulate domain snapshots. Snapshots take the disk, memory, and device state of a domain at a point-of-time, and save it for future use. They have many uses, from saving a \*(L"clean\*(R" copy of an \s-1OS\s0 image to saving a domain's state before a potentially destructive operation. Snapshots are identified with a unique name. See for documentation of the \s-1XML\s0 format used to represent properties of snapshots. .IP "\fBsnapshot-create\fR \fIdomain\fR [\fIxmlfile\fR] {[\fI\-\-redefine\fR [\fI\-\-current\fR]] | [\fI\-\-no\-metadata\fR] [\fI\-\-halt\fR] [\fI\-\-disk\-only\fR] [\fI\-\-reuse\-external\fR] [\fI\-\-quiesce\fR] [\fI\-\-atomic\fR]}" 4 .IX Item "snapshot-create domain [xmlfile] {[--redefine [--current]] | [--no-metadata] [--halt] [--disk-only] [--reuse-external] [--quiesce] [--atomic]}" Create a snapshot for domain \fIdomain\fR with the properties specified in \&\fIxmlfile\fR. Normally, the only properties settable for a domain snapshot are the and elements, as well as if \&\fI\-\-disk\-only\fR is given; the rest of the fields are ignored, and automatically filled in by libvirt. If \fIxmlfile\fR is completely omitted, then libvirt will choose a value for all fields. The new snapshot will become current, as listed by \fBsnapshot-current\fR. .Sp If \fI\-\-halt\fR is specified, the domain will be left in an inactive state after the snapshot is created. .Sp If \fI\-\-disk\-only\fR is specified, the snapshot will only include disk state rather than the usual system checkpoint with vm state. Disk snapshots are faster than full system checkpoints, but reverting to a disk snapshot may require fsck or journal replays, since it is like the disk state at the point when the power cord is abruptly pulled; and mixing \fI\-\-halt\fR and \fI\-\-disk\-only\fR loses any data that was not flushed to disk at the time. .Sp If \fI\-\-redefine\fR is specified, then all \s-1XML\s0 elements produced by \&\fBsnapshot-dumpxml\fR are valid; this can be used to migrate snapshot hierarchy from one machine to another, to recreate hierarchy for the case of a transient domain that goes away and is later recreated with the same name and \s-1UUID\s0, or to make slight alterations in the snapshot metadata (such as host-specific aspects of the domain \s-1XML\s0 embedded in the snapshot). When this flag is supplied, the \fIxmlfile\fR argument is mandatory, and the domain's current snapshot will not be altered unless the \fI\-\-current\fR flag is also given. .Sp If \fI\-\-no\-metadata\fR is specified, then the snapshot data is created, but any metadata is immediately discarded (that is, libvirt does not treat the snapshot as current, and cannot revert to the snapshot unless \fI\-\-redefine\fR is later used to teach libvirt about the metadata again). .Sp If \fI\-\-reuse\-external\fR is specified, and the snapshot \s-1XML\s0 requests an external snapshot with a destination of an existing file, then the destination must exist, and is reused; otherwise, a snapshot is refused to avoid losing contents of the existing files. .Sp If \fI\-\-quiesce\fR is specified, libvirt will try to use guest agent to freeze and unfreeze domain's mounted file systems. However, if domain has no guest agent, snapshot creation will fail. Currently, this requires \fI\-\-disk\-only\fR to be passed as well. .Sp If \fI\-\-atomic\fR is specified, libvirt will guarantee that the snapshot either succeeds, or fails with no changes; not all hypervisors support this. If this flag is not specified, then some hypervisors may fail after partially performing the action, and \fBdumpxml\fR must be used to see whether any partial changes occurred. .Sp Existence of snapshot metadata will prevent attempts to \fBundefine\fR a persistent domain. However, for transient domains, snapshot metadata is silently lost when the domain quits running (whether by command such as \fBdestroy\fR or by internal guest action). .IP "\fBsnapshot-create-as\fR \fIdomain\fR {[\fI\-\-print\-xml\fR] | [\fI\-\-no\-metadata\fR] [\fI\-\-halt\fR] [\fI\-\-reuse\-external\fR]} [\fIname\fR] [\fIdescription\fR] [\fI\-\-disk\-only\fR [\fI\-\-quiesce\fR] [\fI\-\-atomic\fR] [[\fI\-\-diskspec\fR] \fBdiskspec\fR]...]" 4 .IX Item "snapshot-create-as domain {[--print-xml] | [--no-metadata] [--halt] [--reuse-external]} [name] [description] [--disk-only [--quiesce] [--atomic] [[--diskspec] diskspec]...]" Create a snapshot for domain \fIdomain\fR with the given and ; if either value is omitted, libvirt will choose a value. If \fI\-\-print\-xml\fR is specified, then \s-1XML\s0 appropriate for \&\fIsnapshot-create\fR is output, rather than actually creating a snapshot. Otherwise, if \fI\-\-halt\fR is specified, the domain will be left in an inactive state after the snapshot is created, and if \fI\-\-disk\-only\fR is specified, the snapshot will not include vm state. .Sp The \fI\-\-disk\-only\fR flag is used to request a disk-only snapshot. When this flag is in use, the command can also take additional \fIdiskspec\fR arguments to add elements to the xml. Each is in the form \fBdisk[,snapshot=type][,driver=type][,file=name]\fR. To include a literal comma in \fBdisk\fR or in \fBfile=name\fR, escape it with a second comma. A literal \fI\-\-diskspec\fR must preceed each \fBdiskspec\fR unless all three of \fIdomain\fR, \fIname\fR, and \fIdescription\fR are also present. For example, a diskspec of \*(L"vda,snapshot=external,file=/path/to,,new\*(R" results in the following \s-1XML:\s0 .Sp If \fI\-\-reuse\-external\fR is specified, and the domain \s-1XML\s0 or \fIdiskspec\fR option requests an external snapshot with a destination of an existing file, then the destination must exist, and is reused; otherwise, a snapshot is refused to avoid losing contents of the existing files. .Sp If \fI\-\-quiesce\fR is specified, libvirt will try to use guest agent to freeze and unfreeze domain's mounted file systems. However, if domain has no guest agent, snapshot creation will fail. Currently, this requires \fI\-\-disk\-only\fR to be passed as well. .Sp If \fI\-\-no\-metadata\fR is specified, then the snapshot data is created, but any metadata is immediately discarded (that is, libvirt does not treat the snapshot as current, and cannot revert to the snapshot unless \fBsnapshot-create\fR is later used to teach libvirt about the metadata again). This flag is incompatible with \fI\-\-print\-xml\fR. .Sp If \fI\-\-atomic\fR is specified, libvirt will guarantee that the snapshot either succeeds, or fails with no changes; not all hypervisors support this. If this flag is not specified, then some hypervisors may fail after partially performing the action, and \fBdumpxml\fR must be used to see whether any partial changes occurred. .IP "\fBsnapshot-current\fR \fIdomain\fR {[\fI\-\-name\fR] | [\fI\-\-security\-info\fR] | [\fIsnapshotname\fR]}" 4 .IX Item "snapshot-current domain {[--name] | [--security-info] | [snapshotname]}" Without \fIsnapshotname\fR, this will output the snapshot \s-1XML\s0 for the domain's current snapshot (if any). If \fI\-\-name\fR is specified, just the current snapshot name instead of the full xml. Otherwise, using \&\fI\-\-security\-info\fR will also include security sensitive information in the \s-1XML\s0. .Sp With \fIsnapshotname\fR, this is a request to make the existing named snapshot become the current snapshot, without reverting the domain. .IP "\fBsnapshot-edit\fR \fIdomain\fR [\fIsnapshotname\fR] [\fI\-\-current\fR] {[\fI\-\-rename\fR] | [\fI\-\-clone\fR]}" 4 .IX Item "snapshot-edit domain [snapshotname] [--current] {[--rename] | [--clone]}" Edit the \s-1XML\s0 configuration file for \fIsnapshotname\fR of a domain. If both \fIsnapshotname\fR and \fI\-\-current\fR are specified, also force the edited snapshot to become the current snapshot. If \fIsnapshotname\fR is omitted, then \fI\-\-current\fR must be supplied, to edit the current snapshot. .Sp This is equivalent to: .Sp .Vb 3 \& virsh snapshot\-dumpxml dom name > snapshot.xml \& vi snapshot.xml (or make changes with your other text editor) \& virsh snapshot\-create dom snapshot.xml \-\-redefine [\-\-current] .Ve .Sp except that it does some error checking. .Sp The editor used can be supplied by the \f(CW$VISUAL\fR or \f(CW$EDITOR\fR environment variables, and defaults to \f(CW\*(C`vi\*(C'\fR. .Sp If \fI\-\-rename\fR is specified, then the edits can change the snapshot name. If \fI\-\-clone\fR is specified, then changing the snapshot name will create a clone of the snapshot metadata. If neither is specified, then the edits must not change the snapshot name. Note that changing a snapshot name must be done with care, since the contents of some snapshots, such as internal snapshots within a single qcow2 file, are accessible only from the original name. .IP "\fBsnapshot-list\fR \fIdomain\fR [{\fI\-\-parent\fR | \fI\-\-roots\fR | \fI\-\-tree\fR}] [{[\fI\-\-from\fR] \fBsnapshot\fR | \fI\-\-current\fR} [\fI\-\-descendants\fR]] [\fI\-\-metadata\fR] [\fI\-\-leaves\fR]" 4 .IX Item "snapshot-list domain [{--parent | --roots | --tree}] [{[--from] snapshot | --current} [--descendants]] [--metadata] [--leaves]" List all of the available snapshots for the given domain, defaulting to show columns for the snapshot name, creation time, and domain state. .Sp If \fI\-\-parent\fR is specified, add a column to the output table giving the name of the parent of each snapshot. If \fI\-\-roots\fR is specified, the list will be filtered to just snapshots that have no parents. If \fI\-\-tree\fR is specified, the output will be in a tree format, listing just snapshot names. These three options are mutually exclusive. .Sp If \fI\-\-from\fR is provided, filter the list to snapshots which are children of the given \fBsnapshot\fR; or if \fI\-\-current\fR is provided, start at the current snapshot. When used in isolation or with \&\fI\-\-parent\fR, the list is limited to direct children unless \&\fI\-\-descendants\fR is also present. When used with \fI\-\-tree\fR, the use of \fI\-\-descendants\fR is implied. This option is not compatible with \fI\-\-roots\fR. .Sp If \fI\-\-leaves\fR is specified, the list will be filtered to just snapshots that have no children. This option is not compatible with \fI\-\-tree\fR. .Sp If \fI\-\-metadata\fR is specified, the list will be filtered to just snapshots that involve libvirt metadata, and thus would prevent \&\fBundefine\fR of a persistent domain, or be lost on \fBdestroy\fR of a transient domain. .IP "\fBsnapshot-dumpxml\fR \fIdomain\fR \fIsnapshot\fR [\fI\-\-security\-info\fR]" 4 .IX Item "snapshot-dumpxml domain snapshot [--security-info]" Output the snapshot \s-1XML\s0 for the domain's snapshot named \fIsnapshot\fR. Using \fI\-\-security\-info\fR will also include security sensitive information. Use \fBsnapshot-current\fR to easily access the \s-1XML\s0 of the current snapshot. .IP "\fBsnapshot-parent\fR \fIdomain\fR {\fIsnapshot\fR | \fI\-\-current\fR}" 4 .IX Item "snapshot-parent domain {snapshot | --current}" Output the name of the parent snapshot, if any, for the given \&\fIsnapshot\fR, or for the current snapshot with \fI\-\-current\fR. .IP "\fBsnapshot-revert\fR \fIdomain\fR {\fIsnapshot\fR | \fI\-\-current\fR} [{\fI\-\-running\fR | \fI\-\-paused\fR}] [\fI\-\-force\fR]" 4 .IX Item "snapshot-revert domain {snapshot | --current} [{--running | --paused}] [--force]" Revert the given domain to the snapshot specified by \fIsnapshot\fR, or to the current snapshot with \fI\-\-current\fR. Be aware that this is a destructive action; any changes in the domain since the last snapshot was taken will be lost. Also note that the state of the domain after snapshot-revert is complete will be the state of the domain at the time the original snapshot was taken. .Sp Normally, reverting to a snapshot leaves the domain in the state it was at the time the snapshot was created, except that a disk snapshot with no vm state leaves the domain in an inactive state. Passing either the \&\fI\-\-running\fR or \fI\-\-paused\fR flag will perform additional state changes (such as booting an inactive domain, or pausing a running domain). Since transient domains cannot be inactive, it is required to use one of these flags when reverting to a disk snapshot of a transient domain. .Sp There are two cases where a snapshot revert involves extra risk, which requires the use of \fI\-\-force\fR to proceed. One is the case of a snapshot that lacks full domain information for reverting configuration (such as snapshots created prior to libvirt 0.9.5); since libvirt cannot prove that the current configuration matches what was in use at the time of the snapshot, supplying \fI\-\-force\fR assures libvirt that the snapshot is compatible with the current configuration (and if it is not, the domain will likely fail to run). The other is the case of reverting from a running domain to an active state where a new hypervisor has to be created rather than reusing the existing hypervisor, because it implies drawbacks such as breaking any existing \&\s-1VNC\s0 or Spice connections; this condition happens with an active snapshot that uses a provably incompatible configuration, as well as with an inactive snapshot that is combined with the \fI\-\-start\fR or \&\fI\-\-pause\fR flag. .IP "\fBsnapshot-delete\fR \fIdomain\fR {\fIsnapshot\fR | \fI\-\-current\fR} [\fI\-\-metadata\fR] [{\fI\-\-children\fR | \fI\-\-children\-only\fR}]" 4 .IX Item "snapshot-delete domain {snapshot | --current} [--metadata] [{--children | --children-only}]" Delete the snapshot for the domain named \fIsnapshot\fR, or the current snapshot with \fI\-\-current\fR. If this snapshot has child snapshots, changes from this snapshot will be merged into the children. If \fI\-\-children\fR is passed, then delete this snapshot and any children of this snapshot. If \fI\-\-children\-only\fR is passed, then delete any children of this snapshot, but leave this snapshot intact. These two flags are mutually exclusive. .Sp If \fI\-\-metadata\fR is specified, then only delete the snapshot metadata maintained by libvirt, while leaving the snapshot contents intact for access by external tools; otherwise deleting a snapshot also removes the data contents from that point in time. .SH "NWFILTER COMMMANDS" .IX Header "NWFILTER COMMMANDS" The following commands manipulate network filters. Network filters allow filtering of the network traffic coming from and going to virtual machines. Individual network traffic filters are written in \s-1XML\s0 and may contain references to other network filters, describe traffic filtering rules, or contain both. Network filters are referenced by virtual machines from within their interface description. A network filter may be referenced by multiple virtual machines' interfaces. .IP "\fBnwfilter-define\fR \fIxmlfile\fR" 4 .IX Item "nwfilter-define xmlfile" Make a new network filter known to libvirt. If a network filter with the same name already exists, it will be replaced with the new \s-1XML\s0. Any running virtual machine referencing this network filter will have its network traffic rules adapted. If for any reason the network traffic filtering rules cannot be instantiated by any of the running virtual machines, then the new \s-1XML\s0 will be rejected. .IP "\fBnwfilter-undefine\fR \fInwfilter-name\fR" 4 .IX Item "nwfilter-undefine nwfilter-name" Delete a network filter. The deletion will fail if any running virtual machine is currently using this network filter. .IP "\fBnwfilter-list\fR" 4 .IX Item "nwfilter-list" List all of the available network filters. .IP "\fBnwfilter-dumpxml\fR \fInwfilter-name\fR" 4 .IX Item "nwfilter-dumpxml nwfilter-name" Output the network filter \s-1XML\s0. .IP "\fBnwfilter-edit\fR \fInwfilter-name\fR" 4 .IX Item "nwfilter-edit nwfilter-name" Edit the \s-1XML\s0 of a network filter. .Sp This is equivalent to: .Sp .Vb 3 \& virsh nwfilter\-dumpxml myfilter > myfilter.xml \& vi myfilter.xml (or make changes with your other text editor) \& virsh nwfilter\-define myfilter.xml .Ve .Sp except that it does some error checking. The new network filter may be rejected due to the same reason as mentioned in \fInwfilter-define\fR. .Sp The editor used can be supplied by the \f(CW$VISUAL\fR or \f(CW$EDITOR\fR environment variables, and defaults to \f(CW\*(C`vi\*(C'\fR. .SH "QEMU-SPECIFIC COMMANDS" .IX Header "QEMU-SPECIFIC COMMANDS" \&\s-1NOTE:\s0 Use of the following commands is \fBstrongly\fR discouraged. They can cause libvirt to become confused and do the wrong thing on subsequent operations. Once you have used this command, please do not report problems to the libvirt developers; the reports will be ignored. .IP "\fBqemu-attach\fR \fIpid\fR" 4 .IX Item "qemu-attach pid" Attach an externally launched \s-1QEMU\s0 process to the libvirt \s-1QEMU\s0 driver. The \s-1QEMU\s0 process must have been created with a monitor connection using the \s-1UNIX\s0 driver. Ideally the process will also have had the \&'\-name' argument specified. .RS 4 .Sp .Vb 6 \& $ qemu\-kvm \-cdrom ~/demo.iso \e \& \-monitor unix:/tmp/demo,server,nowait \e \& \-name foo \e \& \-uuid cece4f9f\-dff0\-575d\-0e8e\-01fe380f12ea & \& $ QEMUPID=$! \& $ virsh qemu\-attach $QEMUPID .Ve .RE .RS 4 .Sp Not all functions of libvirt are expected to work reliably after attaching to an externally launched \s-1QEMU\s0 process. There may be issues with the guest \s-1ABI\s0 changing upon migration, and hotunplug may not work. .RE .IP "\fBqemu-monitor-command\fR \fIdomain\fR [\fI\-\-hmp\fR] \fIcommand\fR..." 4 .IX Item "qemu-monitor-command domain [--hmp] command..." Send an arbitrary monitor command \fIcommand\fR to domain \fIdomain\fR through the qemu monitor. The results of the command will be printed on stdout. If \&\fI\-\-hmp\fR is passed, the command is considered to be a human monitor command and libvirt will automatically convert it into \s-1QMP\s0 if needed. In that case the result will also be converted back from \s-1QMP\s0. If more than one argument is provided for \fIcommand\fR, they are concatenated with a space in between before passing the single command to the monitor. .SH "ENVIRONMENT" .IX Header "ENVIRONMENT" The following environment variables can be set to alter the behaviour of \f(CW\*(C`virsh\*(C'\fR .IP "VIRSH_DEBUG=<0 to 4>" 4 .IX Item "VIRSH_DEBUG=<0 to 4>" Turn on verbose debugging of virsh commands. Valid levels are .IP "* VIRSH_DEBUG=0" 4 .IX Item "* VIRSH_DEBUG=0" \&\s-1DEBUG\s0 \- Messages at \s-1ALL\s0 levels get logged .IP "* VIRSH_DEBUG=1" 4 .IX Item "* VIRSH_DEBUG=1" \&\s-1INFO\s0 \- Logs messages at levels \s-1INFO\s0, \s-1NOTICE\s0, \s-1WARNING\s0 and \s-1ERROR\s0 .IP "* VIRSH_DEBUG=2" 4 .IX Item "* VIRSH_DEBUG=2" \&\s-1NOTICE\s0 \- Logs messages at levels \s-1NOTICE\s0, \s-1WARNING\s0 and \s-1ERROR\s0 .IP "* VIRSH_DEBUG=3" 4 .IX Item "* VIRSH_DEBUG=3" \&\s-1WARNING\s0 \- Logs messages at levels \s-1WARNING\s0 and \s-1ERROR\s0 .IP "* VIRSH_DEBUG=4" 4 .IX Item "* VIRSH_DEBUG=4" \&\s-1ERROR\s0 \- Messages at only \s-1ERROR\s0 level gets logged. .ie n .IP "VIRSH_LOG_FILE=""LOGFILE""" 4 .el .IP "VIRSH_LOG_FILE=\f(CWLOGFILE\fR" 4 .IX Item "VIRSH_LOG_FILE=LOGFILE" The file to log virsh debug messages. .IP "\s-1VIRSH_DEFAULT_CONNECT_URI\s0" 4 .IX Item "VIRSH_DEFAULT_CONNECT_URI" The hypervisor to connect to by default. Set this to a \s-1URI\s0, in the same format as accepted by the \fBconnect\fR option. This environment variable is deprecated in favour of the global \fB\s-1LIBVIRT_DEFAULT_URI\s0\fR variable which serves the same purpose. .IP "\s-1LIBVIRT_DEFAULT_URI\s0" 4 .IX Item "LIBVIRT_DEFAULT_URI" The hypervisor to connect to by default. Set this to a \s-1URI\s0, in the same format as accepted by the \fBconnect\fR option. This overrides the default \s-1URI\s0 set in any client config file and prevents libvirt from probing for drivers. .IP "\s-1VISUAL\s0" 4 .IX Item "VISUAL" The editor to use by the \fBedit\fR and related options. .IP "\s-1EDITOR\s0" 4 .IX Item "EDITOR" The editor to use by the \fBedit\fR and related options, if \f(CW\*(C`VISUAL\*(C'\fR is not set. .IP "LIBVIRT_DEBUG=LEVEL" 4 .IX Item "LIBVIRT_DEBUG=LEVEL" Turn on verbose debugging of all libvirt \s-1API\s0 calls. Valid levels are .RS 4 .IP "\(bu" 4 LIBVIRT_DEBUG=1 .Sp Messages at level \s-1DEBUG\s0 or above .IP "\(bu" 4 LIBVIRT_DEBUG=2 .Sp Messages at level \s-1INFO\s0 or above .IP "\(bu" 4 LIBVIRT_DEBUG=3 .Sp Messages at level \s-1WARNING\s0 or above .IP "\(bu" 4 LIBVIRT_DEBUG=4 .Sp Messages at level \s-1ERROR\s0 or above .RE .RS 4 .Sp For further information about debugging options consult \f(CW\*(C`http://libvirt.org/logging.html\*(C'\fR .RE .SH "BUGS" .IX Header "BUGS" Report any bugs discovered to the libvirt community via the mailing list \f(CW\*(C`http://libvirt.org/contact.html\*(C'\fR or bug tracker \f(CW\*(C`http://libvirt.org/bugs.html\*(C'\fR. Alternatively report bugs to your software distributor / vendor. .SH "AUTHORS" .IX Header "AUTHORS" .Vb 1 \& Please refer to the AUTHORS file distributed with libvirt. \& \& Based on the xm man page by: \& Sean Dague \& Daniel Stekloff .Ve .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2005, 2007\-2010 Red Hat, Inc., and the authors listed in the libvirt \s-1AUTHORS\s0 file. .SH "LICENSE" .IX Header "LICENSE" virsh is distributed under the terms of the \s-1GNU\s0 \s-1LGPL\s0 v2+. This is free software; see the source for copying conditions. There is \s-1NO\s0 warranty; not even for \s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \&\s-1PURPOSE\s0 .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIvirt\-install\fR\|(1), \fIvirt\-xml\-validate\fR\|(1), \fIvirt\-top\fR\|(1), \fIvirt\-df\fR\|(1),