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.
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
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.
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
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.
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
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
# 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.
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:
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
| [{-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]]
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
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.
| **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]
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
[\--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.
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.
| {*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
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.
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.
``-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
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.
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.
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.