Merge branch 'stable-2.9' into stable-2.10
[ganeti-local] / man / gnt-instance.rst
index cd60ee9..0174a65 100644 (file)
@@ -37,11 +37,12 @@ ADD
 | [{-B|\--backend-parameters} *BEPARAMS*]
 | [{-H|\--hypervisor-parameters} *HYPERVISOR* [: option=*value*... ]]
 | [{-O|\--os-parameters} *param*=*value*... ]
-| [\--file-storage-dir *dir\_path*] [\--file-driver {loop \| blktap}]
+| [\--file-storage-dir *dir\_path*] [\--file-driver {loop \| blktap \| blktap2}]
 | {{-n|\--node} *node[:secondary-node]* \| {-I|\--iallocator} *name*}
 | {{-o|\--os-type} *os-type*}
 | [\--submit] [\--print-job-id]
 | [\--ignore-ipolicy]
+| [\--no-wait-for-sync]
 | {*instance*}
 
 Creates a new instance on the specified host. The *instance* argument
@@ -135,6 +136,9 @@ ip
     connected to the said network. ``--no-conflicts-check`` can be used
     to override this check. The special value **pool** causes Ganeti to
     select an IP from the the network the NIC is or will be connected to.
+    One can pick an externally reserved IP of a network along with
+    ``--no-conflict-check``. Note that this IP cannot be assigned to
+    any other instance until it gets released.
 
 mode
     specifies the connection mode for this NIC: routed, bridged or
@@ -160,6 +164,11 @@ name
    this option specifies a name for the NIC, which can be used as a NIC
    identifier. An instance can not have two NICs with the same name.
 
+vlan
+   in openvswitch mode specifies the VLANs that the NIC will be
+   connected to. To connect as an access port use ``n`` or ``.n`` with
+   **n** being the VLAN ID. To connect as an trunk port use ``:n[:n]``.
+   A hybrid port can be created with ``.n:n[:n]``
 
 Of these "mode" and "link" are NIC parameters, and inherit their
 default at cluster level.  Alternatively, if no network is desired for
@@ -306,7 +315,8 @@ disk\_type
     instance. The possible options are:
 
     - ioemu [default] (HVM & KVM)
-    - ide (HVM & KVM)
+    - paravirtual (HVM & KVM)
+    - ide (KVM)
     - scsi (KVM)
     - sd (KVM)
     - mtd (KVM)
@@ -337,6 +347,14 @@ vnc\_bind\_address
     or specify the address of one of the interfaces on the node to
     restrict listening to that interface.
 
+vnc\_password\_file
+    Valid for the Xen HVM and KVM hypervisors.
+
+    Specifies the location of the file containing the password for
+    connections using VNC. The default is a file named
+    vnc-cluster-password which can be found in the configuration
+    directory.
+
 vnc\_tls
     Valid for the KVM hypervisor.
 
@@ -469,10 +487,17 @@ acpi
 pae
     Valid for the Xen HVM and KVM hypervisors.
 
-    A boolean option that specifies if the hypervisor should enabled
+    A boolean option that specifies if the hypervisor should enable
     PAE support for this instance. The default is false, disabling PAE
     support.
 
+viridian
+    Valid for the Xen HVM hypervisor.
+
+    A boolean option that specifies if the hypervisor should enable
+    viridian (Hyper-V) for this instance. The default is false,
+    disabling viridian support.
+
 use\_localtime
     Valid for the Xen HVM and KVM hypervisors.
 
@@ -711,18 +736,34 @@ cpu\_sockets
     Number of emulated CPU sockets.
 
 soundhw
-    Valid for the KVM hypervisor.
+    Valid for the KVM and XEN hypervisors.
 
     Comma separated list of emulated sounds cards, or "all" to enable
     all the available ones.
 
+cpuid
+    Valid for the XEN hypervisor.
+
+    Modify the values returned by CPUID_ instructions run within instances.
+
+    This allows you to enable migration between nodes with different CPU
+    attributes like cores, threads, hyperthreading or SS4 support by hiding
+    the extra features where needed.
+
+    See the XEN documentation for syntax and more information.
+
+.. _CPUID: http://en.wikipedia.org/wiki/CPUID
+
 usb\_devices
     Valid for the KVM hypervisor.
 
-    Comma separated list of usb devices. These can be emulated devices
+    Space separated list of usb devices. These can be emulated devices
     or passthrough ones, and each one gets passed to kvm with its own
     ``-usbdevice`` option. See the **qemu**\(1) manpage for the syntax
-    of the possible components.
+    of the possible components. Note that values set with this
+    parameter are split on a space character and currently don't support
+    quoting. For backwards compatibility reasons, the RAPI interface keeps
+    accepting comma separated lists too.
 
 vga
     Valid for the KVM hypervisor.
@@ -749,6 +790,19 @@ kvm\_path
 
     Path to the userspace KVM (or qemu) program.
 
