man pages: Lowercase name for syntax highlighting
[ganeti-local] / man / gnt-instance.rst
index dfb6ed4..a8c69d5 100644 (file)
@@ -84,7 +84,7 @@ the resolver (e.g. in DNS or /etc/hosts, depending on your setup).
 Since the name check is used to compute the IP address, if you pass
 this option you must also pass the ``--no-ip-check`` option.
 
-If you don't wat the instance to automatically start after
+If you don't want the instance to automatically start after
 creation, this is possible via the ``--no-start`` option. This will
 leave the instance down until a subsequent **gnt-instance start**
 command.
@@ -103,13 +103,16 @@ ip
     the node expects the instance to use)
 
 mode
-    specifies the connection mode for this nic: routed or bridged.
+    specifies the connection mode for this nic: routed, bridged or
+    openvswitch.
 
 link
-    in bridged mode specifies the bridge to attach this NIC to, in
-    routed mode it's intended to differentiate between different
-    routing tables/instance groups (but the meaning is dependent on
-    the network script, see gnt-cluster(8) for more details)
+    in bridged or openvswitch mode specifies the interface to attach
+    this NIC to, in routed mode it's intended to differentiate between
+    different routing tables/instance groups (but the meaning is
+    dependent on the network script, see gnt-cluster(8) for more
+    details). Note that openvswitch support is also hypervisor
+    dependent.
 
 
 Of these "mode" and "link" are nic parameters, and inherit their
@@ -190,9 +193,11 @@ boot\_order
     as 'dc'.
 
     For KVM the boot order is either "floppy", "cdrom", "disk" or
-    "network".  Please note that older versions of KVM couldn't
-    netboot from virtio interfaces. This has been fixed in more recent
-    versions and is confirmed to work at least with qemu-kvm 0.11.1.
+    "network".  Please note that older versions of KVM couldn't netboot
+    from virtio interfaces. This has been fixed in more recent versions
+    and is confirmed to work at least with qemu-kvm 0.11.1. Also note
+    that if you have set the ``kernel_path`` option, that will be used
+    for booting, and this setting will be silently ignored.
 
 blockdev\_prefix
     Valid for the Xen HVM and PVM hypervisors.
@@ -256,7 +261,7 @@ cdrom\_disk\_type
 
     This parameter determines the way the cdroms disks are presented
     to the instance. The default behavior is to get the same value of
-    the eariler parameter (disk_type). The possible options are:
+    the earlier parameter (disk_type). The possible options are:
 
     - paravirtual
     - ide
@@ -424,9 +429,10 @@ kernel\_path
     Valid for the Xen PVM and KVM hypervisors.
 
     This option specifies the path (on the node) to the kernel to boot
-    the instance with. Xen PVM instances always require this, while
-    for KVM if this option is empty, it will cause the machine to load
-    the kernel from its disks.
+    the instance with. Xen PVM instances always require this, while for
+    KVM if this option is empty, it will cause the machine to load the
+    kernel from its disks (and the boot will be done accordingly to
+    ``boot_order``).
 
 kernel\_args
     Valid for the Xen PVM and KVM hypervisors.
@@ -519,7 +525,7 @@ mem\_path
 use\_chroot
     Valid for the KVM hypervisor.
 
-    This boolean option determines wether to run the KVM instance in a
+    This boolean option determines whether to run the KVM instance in a
     chroot directory.
 
     If it is set to ``true``, an empty directory is created before
@@ -563,7 +569,9 @@ cpu\_mask
     the colon-separated list _must_ equal the number of VCPUs of the
     instance.
 
-    Example::
+    Example:
+
+    .. code-block:: bash
 
       # Map the entire instance to CPUs 0-2
       gnt-instance modify -H cpu_mask=0-2 my-inst
@@ -584,6 +592,18 @@ cpu\_mask
       # Turn off CPU pinning (default setting)
       gnt-instance modify -H cpu_mask=all my-inst
 
+cpu\_cap
+    Valid for the Xen hypervisor.
+
+    Set the maximum amount of cpu usage by the VM. The value is a percentage
+    between 0 and (100 * number of VCPUs). Default cap is 0: unlimited.
+
+cpu\_weight
+    Valid for the Xen hypervisor.
+
+    Set the cpu time ratio to be allocated to the VM. Valid values are
+    between 1 and 65535. Default weight is 256.
+
 usb\_mouse
     Valid for the KVM hypervisor.
 
