diff --git a/tools/virsh.pod b/tools/virsh.pod index 2d65cf9cbfa0b6028fb45586f0a9102087c87e10..5afa1f2b05e59d951ad2c1cc20d62f38ad16161b 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -115,7 +115,7 @@ The following commands are generic i.e. not specific to a domain. =over 4 -=item B optional I +=item B [I] This lists each of the virsh commands. When used without options, all commands are listed, one per line, grouped into related categories, @@ -177,7 +177,7 @@ Running hypervisor: Xen 3.0.0 =back -=item B optional I +=item B [I] Will change current directory to I. The default directory for the B command is the home directory or, if there is no I @@ -189,7 +189,7 @@ This command is only available in interactive mode. Will print the current directory. -=item B I optional I<--readonly> +=item B I [I<--readonly>] (Re)-Connect to the hypervisor. When the shell is first started, this is automatically run with the I parameter requested by the C<-c> @@ -240,14 +240,14 @@ and size of the physical memory. The output corresponds to virNodeInfo structure. Specifically, the "CPU socket(s)" field means number of CPU sockets per NUMA cell. -=item B optional I I<--percent> +=item B [I] [I<--percent>] Returns cpu stats of the node. If I is specified, this will prints specified cpu statistics only. If I<--percent> is specified, this will prints percentage of each kind of cpu statistics during 1 second. -=item B optional I +=item B [I] Returns memory stats of the node. If I is specified, this will prints specified cell statistics only. @@ -266,7 +266,7 @@ The XML also show the NUMA topology information if available. Inject NMI to the guest. -=item B optional I<--inactive> I<--all> +=item B [I<--inactive> | I<--all>] Prints information about one or more domains. If no domains are specified it prints out information about running domains. @@ -333,7 +333,7 @@ crashed. =back -=item B optional { I<--cellno> B | I<--all> } +=item B [B | I<--all>] Prints the available amount of memory on the machine or within a NUMA cell if I is provided. If I<--all> is provided instead @@ -366,7 +366,7 @@ I can be specified as a short integer, a name or a full UUID. =over 4 -=item B optional I<--disable> I +=item B [I<--disable>] I Configure a domain to be automatically started at boot. @@ -379,7 +379,7 @@ I 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. -=item B I optional I<--console> I<--paused> I<--autodestroy> +=item B I [I<--console>] [I<--paused>] [I<--autodestroy>] Create a domain from an XML . An easy way to create the XML is to use the B command to obtain the definition of a @@ -450,7 +450,7 @@ Returns information about jobs running on a domain. Convert a domain Id (or UUID) to domain name -=item B I optional I<--reason> +=item B I [I<--reason>] Returns state about a domain. I<--reason> tells virsh to also print reason for the state. @@ -475,7 +475,8 @@ configuration format named by I. Dumps the core of a domain to a file for analysis. -=item B I optional I<--inactive> I<--security-info> I<--update-cpu> +=item B I [I<--inactive>] [I<--security-info>] +[I<--update-cpu>] Output the domain information as an XML dump to stdout, this format can be used by the B command. Additional options affecting the XML dump may be @@ -485,7 +486,7 @@ Using I<--security-info> security sensitive information will also be included in the XML dump. I<--update-cpu> updates domain CPU requirements according to host CPU. -=item B optional I<--shell> I<--xml> I... +=item B [I<--shell>] [I<--xml>] [I...] Echo back each I, separated by space. If I<--shell> is specified, then the output will be single-quoted where needed, so that @@ -518,16 +519,16 @@ the domain, it will automatically be started from this saved state. Remove the B state file for a domain, if it exists. This ensures the domain will do a full boot the next time it is started. -=item B optional I +=item B [I] Provide the maximum number of virtual CPUs supported for a guest VM on this connection. If provided, the I parameter must be a valid type attribute for the element of XML. -=item B optional I<--live> I<--p2p> I<--direct> I<--tunnelled> -I<--persistent> I<--undefinesource> I<--suspend> I<--copy-storage-all> -I<--copy-storage-inc> I<--verbose> I I I -I I<--timeout> +=item B [I<--live>] [I<--direct>] [I<--p2p> [I<--tunnelled>]] +[I<--persistent>] [I<--undefinesource>] [I<--suspend>] [I<--copy-storage-all>] +[I<--copy-storage-inc>] [I<--verbose>] I I [I] +[I] [I<--timeout> B] Migrate domain to another host. Add I<--live> for live migration; I<--p2p> for peer-2-peer migration; I<--direct> for direct migration; or I<--tunnelled> @@ -544,7 +545,8 @@ I is the migration URI, which usually can be omitted. I is used for renaming the domain to new name during migration, which also usually can be omitted. -I<--timeout> forces guest to suspend when live migration exceeds timeout, and +I<--timeout> B forces guest to suspend when live migration exceeds +that many seconds, and then the migration will complete offline. It can only be used with I<--live>. B: The I parameter for normal migration and peer2peer migration @@ -607,10 +609,10 @@ 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 B family of commands. -=item B optional I<--set> B I I<--config> -I<--live> I<--current> +=item B [I<--set> B] I [[I<--config>] +[I<--live>] | [I<--current>]] -=item B optional I<--weight> B optional I<--cap> B +=item B [I<--weight> B] [I<--cap> B] I Allows you to show (and set) the domain scheduler parameters. The parameters @@ -633,7 +635,7 @@ Therefore, -1 is a useful shorthand for 262144. B: The weight and cap parameters are defined only for the XEN_CREDIT scheduler and are now I. -=item B I optional I I<--screen> B +=item B I [I] [I<--screen> B] Takes a screenshot of a current domain console and stores it into a file. Optionally, if hypervisor supports more displays for a domain, I @@ -642,8 +644,8 @@ of screen. In case of multiple graphics cards, heads are enumerated before devices, e.g. having two graphics cards, both with four heads, screen ID 5 addresses the second head on the second card. -=item B I B optional I<--config> I<--live> -I<--current> +=item B I B [[I<--config>] [I<--live>] | +[I<--current>]] Change the memory allocation for a guest domain. If I<--live> is specified, perform a memory balloon of a running guest. @@ -661,8 +663,8 @@ rounds the parameter up unless the kB argument is evenly divisible by 1024 For Xen, you can only adjust the memory of a running domain if the domain is paravirtualized or running the PV balloon driver. -=item B I B optional I<--config> I<--live> -I<--current> +=item B I B [[I<--config>] [I<--live>] | +[I<--current>]] Change the maximum memory allocation limit for a guest domain. If I<--live> is specified, affect a running guest. @@ -681,9 +683,9 @@ vSphere/ESX, 263168 (257MB) would be rounded up because it's not a multiple of 4MB, while 266240 (260MB) is valid without rounding. -=item B I optional I<--hard-limit> B -optional I<--soft-limit> B optional I<--swap-hard-limit> -B optional I<--min-guarantee> B +=item B I [I<--hard-limit> B] +[I<--soft-limit> B] [I<--swap-hard-limit> B] +[I<--min-guarantee> B] [[I<--config>] [I<--live>] | [I<--current>]] Allows you to display or set the domain memory parameters. Without flags, the current settings are displayed; with a flag, the @@ -727,7 +729,8 @@ value are kilobytes (i.e. blocks of 1024 bytes). =back -=item B I optional I<--weight> B +=item B I [I<--weight> B] [[I<--config>] +[I<--live] | [I<--current>]] Display or set the blkio parameters. QEMU/KVM supports I<--weight>. I<--weight> is in range [100, 1000]. @@ -739,8 +742,8 @@ Both I<--live> and I<--current> flags may be given, but I<--current> is exclusive. If no flag is specified, behavior is different depending on hypervisor. -=item B I I optional I<--maximum> I<--config> -I<--live> I<--current> +=item B I I [I<--maximum>] [[I<--config>] +[I<--live>] | [I<--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 @@ -780,7 +783,7 @@ services must be shutdown in the domain. The exact behavior of a domain when it shuts down is set by the I parameter in the domain's XML definition. -=item B I optional I<--console> I<--paused> I<--autodestroy> +=item B I [I<--console>] [I<--paused>] [I<--autodestroy>] Start a (previously defined) inactive domain, either from the last B state, or via a fresh boot if no managedsave state is @@ -812,8 +815,8 @@ is not available the processes will provide an exit code of 1. Undefine the configuration for an inactive domain. Since it's not running the domain name or UUID must be used as the I. -=item B I optional I<--maximum> I<--current> -I<--config> I<--live> +=item B I [{I<--maximum> | I<--current>} +{I<--config> | I<--live>}] Print information about the virtual cpu counts of the given I. If no flags are specified, all possible counts are @@ -832,8 +835,8 @@ values; these two flags cannot both be specified. Returns basic information about the domain virtual CPUs, like the number of vCPUs, the running time, the affinity to physical processors. -=item B I optional I I I<--live> I<--config> -I<--current> +=item B I [I] [I] [[I<--live>] +[I<--config>] | [I<--current>]] Query or change the pinning of domain VCPUs to host physical CPUs. To pin a single I, specify I; otherwise, you can query one @@ -878,10 +881,10 @@ See the documentation to learn about libvirt XML format for a device. For cdrom and floppy devices, this command only replaces the media within the single existing device; consider using B for this usage. -=item B I I I optional -I<--driver driver> I<--subdriver subdriver> I<--cache cache> -I<--type type> I<--mode mode> I<--persistent> I<--sourcetype soucetype> -I<--serial serial> I<--shareable> I<--address address> +=item B I I I +[I<--driver driver>] [I<--subdriver subdriver>] [I<--cache cache>] +[I<--type type>] [I<--mode mode>] [I<--persistent>] [I<--sourcetype soucetype>] +[I<--serial serial>] [I<--shareable>] [I<--address address>] Attach a new disk device to the domain. I and I are paths for the files and devices. @@ -898,9 +901,9 @@ is shareable between domains. I
is the address of disk device in the form of pci:domain.bus.slot.function, scsi:controller.bus.unit or ide:controller.bus.unit. -=item B I I I optional -I<--target target> I<--mac mac> I<--script script> I<--model model> -I<--persistent> +=item B I I I +[I<--target target>] [I<--mac mac>] [I<--script script>] [I<--model model>] +[I<--persistent>] Attach a new network interface to the domain. I can be either I to indicate a physical network device or I to indicate a bridge to a device. @@ -922,14 +925,14 @@ as command B. Detach a disk device from a domain. The I is the device as seen from the domain. -=item B I I optional I<--mac mac> +=item B I I [I<--mac mac>] Detach a network interface from a domain. I can be either I to indicate a physical network device or I to indicate a bridge to a device. It is recommended to use the I option to distinguish between the interfaces if more than one are present on the domain. -=item B I I optional I<--persistent> I<--force> +=item B I I [I<--persistent>] [I<--force>] Update the characteristics of a device associated with I, based on the device definition in an XML I. If the I<--persistent> option is @@ -951,7 +954,7 @@ but the way to name a virtual network is either by its name or UUID. =over 4 -=item B I optional I<--disable> +=item B I [I<--disable>] Configure a virtual network to be automatically started at boot. The I<--disable> option disable autostarting. @@ -994,7 +997,7 @@ variables, and defaults to C. Returns basic information about the I object. -=item B optional I<--inactive> or I<--all> +=item B [I<--inactive> | I<--all>] Returns the list of active networks, if I<--all> is specified this will also include defined but inactive networks, if I<--inactive> is specified only the @@ -1046,7 +1049,7 @@ not started. Destroy (stop) a given host interface, such as by running "if-down" to disable that interface from active use. This takes effect immediately. -=item B I optional I<--inactive> +=item B I [I<--inactive>] Output the host interface information as an XML dump to stdout. If I<--inactive> is specified, then the output reflects the persistent @@ -1067,7 +1070,7 @@ except that it does some error checking. The editor used can be supplied by the C<$VISUAL> or C<$EDITOR> environment variables, and defaults to C. -=item B optional I<--inactive> or I<--all> +=item B [I<--inactive> | I<--all>] Returns the list of active host interfaces. If I<--all> is specified this will also include defined but inactive interfaces. If @@ -1127,19 +1130,20 @@ pools are similar to the ones used for domains. =over 4 -=item B I optional I +=item B I [I] Returns XML describing all storage pools of a given I that could be found. If I is provided, it is a file that contains XML to further restrict the query for pools. -=item B I optional I I +=item B I [I] [I] +[I] Returns XML describing all storage pools of a given I that could -be found. If I and I are provided, they control where the -query is performed. +be found. If I, I, or I are provided, they control +where the query is performed. -=item B I optional I<--disable> +=item B I [I<--disable>] Configure whether I should automatically start at boot. @@ -1151,8 +1155,9 @@ Build a given pool. Create and start a pool object from the XML I. -=item B I I<--print-xml> I optional I -I I I I<--source-format format> +=item B I I<--print-xml> I [I] +[I] [I] [I] [] +[I<--source-format format>] Create and start a pool object I from the raw parameters. If I<--print-xml> is specified, then print the XML of the pool object @@ -1163,8 +1168,9 @@ I. Create, but do not start, a pool object from the XML I. -=item B I I<--print-xml> I optional I -I I I I<--source-format format> +=item B I I<--print-xml> I [I] +[I] [I] [I] [] +[I<--source-format format>] Create, but do not start, a pool object I from the raw parameters. If I<--print-xml> is specified, then print the XML of the pool object @@ -1207,7 +1213,7 @@ variables, and defaults to C. Returns basic information about the I object. -=item B optional I<--inactive> I<--all> I<--details> +=item B [I<--inactive> | I<--all>] [I<--details>] List pool objects known to libvirt. By default, only pools in use by active domains are listed; I<--inactive> lists just the inactive @@ -1255,7 +1261,7 @@ B vi newvolume.xml (or make changes with your other text editor) virsh vol-create differentstoragepool newvolume.xml -=item B I I [optional I<--inputpool> +=item B I I [I<--inputpool> I] I Create a volume, using another volume as input. @@ -1265,9 +1271,9 @@ I<--inputpool> I is the name or uuid of the storage pool the source volume is in. I is the name or key or path of the source volume. -=item B I I I optional -I<--allocation> I I<--format> I I<--backing-vol> -I I<--backing-vol-format> I +=item B I I I +[I<--allocation> I] [I<--format> I] [I<--backing-vol> +I] [I<--backing-vol-format> I] Create a volume from a set of arguments. I is the name or UUID of the storage pool to create the volume @@ -1284,73 +1290,84 @@ volume to be used if taking a snapshot of an existing volume. I<--backing-vol-format> I is the format of the snapshot backing volume; raw, bochs, qcow, qcow2, vmdk, host_device. -=item B [optional I<--pool> I] I I +=item B [I<--pool> I] I +I Clone an existing volume. Less powerful, but easier to type, version of B. -I<--pool> I is the name or UUID of the storage pool to create the volume in. +I<--pool> I is the name or UUID of the storage pool to create +the volume in. I is the name or key or path of the source volume. I is the name of the new volume. -=item B [optional I<--pool> I] I +=item B [I<--pool> I] I Delete a given volume. -I<--pool> I is the name or UUID of the storage pool the volume is in. +I<--pool> I is the name or UUID of the storage pool the volume +is in. I is the name or key or path of the volume to delete. -=item B [optional I<--pool> I I<--offset> I I<--length> I] I I +=item B [I<--pool> I] [I<--offset> I] +[I<--length> I] I I Upload the contents of I to a storage volume. -I<--pool> I is the name or UUID of the storage pool the volume is in. +I<--pool> I is the name or UUID of the storage pool the volume +is in. I is the name or key or path of the volume to wipe. I<--offset> is the position in the storage volume at which to start writing the data. I<--length> is an upper bound of the amount of data to be uploaded. An error will occurr if the I is greater than the specified length. -=item B [optional I<--pool> I I<--offset> I I<--length> I] I I +=item B [I<--pool> I] [I<--offset> I] +[I<--length> I] I I Download the contents of I from a storage volume. -I<--pool> I is the name or UUID of the storage pool the volume is in. +I<--pool> I is the name or UUID of the storage pool the volume +is in. I is the name or key or path of the volume to wipe. I<--offset> is the position in the storage volume at which to start reading the data. I<--length> is an upper bound of the amount of data to be downloaded. -=item B [optional I<--pool> I] I +=item B [I<--pool> I] I -Wipe a volume, ensure data previously on the volume is not accessible to future reads. -I<--pool> I is the name or UUID of the storage pool the volume is in. +Wipe a volume, ensure data previously on the volume is not accessible to +future reads. I<--pool> I is the name or UUID of the storage +pool the volume is in. I is the name or key or path of the volume to wipe. -=item B [optional I<--pool> I] I +=item B [I<--pool> I] I Output the volume information as an XML dump to stdout. -I<--pool> I is the name or UUID of the storage pool the volume is in. -I is the name or key or path of the volume to output the XML of. +I<--pool> I is the name or UUID of the storage pool the volume +is in. I is the name or key or path of the volume +to output the XML of. -=item B [optional I<--pool> I] I +=item B [I<--pool> I] I Returns basic information about the given storage volume. -I<--pool> I is the name or UUID of the storage pool the volume is in. -I is the name or key or path of the volume to return information for. +I<--pool> I is the name or UUID of the storage pool the volume +is in. I is the name or key or path of the volume +to return information for. -=item B [optional I<--pool>] I optional I<--details> +=item B [I<--pool> I] [I<--details>] Return the list of volumes in the given storage pool. I<--pool> I is the name or UUID of the storage pool. The I<--details> option instructs virsh to additionally display volume type and capacity related information where available. -=item B [optional I<--uuid>] I +=item B [I<--uuid>] I Return the pool name or UUID for a given volume. By default, the pool name is returned. If the I<--uuid> option is given, the pool UUID is returned instead. I is the key or path of the volume to return the pool information for. -=item B [optional I<--pool> I] I +=item B [I<--pool> I] I Return the path for a given volume. -I<--pool> I is the name or UUID of the storage pool the volume is in. +I<--pool> I is the name or UUID of the storage pool the volume +is in. I is the name or key of the volume to return the path for. =item B I @@ -1358,11 +1375,12 @@ I is the name or key of the volume to return the path for. Return the name for a given volume. I is the key or path of the volume to return the name for. -=item B [optional I<--pool> I] I +=item B [I<--pool> I] I Return the volume key for a given volume. -I<--pool> I is the name or UUID of the storage pool the volume is in. -I is the name or path of the volume to return the volume key for. +I<--pool> I is the name or UUID of the storage pool the volume +is in. I is the name or path of the volume to return the +volume key for. =back @@ -1421,7 +1439,7 @@ used to represent properties of snapshots. =over 4 -=item B I optional I +=item B I [I] Create a snapshot for domain I with the properties specified in I. The only properties settable for a domain snapshot are the @@ -1429,8 +1447,8 @@ I. The only properties settable for a domain snapshot are the automatically filled in by libvirt. If I is completely omitted, then libvirt will choose a value for all fields. -=item B I optional I<--print-xml> -I I +=item B I [I<--print-xml>] +[I] [I] Create a snapshot for domain I with the given and ; if either value is omitted, libvirt will choose a @@ -1551,7 +1569,7 @@ attaching to an externally launched QEMU process. There may be issues with the guest ABI changing upon migration, and hotunplug may not work. -=item B I I optional I<--hmp> +=item B I I [I<--hmp>] Send an arbitrary monitor command I to domain I through the qemu monitor. The results of the command will be printed on stdout. If