mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 03:21:44 +03:00
1da9cd13af
Noriko Mizumoto Daniel
352 lines
13 KiB
Groff
352 lines
13 KiB
Groff
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
|
|
.\"
|
|
.\" Standard preamble:
|
|
.\" ========================================================================
|
|
.de Sh \" Subsection heading
|
|
.br
|
|
.if t .Sp
|
|
.ne 5
|
|
.PP
|
|
\fB\\$1\fR
|
|
.PP
|
|
..
|
|
.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. | will give a
|
|
.\" real vertical bar. \*(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-|\(bv\*(Tr
|
|
.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\}
|
|
.\"
|
|
.\" If the F register is turned on, we'll generate index entries on stderr for
|
|
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
|
|
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
|
.\" output yourself in some meaningful fashion.
|
|
.if \nF \{\
|
|
. de IX
|
|
. tm Index:\\$1\t\\n%\t"\\$2"
|
|
..
|
|
. nr % 0
|
|
. rr F
|
|
.\}
|
|
.\"
|
|
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
|
.\" way too many mistakes in technical documents.
|
|
.hy 0
|
|
.if n .na
|
|
.\"
|
|
.\" 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.POD.1 1"
|
|
.TH VIRSH.POD.1 1 "2006-04-06" "perl v5.8.6" "User Contributed Perl Documentation"
|
|
.SH "NAME"
|
|
virsh \- management user interface
|
|
.SH "SYNOPSIS"
|
|
.IX Header "SYNOPSIS"
|
|
virsh <subcommand> [args]
|
|
.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, suspend, resume, save, 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 aim at providing long term stable C \s-1API\s0 initially for the Xen paravirtualization but should be able to integrate other virtualization mechanisms if needed.
|
|
.PP
|
|
The basic structure of every virsh command is almost always:
|
|
.PP
|
|
.Vb 1
|
|
\& virsh <subcommand> <domain-id|name|uuid> [OPTIONS]
|
|
.Ve
|
|
.PP
|
|
Where \fIsubcommand\fR is one of the sub 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-1OPTIONS\s0\fR are sub command specific
|
|
options. There are a few exceptions to this rule in the cases where
|
|
the sub command in question acts on all domains, the entire machine,
|
|
or directly on the xen hypervisor. Those exceptions will be explained for
|
|
each of those sub commands.
|
|
.SH "NOTES"
|
|
.IX Header "NOTES"
|
|
All \fBvirsh\fR operations rely upon the libvirt library.
|
|
So any virsh commands may require to run xend or qemu (or which ever virtualization layer that libvirt will use). For this reason you should start xend or qemu as a service when your system first boots.
|
|
.PP
|
|
Most \fBvirsh\fR commands require root privledges 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 asynchronously, so just because the \fBvirsh\fR
|
|
command returned, doesn't mean the action is complete. This is
|
|
important, as many operations on domains, like create and shutdown,
|
|
can take considerable time (30 seconds or more) to bring the machine
|
|
into a fully compliant state. If you want to know when one of these
|
|
actions has finished you must poll through virsh list periodically.
|
|
.SH "DOMAIN SUBCOMMANDS"
|
|
.IX Header "DOMAIN SUBCOMMANDS"
|
|
The following sub commands manipulate domains directly, as stated
|
|
previously most commands take domain-id as the first parameter.
|
|
.IP "\fBconnect\fR optional \fI\-\-readonly\fR" 4
|
|
.IX Item "connect optional --readonly"
|
|
Connect to local hypervisor. This is build-in command after shell start up.
|
|
.Sp
|
|
The \fI\-\-readonly\fR option read-only connection
|
|
.IP "\fBcreate\fR \fI\s-1FILE\s0\fR" 4
|
|
.IX Item "create FILE"
|
|
Create a domain from an \s-1XML\s0 <file> an easy way to create one if you have a pre-existing xen guest created via \fBxm\fR create <\s-1XMLFILE\s0>.
|
|
.IP "\fBdumpxml\fR \fIdomain-name, id or uuid\fR" 4
|
|
.IX Item "dumpxml domain-name, id or uuid"
|
|
Ouput the domain informations as an \s-1XML\s0 dump to stdout, this format can be used by the create sub command.
|
|
.IP "\fBdestroy\fR \fIdomain-name, id or uuid\fR" 4
|
|
.IX Item "destroy domain-name, id or uuid"
|
|
Immediately terminate the domain domain\-id. This doesn't give the domain
|
|
\&\s-1OS\s0 any chance to react, and it is 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.
|
|
.IP "\fBdomid\fR \fIdomain-name\fR" 4
|
|
.IX Item "domid domain-name"
|
|
Converts a domain name to a domain id using xend's internal mapping.
|
|
.IP "\fBdominfo\fR \fIdomain-name, id or uuid\fR" 4
|
|
.IX Item "dominfo domain-name, id or uuid"
|
|
Returns basic information about the domain.
|
|
.IP "\fBdomname\fR \fIdomain-id\fR" 4
|
|
.IX Item "domname domain-id"
|
|
convert a domain Id to domain name
|
|
.IP "\fBdomstate\fR \fIdomain-name, id or uuid\fR" 4
|
|
.IX Item "domstate domain-name, id or uuid"
|
|
Returns state about a running domain.
|
|
.IP "\fBhelp\fR optional \fIsubcommand\fR" 4
|
|
.IX Item "help optional subcommand"
|
|
Displays the short help message (i.e. common commands).
|
|
.Sp
|
|
\&\fBhelp\fR \fIsubcommand\fR will print out a detailed help message on that sub command
|
|
.IP "\fBlist\fR" 4
|
|
.IX Item "list"
|
|
Prints information about one or more domains. If no domains are
|
|
specified it prints out information about all 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).
|
|
.RS 4
|
|
.Sp
|
|
.RS 4
|
|
\&\fB\s-1STATES\s0\fR
|
|
.Sp
|
|
The State field lists 6 states for a Xen Domain, and which ones the
|
|
current Domain is in.
|
|
=back
|
|
.RE
|
|
.IP "\fBrunning\fR" 4
|
|
.IX Item "running"
|
|
The domain is currently running on a \s-1CPU\s0
|
|
.IP "\fBblocked\fR" 4
|
|
.IX Item "blocked"
|
|
The domain is blocked, and not running or runable. 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 suspend state the domain will still
|
|
consume allocated resources like memory, but will not be eligible for
|
|
scheduling by the Xen hypervisor.
|
|
.IP "\fBin shutdown\fR" 4
|
|
.IX Item "in shutdown"
|
|
The domain is in process of dying, but hasn't completely shutdown or
|
|
crashed.
|
|
.IP "\fBshut off\fR" 4
|
|
.IX Item "shut off"
|
|
The domain is down.
|
|
.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. See xmdomain.cfg for more info.
|
|
.RE
|
|
.RS 4
|
|
.RE
|
|
.IP "\fBnodeinfo\fR \fIdomain-name, id or uuid\fR" 4
|
|
.IX Item "nodeinfo domain-name, id or uuid"
|
|
Returns basic information about the node.
|
|
.IP "\fBquit\fR" 4
|
|
.IX Item "quit"
|
|
quit this interactive terminal
|
|
.IP "\fBreboot\fR \fIdomain-name, id or uuid\fR" 4
|
|
.IX Item "reboot domain-name, id or uuid"
|
|
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
|
|
started the reboot action, but it may take significantly longuer before
|
|
the domain actually reboots.
|
|
.Sp
|
|
For xen vm the behavior of what happens to a domain when it reboots is set by the
|
|
\&\fIon_reboot\fR parameter of the xmdomain.cfg file when the domain was
|
|
created.
|
|
.IP "\fBrestore\fR \fIstate-file\fR" 4
|
|
.IX Item "restore state-file"
|
|
Restores a domain from an \fBvirsh save\fR state file. See \fIsave\fR for more info.
|
|
.IP "\fBsave\fR \fIdomain-name, id or uuid\fR \fIstate-file\fR" 4
|
|
.IX Item "save domain-name, id or uuid state-file"
|
|
Saves a running domain 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.
|
|
.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.
|
|
.IP "\fBshutdown\fR \fIdomain-name, id or uuid\fR" 4
|
|
.IX Item "shutdown domain-name, id or uuid"
|
|
Gracefully shuts down a domain. This coordinates with the domain \s-1OS\s0
|
|
to perform graceful shutdown, so there is no guaruntee that it will
|
|
succeed, and may take a variable length of time depending on what
|
|
services must be shutdown in the domain.
|
|
.Sp
|
|
For a xen guest vm the behavior of what happens to a domain when it reboots is set by the
|
|
\&\fIon_shutdown\fR parameter of the xmdomain.cfg file when the domain was
|
|
created.
|
|
.IP "\fBsuspend\fR \fIdomain-name, id or uuid\fR" 4
|
|
.IX Item "suspend domain-name, id or uuid"
|
|
Suspend a domain. When in a suspened state the domain will still consume allocated resources
|
|
such as memory, but will not be eligible for scheduling by the Xen hypervisor.
|
|
.IP "\fBresume\fR \fIdomain-name, id or uuid\fR" 4
|
|
.IX Item "resume domain-name, id or uuid"
|
|
Moves a domain out of the paused state. This will allow a previously
|
|
paused domain to now be eligible for scheduling by the the under lying hypervisor.
|
|
.IP "\fBversion\fR" 4
|
|
.IX Item "version"
|
|
Will print out the major version info about what this built from.
|
|
.RS 4
|
|
.Sp
|
|
.RS 4
|
|
\&\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
|
|
.SH "SEE ALSO"
|
|
.IX Header "SEE ALSO"
|
|
\&\fIxm\fR\|(1), \fIxmdomain.cfg\fR\|(5), \fIxentop\fR\|(1) , <http://www.libvirt.org<sol>>
|
|
.SH "AUTHOR"
|
|
.IX Header "AUTHOR"
|
|
.Vb 2
|
|
\& Andrew Puch <apuch @ redhat.com>
|
|
\& Daniel Veillard <veillard @ redhat.com>
|
|
\& Karel Zak <kzak @ redhat.com>
|
|
.Ve
|
|
.Sp
|
|
.Vb 3
|
|
\& Based on the xm man paged by
|
|
\& Sean Dague <sean at dague dot net>
|
|
\& Daniel Stekloff <dsteklof at us dot ibm dot com>
|
|
.Ve
|
|
.SH "BUGS"
|
|
.IX Header "BUGS"
|
|
Can be seen on the RedHat buzilla page under the libvirt
|
|
<https://bugzilla.redhat.com/>
|