@@ -614,11 +634,11 @@ a hypothetical ``dhcp`` parameter to yes can be achieved by::
 
     gnt-instance add -O dhcp=yes ...
 
-The ``-I (--iallocator)`` option specifies the instance allocator
-plugin to use. If you pass in this option the allocator will select
-nodes for this instance automatically, so you don't need to pass them
-with the ``-n`` option. For more information please refer to the
-instance allocator documentation.
+The ``-I (--iallocator)`` option specifies the instance allocator plugin
+to use (``.`` means the default allocator). If you pass in this option
+the allocator will select nodes for this instance automatically, so you
+don't need to pass them with the ``-n`` option. For more information
+please refer to the instance allocator documentation.
 
 The ``-t (--disk-template)`` options specifies the disk layout type
 for the instance.  The available choices are:
@@ -725,7 +745,7 @@ hypervisor
 
 mac, ip, mode, link
     Specifications for the one NIC that will be created for the
-    instance. 'bridge' is also accepted as a backwards compatibile
+    instance. 'bridge' is also accepted as a backwards compatible
     key.
 
 nics
@@ -906,8 +926,8 @@ MODIFY
 | [{-H|\--hypervisor-parameters} *HYPERVISOR\_PARAMETERS*]
 | [{-B|\--backend-parameters} *BACKEND\_PARAMETERS*]
 | [{-m|\--runtime-memory} *SIZE*]
-| [\--net add*[:options]* \| \--net remove \| \--net *N:options*]
-| [\--disk add:size=*SIZE*[,vg=*VG*][,metavg=*VG*] \| \--disk remove \|
+| [\--net add*[:options]* \| \--net [*N*:]remove \| \--net *N:options*]
+| [\--disk add:size=*SIZE*[,vg=*VG*][,metavg=*VG*] \| \--disk [*N*:]remove \|
 |  \--disk *N*:mode=*MODE*]
 | [{-t|\--disk-template} plain | {-t|\--disk-template} drbd -n *new_secondary*] [\--no-wait-for-sync]
 | [\--os-type=*OS* [\--force-variant]]
@@ -1022,6 +1042,10 @@ resolves to must not be reachable (in order to prevent duplicate IPs
 the next time the instance is started). The IP test can be skipped if
 the ``--no-ip-check`` option is passed.
 
+Note that you can rename an instance to its same name, to force
+re-executing the os-specific rename script for that instance, if
+needed.
+
 The ``--no-name-check`` skips the check for the new instance name via
 the resolver (e.g. in DNS or /etc/hosts, depending on your setup) and
 that the resolved name matches the provided name. Since the name check
@@ -1098,7 +1122,7 @@ case the more than one instance will be affected.
 
 The ``--no-remember`` option will perform the startup but not change
 the state of the instance in the configuration file (if it was stopped
-before, Ganeti will still thinks it needs to be stopped). This can be
+before, Ganeti will still think it needs to be stopped). This can be
 used for testing, or for a one shot-start where you don't want the
 watcher to restart the instance if it crashes.
 
@@ -1139,7 +1163,7 @@ SHUTDOWN
 
 | **shutdown**
 | [\--timeout=*N*]
-| [\--force-multiple] [\--ignore-offline] [\--no-remember]
+| [\--force] [\--force-multiple] [\--ignore-offline] [\--no-remember]
 | [\--instance \| \--node \| \--primary \| \--secondary \| \--all \|
 | \--tags \| \--node-tags \| \--pri-node-tags \| \--sec-node-tags]
 | [\--submit]
@@ -1164,6 +1188,10 @@ and they influence the actual instances being shutdown.
 force the instance to be marked as stopped. This option should be used
 with care as it can lead to an inconsistent cluster state.
 
+Use ``--force`` to be able to shutdown an instance even when it's marked
+as offline. This is useful is an offline instance ends up in the
+``ERROR_up`` state, for example.
+
 The ``--no-remember`` option will perform the shutdown but not change
 the state of the instance in the configuration file (if it was running
 before, Ganeti will still thinks it needs to be running). This can be
@@ -1263,10 +1291,10 @@ REPLACE-DISKS
 [\--disks *idx*] {*instance*}
 
 **replace-disks** [\--submit] [\--early-release] [\--ignore-ipolicy]
