diff --git a/ChangeLog b/ChangeLog index 0966209d9e..46dc968e49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Jun 21 09:38:12 CEST 2007 Daniel Veillard + + * docs/virsh.pod: commit of original POD file for virsh man page + from Andrew Puch April 2006 + Wed Jun 20 18:23:00 BST 2007 Richard W.M. Jones * src/libvirt.c, src/qemu_internal.c, src/test.c, diff --git a/docs/virsh.pod b/docs/virsh.pod new file mode 100644 index 0000000000..bbdf92710e --- /dev/null +++ b/docs/virsh.pod @@ -0,0 +1,259 @@ +=head1 NAME + +virsh - management user interface + +=head1 SYNOPSIS + +virsh [args] + +=head1 DESCRIPTION + +The B 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 interract with the virtualization capabilities of recent versions of Linux (and other OSes). It is free software available under the GNU Lesser General Public License. Virtualization of the Linux Operating System means the ability to run multiple instances of Operating Systems concurently on a single hardware system where the basic resources are driven by a Linux instance. The library aim at providing long term stable C API initially for the Xen paravirtualization but should be able to integrate other virtualization mechanisms if needed. + +The basic structure of every virsh command is almost always: + + virsh [OPTIONS] + +Where I is one of the sub commands listed below, I +is the numeric domain id, or the domain name (which will be internally +translated to domain id), and I 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 clear for +each of those sub commands. + +=head1 NOTES + +All B opperations rely upon the libvirt library. +For any virsh commands to run xend/qemu, or what ever virtual library that libvirt suports. For this reason you should start xend/qemu as a service when your system first boots using xen/qemu. + +Most B 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. + +Most B commands act asynchronously, so just because the B +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. + +=head1 DOMAIN SUBCOMMANDS + +The following sub commands manipulate domains directly, as stated +previously most commands take domain-id as the first parameter. + +=over 4 + +=item B optional I<--readonly> + +Connect to local hypervisor. This is build-in command after shell start up. + +The I<--readonly> option read-only connection + +=item B I + +Create a domain from an XML an easy way to create one if you have a pre-existing xen guest created via B create . + +B + +virsh dumpxml to a file. + +=item B I + +Returns basic information about the domain. + +=item B I + +Ouput the domain informations as an XML dump to stdout, this format can be used by the create sub command. + + +=item B I + +Immediately terminate the domain domain-id. This doesn't give the domain +OS any chance to react, and it the equivalent of ripping the power +cord out on a physical machine. In most cases you will want to use +the B command instead. + +=item B I + +Converts a domain name to a domain id using xend's internal mapping. + +=item B I + +Returns basic information about the domain. + +=item B I + +convert a domain Id to domain name + +=item B I + +Returns state about a running domain. + +=item B optional I + +Displays the short help message (i.e. common commands). + +B I will print out a detailed help message on that sub command + +=item B + +Prints information about one or more domains. If no domains are +specified it prints out information about all domains. + +An example format for the list is as follows: + +B list + Id Name State + +---------------------------------- + + 0 Domain-0 running + 2 fedora paused + + +Name is the name of the domain. ID the domain numeric id. + State is the run state (see below). + +=over 4 + +B + + +The State field lists 6 states for a Xen Domain, and which ones the +current Domain is in. +=back + +=item B + +The domain is currently running on a CPU + +=item B + +The domain is blocked, and not running or runable. This can be caused +because the domain is waiting on IO (a traditional wait state) or has +gone to sleep because there was nothing else for it to do. + +=item B

+ +The domain has been paused, usually occurring through the administrator +running B. When in a paused state the domain will still +consume allocated resources like memory, but will not be eligible for +scheduling by the Xen hypervisor. + +=item B + +FIXME: Why would you ever see this state? + +=item B + +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 L for more info. + +=item B + +The domain is in process of dying, but hasn't completely shutdown or +crashed. + +FIXME: Is this right? + +=back + +=item B I + +Returns basic information about the node. + +=item B + +quit this interactive terminal + +=item B I + +Reboot a domain. This acts just as if the domain had the B +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. + +For xen vm the behavior of what happens to a domain when it reboots is set by the +I parameter of the xmdomain.cfg file when the domain was +created. + +=item B I + +Restores a domain from an B state file. See I for more info. + +=item B I I + +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. B restores from this state file. + +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 TCP timeouts may have expired. + +=item B I + +Gracefully shuts down a domain. This coordinates with the domain OS +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. + +For a xen guest vm the behavior of what happens to a domain when it reboots is set by the +I parameter of the xmdomain.cfg file when the domain was +created. + + +=item B I + +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. + +=item B + +Will print out the major version info about what this built from. + +=over 8 + +B + +B version + +Compiled against library: libvir 0.0.6 + +Using library: libvir 0.0.6 + +Using API: Xen 3.0.0 + +Running hypervisor: Xen 3.0.0 + +=back +=back + +=head1 SEE ALSO + +L, L, L , L + +=head1 AUTHOR + + Andrew Puch + Daniel Veillard + + Based on the xm man paged by + Sean Dague + Daniel Stekloff + + +=head1 BUGS + +Bugs can be view on the RedHat buzilla page under the libvirt +L + +L + +=