+vnet\_hdr
+    Valid for the KVM hypervisor.
+
+    This boolean option determines whether the tap devices used by the
+    KVM paravirtual nics (virtio-net) will get created with VNET_HDR
+    (IFF_VNET_HDR) support.
+
+    If set to false, it effectively disables offloading on the virio-net
+    interfaces, which prevents host kernel tainting and log flooding,
+    when dealing with broken or malicious virtio-net drivers.
+
+    It is set to ``true`` by default.
+
 The ``-O (--os-parameters)`` option allows customisation of the OS
 parameters. The actual parameter names and values depends on the OS
 being used, but the syntax is the same key=value. For example, setting
@@ -829,6 +883,9 @@ blktap
     better performance. Especially if you use a network file system
     (e.g. NFS) to store your instances this is the recommended choice.
 
+blktap2
+    Analogous to the blktap driver, but used by newer versions of Xen.
+
 If ``--ignore-ipolicy`` is given any instance policy violations occuring
 during this operation are ignored.
 
@@ -857,36 +914,42 @@ Example::
 BATCH-CREATE
 ^^^^^^^^^^^^
 
-**batch-create** {instances\_file.json}
+| **batch-create**
+| [{-I|\--iallocator} *instance allocator*]
+| {instances\_file.json}
 
 This command (similar to the Ganeti 1.2 **batcher** tool) submits
-multiple instance creation jobs based on a definition file. The
-instance configurations do not encompass all the possible options for
-the **add** command, but only a subset.
+multiple instance creation jobs based on a definition file. This
+file can contain all options which are valid when adding an instance
+with the exception of the ``iallocator`` field. The IAllocator is,
+for optimization purposes, only allowed to be set for the whole batch
+operation using the ``--iallocator`` parameter.
 
-The instance file should be a valid-formed JSON file, containing a
-dictionary with instance name and instance parameters. The accepted
-parameters are:
+The instance file must be a valid-formed JSON file, containing an
+array of dictionaries with instance creation parameters. All parameters
+(except ``iallocator``) which are valid for the instance creation
+OP code are allowed. The most important ones are:
 
-disk\_size
-    The size of the disks of the instance.
+instance\_name
+    The FQDN of the new instance.
 
 disk\_template
     The disk template to use for the instance, the same as in the
     **add** command.
 
-backend
+disks
+    Array of disk specifications. Each entry describes one disk as a
+    dictionary of disk parameters.
+
+beparams
     A dictionary of backend parameters.
 
 hypervisor
-    A dictionary with a single key (the hypervisor name), and as value
-    the hypervisor options. If not passed, the default hypervisor and
-    hypervisor options will be inherited.
+    The hypervisor for the instance.
 
-mac, ip, mode, link
-    Specifications for the one NIC that will be created for the
-    instance. 'bridge' is also accepted as a backwards compatible
-    key.
+hvparams
+    A dictionary with the hypervisor options. If not passed, the default
+    hypervisor options will be inherited.
 
 nics
     List of NICs that will be created for the instance. Each entry
@@ -894,13 +957,11 @@ nics
     Please don't provide the "mac, ip, mode, link" parent keys if you
     use this method for specifying NICs.
 
-primary\_node, secondary\_node
+pnode, snode
     The primary and optionally the secondary node to use for the
-    instance (in case an iallocator script is not used).
-
-iallocator
-    Instead of specifying the nodes, an iallocator script can be used
-    to automatically compute them.
+    instance (in case an iallocator script is not used). If those
+    parameters are given, they have to be given consistently for all
+    instances in the batch operation.
 
 start
     whether to start the instance
@@ -921,30 +982,42 @@ file\_storage\_dir, file\_driver
 A simple definition for one instance can be (with most of the
 parameters taken from the cluster defaults)::
 