-{{-I\|\--iallocator} *name* \| \--node *node* } {*instance*}
+{{-I\|\--iallocator} *name* \| {{-n|\--new-secondary} *node* } {*instance*}
 
 **replace-disks** [\--submit] [\--early-release] [\--ignore-ipolicy]
-{\--auto} {*instance*}
+{-a\|\--auto} {*instance*}
 
 This command is a generalized form for replacing disks. It is
 currently only valid for the mirrored (DRBD) disk template.
@@ -1280,11 +1308,11 @@ of comma-delimited disk indices (zero-based), e.g. 0,2 to replace only
 the first and third disks.
 
 The third form (when passing either the ``--iallocator`` or the
-``--new-secondary`` option) is designed to change secondary node of
-the instance. Specifying ``--iallocator`` makes the new secondary be
-selected automatically by the specified allocator plugin, otherwise
-the new secondary node will be the one chosen manually via the
-``--new-secondary`` option.
+``--new-secondary`` option) is designed to change secondary node of the
+instance. Specifying ``--iallocator`` makes the new secondary be
+selected automatically by the specified allocator plugin (use ``.`` to
+indicate the default allocator), otherwise the new secondary node will
+be the one chosen manually via the ``--new-secondary`` option.
 
 Note that it is not possible to select an offline or drained node as a
 new secondary.
@@ -1377,7 +1405,7 @@ GROW-DISK
 | {*instance*} {*disk*} {*amount*}
 
 Grows an instance's disk. This is only possible for instances having a
-plain, drbd or rbd disk template.
+plain, drbd, file, sharedfile or rbd disk template.
 
 Note that this command only change the block device size; it will not
 grow the actual filesystems, partitions, etc. that live on that
@@ -1428,7 +1456,8 @@ instance.
 RECREATE-DISKS
 ^^^^^^^^^^^^^^
 
-| **recreate-disks** [\--submit] [-n node1:[node2]]
+| **recreate-disks** [\--submit]
+| [{-n node1:[node2] \| {-I\|\--iallocator *name*}}]
 | [\--disk=*N*[:[size=*VAL*][,mode=*ro\|rw*]]] {*instance*}
 
 Recreates all or a subset of disks of the given instance.
@@ -1454,6 +1483,11 @@ passed must equal the number of nodes that the instance currently
 has. Note that changing nodes is only allowed when all disks are
 replaced, e.g. when no ``--disk`` option is passed.
 
+Another method of choosing which nodes to place the instance on is by
+using the specified iallocator, passing the ``--iallocator`` option.
+The primary and secondary nodes will be chosen by the specified
+iallocator plugin, or by the default allocator if ``.`` is specified.
+
 See **ganeti(7)** for a description of ``--submit`` and other common
 options.
 
@@ -1526,6 +1560,8 @@ explicitly specify the target node (which can be any node) using the
 ``-n`` or ``--target-node`` option, or specify an iallocator plugin
 using the ``-I`` or ``--iallocator`` option. If you omit both, the
 default iallocator will be used to specify the target node.
+Alternatively, the default iallocator can be requested by specifying
+``.`` as the name of the plugin.
 
 The migration command needs a perfectly healthy instance, as we rely
 on the dual-master capability of drbd8 and the disks of the instance
@@ -1546,7 +1582,7 @@ viewed with the **gnt-cluster info** command).
 If the ``--cleanup`` option is passed, the operation changes from
 migration to attempting recovery from a failed previous migration.  In
 this mode, Ganeti checks if the instance runs on the correct node (and
-updates its configuration if not) and ensures the instances's disks
+updates its configuration if not) and ensures the instances' disks
 are configured correctly. In this mode, the ``--non-live`` option is
 ignored.
 
@@ -1564,6 +1600,9 @@ The ``--no-runtime-changes`` option forbids migrate to alter an
 instance's runtime before migrating it (eg. ballooning an instance
 down because the target node doesn't have enough available memory).
 
+If an instance has the backend parameter ``always\_failover`` set to
+true, then the migration is automatically converted into a failover.
+
 See **ganeti(7)** for a description of ``--submit`` and other common
 options.
 
@@ -1612,7 +1651,7 @@ instance to stop.
 
 The ``--ignore-consistency`` option will make Ganeti ignore any errors
 in trying to shutdown the instance on its node; useful if the
-hypervisor is broken and you want to recuperate the data.
+hypervisor is broken and you want to recover the data.
 
 If ``--ignore-ipolicy`` is given any instance policy violations occuring
 during this operation are ignored.