-    {
-      "instance3": {
-        "template": "drbd",
-        "os": "debootstrap",
-        "disk_size": ["25G"],
-        "iallocator": "dumb"
+    [
+      {
+        "mode": "create",
+        "instance_name": "instance1.example.com",
+        "disk_template": "drbd",
+        "os_type": "debootstrap",
+        "disks": [{"size":"1024"}],
+        "nics": [{}],
+        "hypervisor": "xen-pvm"
       },
-      "instance5": {
-        "template": "drbd",
-        "os": "debootstrap",
-        "disk_size": ["25G"],
-        "iallocator": "dumb",
+      {
+        "mode": "create",
+        "instance_name": "instance2.example.com",
+        "disk_template": "drbd",
+        "os_type": "debootstrap",
+        "disks": [{"size":"4096", "mode": "rw", "vg": "xenvg"}],
+        "nics": [{}],
         "hypervisor": "xen-hvm",
         "hvparams": {"acpi": true},
-        "backend": {"maxmem": 512, "minmem": 256}
+        "beparams": {"maxmem": 512, "minmem": 256}
       }
-    }
+    ]
 
 The command will display the job id for each submitted instance, as
 follows::
 
     # gnt-instance batch-create instances.json
-    instance3: 11224
-    instance5: 11225
+    Submitted jobs 37, 38
+
+
+Note: If the allocator is used for computing suitable nodes for the
+instances, it will only take into account disk information for the
+default disk template. That means, even if other disk templates are
+specified for the instances, storage space information of these disk
+templates will not be considered in the allocation computation.
+
 
 REMOVE
 ^^^^^^
@@ -1082,6 +1155,8 @@ MODIFY
 | [\--offline \| \--online]
 | [\--submit] [\--print-job-id]
 | [\--ignore-ipolicy]
+| [\--hotplug]
+| [\--hotplug-if-possible]
 | {*instance*}
 
 Modifies the memory size, number of vcpus, ip address, MAC address
@@ -1111,14 +1186,16 @@ The ``--disk add:size=*SIZE*,[options..]`` option adds a disk to the
 instance, and ``--disk *N*:add:size=*SIZE*,[options..]`` will add a disk
 to the the instance at a specific index. The available options are the
 same as in the **add** command(``spindles``, ``mode``, ``name``, ``vg``,
-``metavg``). When adding an ExtStorage disk the ``provider=*PROVIDER*``
-option is also mandatory and specifies the ExtStorage provider. Also,
-for ExtStorage disks arbitrary parameters can be passed as additional
-comma separated options, same as in the **add** command. -The ``--disk
-remove`` option will remove the last disk of the instance. Use ``--disk
-`` *ID*``:remove`` to remove a disk by its identifier. *ID* can be the
-index of the disk, the disks's name or the disks's UUID. The ``--disk
-*ID*:modify[,options...]`` will change the options of the disk.
+``metavg``). Per default, gnt-instance waits for the disk mirror to sync.
+If you do not want this behavior, use the ``--no-wait-for-sync`` option.
+When adding an ExtStorage disk, the ``provider=*PROVIDER*`` option is
+also mandatory and specifies the ExtStorage provider. Also, for
+ExtStorage disks arbitrary parameters can be passed as additional comma
+separated options, same as in the **add** command. The ``--disk remove``
+option will remove the last disk of the instance. Use
+``--disk `` *ID*``:remove`` to remove a disk by its identifier. *ID*
+can be the index of the disk, the disks's name or the disks's UUID. The
+``--disk *ID*:modify[,options...]`` will change the options of the disk.
 Available options are:
 
 mode
@@ -1157,6 +1234,21 @@ immediately.
 If ``--ignore-ipolicy`` is given any instance policy violations occuring
 during this operation are ignored.
 
+If ``--hotplug`` is given any disk and NIC modifications will take
+effect without the need of actual reboot. Please note that this feature
+is currently supported only for KVM hypervisor and there are some
+restrictions: a) KVM versions >= 1.0 support it b) instances with chroot
+or uid pool security model do not support disk hotplug c) RBD disks with
+userspace access mode can not be hotplugged (yet) d) if hotplug fails
+(for any reason) a warning is printed but execution is continued e)
+for existing NIC modification interactive verification is needed unless
+``--force`` option is passed.
+
+If ``--hotplug-if-possible`` is given then ganeti won't abort in case
+hotplug is not supported. It will continue execution and modification
+will take place after reboot. This covers use cases where instances are
+not running or hypervisor is not KVM.
+
 See **ganeti**\(7) for a description of ``--submit`` and other common
 options.
 
@@ -1669,6 +1761,7 @@ FAILOVER
 | **failover** [-f] [\--ignore-consistency] [\--ignore-ipolicy]
 | [\--shutdown-timeout=*N*]
 | [{-n|\--target-node} *node* \| {-I|\--iallocator} *name*]
+| [\--cleanup]
 | [\--submit] [\--print-job-id]
 | {*instance*}
 
@@ -1706,6 +1799,12 @@ to stop.
 If ``--ignore-ipolicy`` is given any instance policy violations occuring
 during this operation are ignored.
 
+If the ``--cleanup`` option is passed, the operation changes from
+performin a failover to attempting recovery from a failed previous failover.
+In this mode, Ganeti checks if the instance runs on the correct node (and
+updates its configuration if not) and ensures the instances' disks
+are configured correctly.
+
 See **ganeti**\(7) for a description of ``--submit`` and other common
 options.
 
@@ -1855,7 +1954,9 @@ CHANGE-GROUP
 
 This command moves an instance to another node group. The move is
 calculated by an iallocator, either given on the command line or as a
-cluster default.
+cluster default. Note that the iallocator does only consider disk
+information of the default disk template, even if the instances'
+disk templates differ from that.
 
 If no specific destination groups are specified using ``--to``, all
 groups except the one containing the instance are considered.