1 <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
3 <!-- Fill in your name for FIRSTNAME and SURNAME. -->
4 <!-- Please adjust the date whenever revising the manpage. -->
5 <!ENTITY dhdate "<date>January 22, 2010</date>">
6 <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
7 allowed: see man(7), man(1). -->
8 <!ENTITY dhsection "<manvolnum>8</manvolnum>">
9 <!ENTITY dhucpackage "<refentrytitle>gnt-instance</refentrytitle>">
10 <!ENTITY dhpackage "gnt-instance">
12 <!ENTITY debian "<productname>Debian</productname>">
13 <!ENTITY gnu "<acronym>GNU</acronym>">
14 <!ENTITY gpl "&gnu; <acronym>GPL</acronym>">
15 <!ENTITY footer SYSTEM "footer.sgml">
26 <holder>Google Inc.</holder>
34 <refmiscinfo>ganeti 2.0</refmiscinfo>
37 <refname>&dhpackage;</refname>
39 <refpurpose>ganeti instance administration</refpurpose>
43 <command>&dhpackage; </command>
45 <arg choice="req">command</arg>
46 <arg>arguments...</arg>
50 <title>DESCRIPTION</title>
53 The <command>&dhpackage;</command> is used for instance
54 administration in the ganeti system.
59 <title>COMMANDS</title>
62 <title>Creation/removal/querying</title>
67 <command>add</command>
69 <arg choice="req">-t<group choice="req">
78 <arg rep="repeat">--disk=<replaceable>N</replaceable>:<group choice="req">
79 <arg>size=<replaceable>VAL</replaceable></arg>
80 <arg>adopt=<replaceable>LV</replaceable></arg>
81 </group>,mode=<replaceable>ro|rw</replaceable></arg>
82 <arg>-s <replaceable>SIZE</replaceable></arg>
85 <arg>--no-ip-check</arg>
86 <arg>--no-name-check</arg>
88 <arg>--no-install</arg>
91 <arg rep="repeat">--net=<replaceable>N</replaceable><arg rep="repeat">:options</arg></arg>
95 <arg>-B <replaceable>BEPARAMS</replaceable></arg>
98 <arg>-H <replaceable>HYPERVISOR</replaceable><arg>:<arg choice="plain" rep="repeat">option=<replaceable>value</replaceable></arg></arg></arg>
101 <arg>--file-storage-dir <replaceable>dir_path</replaceable></arg>
102 <arg>--file-driver<group choice="req">
109 <arg>-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg>
110 <arg>--iallocator <replaceable>name</replaceable></arg>
114 <arg choice="req">-o <replaceable>os-type</replaceable></arg>
119 <arg choice="req"><replaceable>instance</replaceable></arg>
123 Creates a new instance on the specified host. The
124 <replaceable>instance</replaceable> argument must be in DNS,
125 but depending on the bridge/routing setup, need not be in
126 the same network as the nodes in the cluster.
130 The <option>disk</option> option specifies the parameters
131 for the disks of the instance. The numbering of disks starts
132 at zero, and at least one disk needs to be passed. For each
133 disk, either the size or the adoption source needs to be
134 given, and optionally the access mode (read-only or the
135 default of read-write) can also be specified. The size is
136 interpreted (when no unit is given) in mebibytes. You can
137 also use one of the suffixes
138 <literal>m</literal>, <literal>g</literal> or
139 <literal>t</literal> to specificy the exact the units used;
140 these suffixes map to mebibytes, gibibytes and tebibytes.
144 When using the <option>adopt</option> key in the disk
145 definition, Ganeti will reuse those volumes (instead of
146 creating new ones) as the instance's disks. Ganeti will
147 rename these volumes to the standard format, and (without
148 installing the OS) will use them as-is for the
149 instance. This allows migrating instances from non-managed
150 mode (e.q. plain KVM with LVM) to being managed via
151 Ganeti. Note that this works only for the `plain' disk
152 template (see below for template details).
156 Alternatively, a single-disk instance can be created via the
157 <option>-s</option> option which takes a single argument,
158 the size of the disk. This is similar to the Ganeti 1.2
159 version (but will only create one disk).
163 The minimum disk specification is therefore
164 <userinput>--disk 0:size=20G</userinput> (or <userinput>-s
165 20G</userinput> when using the <option>-s</option> option),
166 and a three-disk instance can be specified as
167 <userinput>--disk 0:size=20G --disk 1:size=4G --disk
168 2:size=100G</userinput>.
172 The <option>--no-ip-check</option> skips the checks that are
173 done to see if the instance's IP is not already alive
174 (i.e. reachable from the master node).
178 The <option>--no-name-check</option> skips the check for the
179 instance name via the resolver (e.g. in DNS or /etc/hosts,
180 depending on your setup). Since the name check is used to
181 compute the IP address, if you pass this option you must
182 also pass the <option>--no-ip-check</option> option.
186 If you don't wat the instance to automatically start after
187 creation, this is possible via the
188 <option>--no-start</option> option. This will leave the
189 instance down until a subsequent <command>gnt-instance
190 start</command> command.
194 The NICs of the instances can be specified via the
195 <option>--net</option> option. By default, one NIC is
196 created for the instance, with a random MAC, and set
197 up according the the cluster level nic parameters.
198 Each NIC can take these parameters (all optional):
203 <simpara>either a value or <constant>GENERATE</constant>
204 to generate a new unique MAC</simpara>
210 <simpara>specifies the IP address assigned to the
211 instance from the Ganeti side (this is not necessarily
212 what the instance will use, but what the node expects
213 the instance to use)</simpara>
219 <simpara>specifies the connection mode for this nic:
220 routed or bridged.</simpara>
226 <simpara>in bridged mode specifies the bridge to attach
227 this NIC to, in routed mode it's intended to
228 differentiate between different routing tables/instance
229 groups (but the meaning is dependent on the network
230 script, see gnt-cluster(8) for more details)</simpara>
234 Of these "mode" and "link" are nic parameters, and inherit their
235 default at cluster level.
239 Alternatively, if no network is desired for the instance, you
240 can prevent the default of one NIC with the
241 <option>--no-nics</option> option.
245 The <option>-o</option> options specifies the operating
246 system to be installed. The available operating systems can
247 be listed with <command>gnt-os
248 list</command>. Passing <option>--no-install</option> will
249 however skip the OS installation, allowing a manual import
250 if so desired. Note that the no-installation mode will
251 automatically disable the start-up of the instance (without
252 an OS, it most likely won't be able to start-up
257 The <option>-B</option> option specifies the backend
258 parameters for the instance. If no such parameters are
259 specified, the values are inherited from the cluster. Possible
265 <simpara>the memory size of the instance; as usual,
266 suffixes can be used to denote the unit, otherwise the
267 value is taken in mebibites</simpara>
273 <simpara>the number of VCPUs to assign to the instance
274 (if this value makes sense for the hypervisor)</simpara>
278 <term>auto_balance</term>
280 <simpara>whether the instance is considered in the N+1
281 cluster checks (enough redundancy in the cluster to
282 survive a node failure)</simpara>
289 The <option>-H</option> option specified the hypervisor to
290 use for the instance (must be one of the enabled hypervisors
291 on the cluster) and optionally custom parameters for this
292 instance. If not other options are used (i.e. the invocation
293 is just <userinput>-H
294 <replaceable>NAME</replaceable></userinput>) the instance
295 will inherit the cluster options. The defaults below show
296 the cluster defaults at cluster creation time.
300 The possible hypervisor options are as follows:
303 <term>boot_order</term>
305 <simpara>Valid for the Xen HVM and KVM
306 hypervisors.</simpara>
308 <simpara>A string value denoting the boot order. This
309 has different meaning for the Xen HVM hypervisor and
310 for the KVM one.</simpara>
313 For Xen HVM, The boot order is a string of letters
314 listing the boot devices, with valid device letters
352 The default is not to set an HVM boot order which is
357 For KVM the boot order is either
358 <quote>cdrom</quote>, <quote>disk</quote> or
359 <quote>network</quote>. Please note that older
360 versions of KVM couldn't netboot from virtio
361 interfaces. This has been fixed in more recent
362 versions and is confirmed to work at least with
369 <term>cdrom_image_path</term>
371 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
373 <simpara>The path to a CDROM image to attach to the
379 <term>nic_type</term>
381 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
384 This parameter determines the way the network cards
385 are presented to the instance. The possible options are:
387 <member>rtl8139 (default for Xen HVM) (HVM & KVM)</member>
388 <member>ne2k_isa (HVM & KVM)</member>
389 <member>ne2k_pci (HVM & KVM)</member>
390 <member>i82551 (KVM)</member>
391 <member>i82557b (KVM)</member>
392 <member>i82559er (KVM)</member>
393 <member>pcnet (KVM)</member>
394 <member>e1000 (KVM)</member>
395 <member>paravirtual (default for KVM) (HVM & KVM)</member>
401 <term>disk_type</term>
403 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
406 This parameter determines the way the disks are
407 presented to the instance. The possible options are:
409 <member>ioemu (default for HVM & KVM) (HVM & KVM)</member>
410 <member>ide (HVM & KVM)</member>
411 <member>scsi (KVM)</member>
412 <member>sd (KVM)</member>
413 <member>mtd (KVM)</member>
414 <member>pflash (KVM)</member>
420 <term>vnc_bind_address</term>
422 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
424 <para>Specifies the address that the VNC listener for
425 this instance should bind to. Valid values are IPv4
426 addresses. Use the address 0.0.0.0 to bind to all
427 available interfaces (this is the default) or specify
428 the address of one of the interfaces on the node to
429 restrict listening to that interface.</para>
436 <simpara>Valid for the KVM hypervisor.</simpara>
438 <simpara>A boolean option that controls whether the
439 VNC connection is secured with TLS.</simpara>
444 <term>vnc_x509_path</term>
446 <simpara>Valid for the KVM hypervisor.</simpara>
448 <para>If <option>vnc_tls</option> is enabled, this
449 options specifies the path to the x509 certificate to
455 <term>vnc_x509_verify</term>
457 <simpara>Valid for the KVM hypervisor.</simpara>
464 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
467 A boolean option that specifies if the hypervisor
468 should enable ACPI support for this instance. By
469 default, ACPI is disabled.
477 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
480 A boolean option that specifies if the hypervisor
481 should enabled PAE support for this instance. The
482 default is false, disabling PAE support.
488 <term>use_localtime</term>
490 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
493 A boolean option that specifies if the instance
494 should be started with its clock set to the
495 localtime of the machine (when true) or to the UTC
496 (When false). The default is false, which is useful
497 for Linux/Unix machines; for Windows OSes, it is
498 recommended to enable this parameter.
504 <term>kernel_path</term>
506 <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
509 This option specifies the path (on the node) to the
510 kernel to boot the instance with. Xen PVM instances
511 always require this, while for KVM if this option is
512 empty, it will cause the machine to load the kernel
519 <term>kernel_args</term>
521 <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
524 This options specifies extra arguments to the kernel
525 that will be loaded. device. This is always used
526 for Xen PVM, while for KVM it is only used if the
527 <option>kernel_path</option> option is also
532 The default setting for this value is simply
533 <constant>"ro"</constant>, which mounts the root
534 disk (initially) in read-only one. For example,
535 setting this to <userinput>single</userinput> will
536 cause the instance to start in single-user mode.
542 <term>initrd_path</term>
544 <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
547 This option specifies the path (on the node) to the
548 initrd to boot the instance with. Xen PVM instances
549 can use this always, while for KVM if this option is
550 only used if the <option>kernel_path</option> option
551 is also specified. You can pass here either an
552 absolute filename (the path to the initrd) if you
553 want to use an initrd, or use the format
554 <userinput>no_initrd_path</userinput> for no initrd.
560 <term>root_path</term>
562 <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
565 This options specifies the name of the root
566 device. This is always needed for Xen PVM, while for
567 KVM it is only used if the
568 <option>kernel_path</option> option is also
575 <term>serial_console</term>
577 <simpara>Valid for the KVM hypervisor.</simpara>
579 <simpara>This boolean option specifies whether to
580 emulate a serial console for the instance.</simpara>
585 <term>disk_cache</term>
587 <simpara>Valid for the KVM hypervisor.</simpara>
589 <simpara>The disk cache mode. It can be either
590 <userinput>default</userinput> to not pass any cache
591 option to KVM, or one of the KVM cache modes: none
592 (for direct I/O), writethrough (to use the host cache
593 but report completion to the guest only when the host
594 has commited the changes to disk) or writeback (to use
595 the host cache and report completion as soon as the
596 data is in the host cache). Note that there are
597 special considerations for the cache mode depending on
598 version of KVM used and disk type (always raw file
599 under Ganeti), please refer to the KVM documentation
606 <term>security_model</term>
608 <simpara>Valid for the KVM hypervisor.</simpara>
610 <simpara>The security model for kvm. Currently one of
611 <quote>none</quote>, <quote>user</quote> or
612 <quote>pool</quote>. Under <quote>none</quote>, the
613 default, nothing is done and instances are run as
614 the ganeti daemon user (normally root).
617 <simpara>Under <quote>user</quote> kvm will drop
618 privileges and become the user specified by the
619 security_domain parameter.
622 <simpara>Under <quote>pool</quote> a global cluster
623 pool of users will be used, making sure no two
624 instances share the same user on the same node.
625 (this mode is not implemented yet)
632 <term>security_domain</term>
634 <simpara>Valid for the KVM hypervisor.</simpara>
636 <simpara>Under security model <quote>user</quote> the username to
637 run the instance under. It must be a valid username
638 existing on the host.
640 <simpara>Cannot be set under security model <quote>none</quote>
641 or <quote>pool</quote>.
652 The <option>--iallocator</option> option specifies the instance
653 allocator plugin to use. If you pass in this option the allocator
654 will select nodes for this instance automatically, so you don't need
655 to pass them with the <option>-n</option> option. For more
656 information please refer to the instance allocator documentation.
660 The <option>-t</option> options specifies the disk layout type for
661 the instance. The available choices are:
664 <term>diskless</term>
667 This creates an instance with no disks. Its useful for
668 testing only (or other special cases).
675 <para>Disk devices will be regular files.</para>
681 <para>Disk devices will be logical volumes.</para>
688 Disk devices will be drbd (version 8.x) on top of
697 The optional second value of the <option>--node</option> is used for
698 the drbd template type and specifies the remote node.
702 If you do not want gnt-instance to wait for the disk mirror
703 to be synced, use the <option>--no-wait-for-sync</option>
708 The <option>--file-storage-dir</option> specifies the relative path
709 under the cluster-wide file storage directory to store file-based
710 disks. It is useful for having different subdirectories for
711 different instances. The full path of the directory where the disk
712 files are stored will consist of cluster-wide file storage directory
713 + optional subdirectory + instance name. Example:
714 /srv/ganeti/file-storage/mysubdir/instance1.example.com. This option
715 is only relevant for instances using the file storage backend.
719 The <option>--file-driver</option> specifies the driver to use for
720 file-based disks. Note that currently these drivers work with the
721 xen hypervisor only. This option is only relevant for instances using
722 the file storage backend. The available choices are:
728 Kernel loopback driver. This driver uses loopback
729 devices to access the filesystem within the
730 file. However, running I/O intensive applications in
731 your instance using the loop driver might result in
732 slowdowns. Furthermore, if you use the loopback
733 driver consider increasing the maximum amount of
734 loopback devices (on most systems it's 8) using the
742 <para>The blktap driver (for Xen hypervisors). In
743 order to be able to use the blktap driver you should
744 check if the 'blktapctrl' user space disk agent is
745 running (usually automatically started via xend). This
746 user-level disk I/O interface has the advantage of
747 better performance. Especially if you use a network
748 file system (e.g. NFS) to store your instances this is
749 the recommended choice.
757 The <option>--submit</option> option is used to send the job to
758 the master daemon but not wait for its completion. The job
759 ID will be shown so that it can be examined via
760 <command>gnt-job info</command>.
766 # gnt-instance add -t file --disk 0:size=30g -B memory=512 -o debian-etch \
767 -n node1.example.com --file-storage-dir=mysubdir instance1.example.com
768 # gnt-instance add -t plain --disk 0:size=30g -B memory=512 -o debian-etch \
769 -n node1.example.com instance1.example.com
770 # gnt-instance add -t drbd --disk 0:size=30g -B memory=512 -o debian-etch \
771 -n node1.example.com:node2.example.com instance2.example.com
777 <title>BATCH-CREATE</title>
779 <command>batch-create</command>
780 <arg choice="req">instances_file.json</arg>
784 This command (similar to the Ganeti 1.2
785 <command>batcher</command> tool) submits multiple instance
786 creation jobs based on a definition file. The instance
787 configurations do not encompass all the possible options for
788 the <command>add</command> command, but only a subset.
792 The instance file should be a valid-formed JSON file,
793 containing a dictionary with instance name and instance
794 parameters. The accepted parameters are:
798 <term>disk_size</term>
800 <simpara>The size of the disks of the instance.</simpara>
804 <term>disk_templace</term>
806 <simpara>The disk template to use for the instance,
807 the same as in the <command>add</command>
814 <simpara>A dictionary of backend parameters.</simpara>
818 <term>hypervisor</term>
820 <simpara>A dictionary with a single key (the
821 hypervisor name), and as value the hypervisor
822 options. If not passed, the default hypervisor and
823 hypervisor options will be inherited.</simpara>
827 <term>mac, ip, mode, link</term>
829 <simpara>Specifications for the one NIC that will be
830 created for the instance. 'bridge' is also accepted
831 as a backwards compatibile key.</simpara>
837 <simpara>List of nics that will be created for the
838 instance. Each entry should be a dict, with mac, ip, mode
839 and link as possible keys. Please don't provide the "mac,
840 ip, mode, link" parent keys if you use this method for
841 specifying nics.</simpara>
845 <term>primary_node, secondary_node</term>
847 <simpara>The primary and optionally the secondary node
848 to use for the instance (in case an iallocator script
849 is not used).</simpara>
853 <term>iallocator</term>
855 <simpara>Instead of specifying the nodes, an
856 iallocator script can be used to automatically compute
863 <simpara>whether to start the instance</simpara>
867 <term>ip_check</term>
869 <simpara>Skip the check for already-in-use instance;
870 see the description in the <command>add</command>
871 command for details.</simpara>
875 <term>name_check</term>
877 <simpara>Skip the name check for instances;
878 see the description in the <command>add</command>
879 command for details.</simpara>
883 <term>file_storage_dir, file_driver</term>
885 <simpara>Configuration for the <literal>file</literal>
886 disk type, see the <command>add</command> command for
894 A simple definition for one instance can be (with most of
895 the parameters taken from the cluster defaults):
901 "disk_size": ["25G"],
907 "disk_size": ["25G"],
908 "iallocator": "dumb",
909 "hypervisor": "xen-hvm",
910 "hvparams": {"acpi": true},
911 "backend": {"memory": 512}
918 The command will display the job id for each submitted instance, as follows:
920 # gnt-instance batch-create instances.json
929 <title>REMOVE</title>
932 <command>remove</command>
933 <arg>--ignore-failures</arg>
934 <arg>--shutdown-timeout=<replaceable>N</replaceable></arg>
936 <arg choice="req"><replaceable>instance</replaceable></arg>
940 Remove an instance. This will remove all data from the
941 instance and there is <emphasis>no way back</emphasis>. If
942 you are not sure if you use an instance again, use
943 <command>shutdown</command> first and leave it in the
944 shutdown state for a while.
949 The <option>--ignore-failures</option> option will cause the
950 removal to proceed even in the presence of errors during the
951 removal of the instance (e.g. during the shutdown or the
952 disk removal). If this option is not given, the command will
953 stop at the first error.
957 The <option>--shutdown-timeout</option> is used to specify how
958 much time to wait before forcing the shutdown (xm destroy in xen,
959 killing the kvm process, for kvm). By default two minutes are
960 given to each instance to stop.
964 The <option>--submit</option> option is used to send the job to
965 the master daemon but not wait for its completion. The job
966 ID will be shown so that it can be examined via
967 <command>gnt-job info</command>.
973 # gnt-instance remove instance1.example.com
982 <command>list</command>
983 <arg>--no-headers</arg>
984 <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
985 <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
986 <arg rep="repeat">instance</arg>
990 Shows the currently configured instances with memory usage,
991 disk usage, the node they are running on, and their run
996 The <option>--no-headers</option> option will skip the
997 initial header line. The <option>--separator</option> option
998 takes an argument which denotes what will be used between
999 the output fields. Both these options are to help scripting.
1003 The <option>-o</option> option takes a comma-separated list
1004 of output fields. The available fields and their meaning
1010 <simpara>the instance name</simpara>
1016 <simpara>the OS of the instance</simpara>
1022 <simpara>the primary node of the instance</simpara>
1028 <simpara>comma-separated list of secondary nodes for the
1029 instance; usually this will be just one node</simpara>
1033 <term>admin_state</term>
1035 <simpara>the desired state of the instance (either "yes"
1036 or "no" denoting the instance should run or
1041 <term>disk_template</term>
1043 <simpara>the disk template of the instance</simpara>
1047 <term>oper_state</term>
1049 <simpara>the actual state of the instance; can be
1050 one of the values "running", "stopped", "(node
1057 <simpara>combined form of admin_state and oper_stat;
1059 <computeroutput>ERROR_nodedown</computeroutput> if the
1060 node of the instance is down,
1061 <computeroutput>ERROR_down</computeroutput> if the
1062 instance should run but is down,
1063 <computeroutput>ERROR_up</computeroutput> if the
1064 instance should be stopped but is actually running,
1065 <computeroutput>ADMIN_down</computeroutput> if the
1066 instance has been stopped (and is stopped) and
1067 <computeroutput>running</computeroutput> if the
1068 instance is set to be running (and is
1073 <term>oper_ram</term>
1075 <simpara>the actual memory usage of the instance as seen
1076 by the hypervisor</simpara>
1082 <simpara>the ip address ganeti recognizes as associated with
1083 the first instance interface</simpara>
1089 <simpara>the first instance interface MAC address</simpara>
1094 <term>nic_mode</term>
1096 <simpara>the mode of the first instance NIC
1097 (routed or bridged)</simpara>
1101 <term>nic_link</term>
1103 <simpara>the link of the first instance NIC
1108 <term>sda_size</term>
1110 <simpara>the size of the instance's first disk</simpara>
1114 <term>sdb_size</term>
1116 <simpara>the size of the instance's second disk, if
1123 <simpara>the number of VCPUs allocated to the
1130 <simpara>comma-separated list of the instances's
1135 <term>serial_no</term>
1137 <simpara>the so called 'serial number' of the
1138 instance; this is a numeric field that is incremented
1139 each time the instance is modified, and it can be used
1140 to track modifications</simpara>
1147 the creation time of the instance; note that this
1148 field contains spaces and as such it's harder to
1152 if this attribute is not present (e.g. when
1153 upgrading from older versions), then "N/A" will be
1162 the last modification time of the instance; note
1163 that this field contains spaces and as such it's
1167 if this attribute is not present (e.g. when
1168 upgrading from older versions), then "N/A" will be
1177 <simpara>Show the UUID of the instance (generated
1178 automatically by Ganeti)</simpara>
1183 <term>network_port</term>
1185 <simpara>If the instance has a network port assigned
1186 to it (e.g. for VNC connections), this will be shown,
1187 otherwise <literal>-</literal> will be
1188 displayed.</simpara>
1192 <term>beparams</term>
1194 <simpara>A text format of the entire beparams for the
1195 instance. It's more useful to select individual fields
1196 from this dictionary, see below.</simpara>
1200 <term>disk.count</term>
1202 <simpara>The number of instance disks.</simpara>
1206 <term>disk.size/N</term>
1208 <simpara>The size of the instance's Nth disk. This is
1209 a more generic form of the <literal>sda_size</literal>
1210 and <literal>sdb_size</literal> fields.</simpara>
1214 <term>disk.sizes</term>
1216 <simpara>A comma-separated list of the disk sizes for
1217 this instance.</simpara>
1221 <term>disk_usage</term>
1223 <simpara>The total disk space used by this instance on
1224 each of its nodes. This is not the instance-visible
1225 disk size, but the actual disk "cost" of the
1230 <term>nic.mac/N</term>
1232 <simpara>The MAC of the Nth instance NIC.</simpara>
1236 <term>nic.ip/N</term>
1238 <simpara>The IP address of the Nth instance NIC.</simpara>
1242 <term>nic.mode/N</term>
1244 <simpara>The mode of the Nth instance NIC</simpara>
1248 <term>nic.link/N</term>
1250 <simpara>The link of the Nth instance NIC</simpara>
1254 <term>nic.macs</term>
1256 <simpara>A comma-separated list of all the MACs of the
1257 instance's NICs.</simpara>
1261 <term>nic.ips</term>
1263 <simpara>A comma-separated list of all the IP
1264 addresses of the instance's NICs.</simpara>
1268 <term>nic.modes</term>
1270 <simpara>A comma-separated list of all the modes of the
1271 instance's NICs.</simpara>
1275 <term>nic.links</term>
1277 <simpara>A comma-separated list of all the link parameters
1278 of the instance's NICs.</simpara>
1282 <term>nic.count</term>
1284 <simpara>The number of instance nics.</simpara>
1288 <term>hv/<replaceable>NAME</replaceable></term>
1290 <simpara>The value of the hypervisor parameter called
1291 <replaceable>NAME</replaceable>. For details of what
1292 hypervisor parameters exist and their meaning, see the
1293 <command>add</command> command.</simpara>
1297 <term>be/memory</term>
1299 <simpara>The configured memory for the instance.</simpara>
1303 <term>be/vcpus</term>
1305 <simpara>The configured number of VCPUs for the
1310 <term>be/auto_balance</term>
1312 <simpara>Whether the instance is considered in N+1
1320 If the value of the option starts with the character
1321 <constant>+</constant>, the new field(s) will be added to the
1322 default list. This allows to quickly see the default list
1323 plus a few other fields, instead of retyping the entire list
1328 There is a subtle grouping about the available output
1329 fields: all fields except for <option>oper_state</option>,
1330 <option>oper_ram</option> and <option>status</option> are
1331 configuration value and not run-time values. So if you don't
1332 select any of the these fields, the query will be satisfied
1333 instantly from the cluster configuration, without having to
1334 ask the remote nodes for the data. This can be helpful for
1335 big clusters when you only want some data and it makes sense
1336 to specify a reduced set of output fields.
1339 <para>The default output field list is:
1340 <simplelist type="inline">
1341 <member>name</member>
1343 <member>pnode</member>
1344 <member>admin_state</member>
1345 <member>oper_state</member>
1346 <member>oper_ram</member>
1355 <command>info</command>
1360 <group choice="req">
1362 <arg rep="repeat"><replaceable>instance</replaceable></arg>
1367 Show detailed information about the given instance(s). This is
1368 different from <command>list</command> as it shows detailed data
1369 about the instance's disks (especially useful for the drbd disk
1374 If the option <option>-s</option> is used, only information
1375 available in the configuration file is returned, without
1376 querying nodes, making the operation faster.
1380 Use the <option>--all</option> to get info about all instances,
1381 rather than explicitly passing the ones you're interested in.
1386 <title>MODIFY</title>
1389 <command>modify</command>
1391 <arg choice="opt">-H <replaceable>HYPERVISOR_PARAMETERS</replaceable></arg>
1393 <arg choice="opt">-B <replaceable>BACKEND_PARAMETERS</replaceable></arg>
1396 <arg>--net add<replaceable><optional>:options</optional></replaceable></arg>
1397 <arg>--net remove</arg>
1398 <arg>--net <replaceable>N:options</replaceable></arg>
1402 <arg>--disk add:size=<replaceable>SIZE</replaceable></arg>
1403 <arg>--disk remove</arg>
1404 <arg>--disk <replaceable>N</replaceable>:mode=<replaceable>MODE</replaceable></arg>
1408 <arg>-t<group choice="req">
1414 <arg>--os-name=<replaceable>OS</replaceable> <arg>--force-variant</arg></arg>
1419 <arg choice="req"><replaceable>instance</replaceable></arg>
1423 Modifies the memory size, number of vcpus, ip address, MAC
1424 address and/or nic parameters for an instance. It can also
1425 add and remove disks and NICs to/from the instance. Note
1426 that you need to give at least one of the arguments, otherwise
1427 the command complains.
1431 The <option>-H</option> option specifies hypervisor options
1432 in the form of <userinput>name=value[,...]</userinput>. For details which options can be specified, see the <command>add</command> command.
1436 The <option>-t</option> option will change the disk template
1437 of the instance. Currently only conversions between the
1438 plain and drbd disk templates are supported, and the
1439 instance must be stopped before attempting the conversion.
1444 add:size=<replaceable>SIZE</replaceable></option> option
1445 adds a disk to the instance. The <option>--disk
1446 remove</option> will remove the last disk of the
1447 instance. The <option>--disk
1448 <replaceable>N</replaceable>:mode=<replaceable>MODE</replaceable></option>
1449 option will change the mode of the Nth disk of the instance
1450 between read-only (<literal>ro</literal>) and read-write
1451 (<literal>rw</literal>).
1456 add:<replaceable>options</replaceable></option> option will
1457 add a new NIC to the instance. The available options are the
1458 same as in the <command>add</command> command (mac, ip, link,
1459 mode). The <option>--net remove</option> will remove the
1460 last NIC of the instance, while the <option>--net
1461 <replaceable>N</replaceable>:<replaceable>options</replaceable></option>
1462 option will change the parameters of the Nth instance NIC.
1466 The option <option>--os-name</option> will change the OS
1467 name for the instance (without reinstallation). In case an
1468 OS variant is specified that is not found, then by default
1469 the modification is refused,
1470 unless <option>--force-variant</option> is passed. An
1471 invalid OS will also be refused, unless
1472 the <option>--force</option> option is given.
1476 The <option>--submit</option> option is used to send the job to
1477 the master daemon but not wait for its completion. The job
1478 ID will be shown so that it can be examined via
1479 <command>gnt-job info</command>.
1483 All the changes take effect at the next restart. If the
1484 instance is running, there is no effect on the instance.
1489 <title>REINSTALL</title>
1492 <command>reinstall</command>
1493 <arg choice="opt">-o <replaceable>os-type</replaceable></arg>
1494 <arg>--select-os</arg>
1495 <arg choice="opt">-f <replaceable>force</replaceable></arg>
1496 <arg>--force-multiple</arg>
1498 <group choice="opt">
1499 <arg>--instance</arg>
1501 <arg>--primary</arg>
1502 <arg>--secondary</arg>
1506 <arg choice="opt" rep="repeat"><replaceable>instance</replaceable></arg>
1510 Reinstalls the operating system on the given instance(s). The
1511 instance(s) must be stopped when running this command. If the
1512 <option>--os-type</option> is specified, the operating
1517 The <option>--select-os</option> option switches to an
1518 interactive OS reinstall. The user is prompted to select the OS
1519 template from the list of available OS templates.
1523 Since this is a potentially dangerous command, the user will
1524 be required to confirm this action, unless the
1525 <option>-f</option> flag is passed. When multiple instances
1526 are selected (either by passing multiple arguments or by
1527 using the <option>--node</option>,
1528 <option>--primary</option>, <option>--secondary</option> or
1529 <option>--all</option> options), the user must pass both the
1530 <option>--force</option> and
1531 <option>--force-multiple</option> options to skip the
1532 interactive confirmation.
1536 The <option>--submit</option> option is used to send the job to
1537 the master daemon but not wait for its completion. The job
1538 ID will be shown so that it can be examined via
1539 <command>gnt-job info</command>.
1546 <title>RENAME</title>
1549 <command>rename</command>
1550 <arg>--no-ip-check</arg>
1552 <arg choice="req"><replaceable>instance</replaceable></arg>
1553 <arg choice="req"><replaceable>new_name</replaceable></arg>
1557 Renames the given instance. The instance must be stopped
1558 when running this command. The requirements for the new name
1559 are the same as for adding an instance: the new name must be
1560 resolvable and the IP it resolves to must not be reachable
1561 (in order to prevent duplicate IPs the next time the
1562 instance is started). The IP test can be skipped if the
1563 <option>--no-ip-check</option> option is passed.
1567 The <option>--submit</option> option is used to send the job to
1568 the master daemon but not wait for its completion. The job
1569 ID will be shown so that it can be examined via
1570 <command>gnt-job info</command>.
1578 <title>Starting/stopping/connecting to console</title>
1581 <title>STARTUP</title>
1584 <command>startup</command>
1588 <arg>--force-multiple</arg>
1590 <group choice="opt">
1591 <arg>--instance</arg>
1593 <arg>--primary</arg>
1594 <arg>--secondary</arg>
1597 <arg>--node-tags</arg>
1598 <arg>--pri-node-tags</arg>
1599 <arg>--sec-node-tags</arg>
1602 <arg>-H <option>key=value...</option></arg>
1603 <arg>-B <option>key=value...</option></arg>
1608 rep="repeat"><replaceable>name</replaceable></arg>
1612 Starts one or more instances, depending on the following
1613 options. The four available modes are:
1616 <term><option>--instance</option></term>
1618 <simpara>will start the instances given as arguments
1619 (at least one argument required); this is the default
1626 <simpara>will start the instances who have the given
1627 node as either primary or secondary</simpara>
1631 <term><option>--primary</option></term>
1633 <simpara>will start all instances whose primary node
1634 is in the list of nodes passed as arguments (at least
1635 one node required)</simpara>
1639 <term><option>--secondary</option></term>
1641 <simpara>will start all instances whose secondary node
1642 is in the list of nodes passed as arguments (at least
1643 one node required)</simpara>
1649 <simpara>will start all instances in the cluster (no
1650 arguments accepted)</simpara>
1656 <simpara>will start all instances in the cluster with
1657 the tags given as arguments</simpara>
1661 <term>--node-tags</term>
1663 <simpara>will start all instances in the cluster on
1664 nodes with the tags given as arguments</simpara>
1668 <term>--pri-node-tags</term>
1670 <simpara>will start all instances in the cluster on
1671 primary nodes with the tags given as
1676 <term>--sec-node-tags</term>
1678 <simpara>will start all instances in the cluster on
1679 secondary nodes with the tags given as
1687 Note that although you can pass more than one selection
1688 option, the last one wins, so in order to guarantee the
1689 desired result, don't pass more than one such option.
1693 Use <option>--force</option> to start even if secondary disks are
1698 The <option>--force-multiple</option> will skip the
1699 interactive confirmation in the case the more than one
1700 instance will be affected.
1704 The <option>-H</option> and <option>-B</option> options
1705 specify temporary hypervisor and backend parameters that can
1706 be used to start an instance with modified parameters. They
1707 can be useful for quick testing without having to modify an
1708 instance back and forth, e.g.:
1710 # gnt-instance start -H root_args="single" instance1
1711 # gnt-instance start -B memory=2048 instance2
1713 The first form will start the instance
1714 <userinput>instance1</userinput> in single-user mode, and
1715 the instance <userinput>instance2</userinput> with 2GB of
1716 RAM (this time only, unless that is the actual instance
1717 memory size already). Note that the values override the
1718 instance parameters (and not extend them): an instance with
1719 "root_args=ro" when started with <userinput>-H
1720 root_args=single</userinput> will result in "single", not
1725 The <option>--submit</option> option is used to send the job to
1726 the master daemon but not wait for its completion. The job
1727 ID will be shown so that it can be examined via
1728 <command>gnt-job info</command>.
1734 # gnt-instance start instance1.example.com
1735 # gnt-instance start --node node1.example.com node2.example.com
1736 # gnt-instance start --all
1742 <title>SHUTDOWN</title>
1745 <command>shutdown</command>
1747 <arg>--timeout=<replaceable>N</replaceable></arg>
1749 <arg>--force-multiple</arg>
1751 <group choice="opt">
1752 <arg>--instance</arg>
1754 <arg>--primary</arg>
1755 <arg>--secondary</arg>
1758 <arg>--node-tags</arg>
1759 <arg>--pri-node-tags</arg>
1760 <arg>--sec-node-tags</arg>
1766 rep="repeat"><replaceable>name</replaceable></arg>
1770 Stops one or more instances. If the instance cannot be
1771 cleanly stopped during a hardcoded interval (currently 2
1772 minutes), it will forcibly stop the instance (equivalent to
1773 switching off the power on a physical machine).
1777 The <option>--timeout</option> is used to specify how much time to
1778 wait before forcing the shutdown (xm destroy in xen, killing the kvm
1779 process, for kvm). By default two minutes are given to each instance
1784 The <option>--instance</option>, <option>--node</option>,
1785 <option>--primary</option>, <option>--secondary</option>,
1786 <option>--all</option>, <option>--tags</option>,
1787 <option>--node-tags</option>, <option>--pri-node-tags</option> and
1788 <option>--sec-node-tags</option> options are similar as for the
1789 <command>startup</command> command and they influence the
1790 actual instances being shutdown.
1794 The <option>--submit</option> option is used to send the job to
1795 the master daemon but not wait for its completion. The job
1796 ID will be shown so that it can be examined via
1797 <command>gnt-job info</command>.
1804 # gnt-instance shutdown instance1.example.com
1805 # gnt-instance shutdown --all
1811 <title>REBOOT</title>
1814 <command>reboot</command>
1816 <arg>--type=<replaceable>REBOOT-TYPE</replaceable></arg>
1818 <arg>--ignore-secondaries</arg>
1820 <arg>--shutdown-timeout=<replaceable>N</replaceable></arg>
1822 <arg>--force-multiple</arg>
1824 <group choice="opt">
1825 <arg>--instance</arg>
1827 <arg>--primary</arg>
1828 <arg>--secondary</arg>
1831 <arg>--node-tags</arg>
1832 <arg>--pri-node-tags</arg>
1833 <arg>--sec-node-tags</arg>
1839 rep="repeat"><replaceable>name</replaceable></arg>
1843 Reboots one or more instances. The type of reboot depends on
1844 the value of <option>--type</option>. A soft reboot does a
1845 hypervisor reboot, a hard reboot does a instance stop,
1846 recreates the hypervisor config for the instance and
1847 starts the instance. A full reboot does the equivalent
1848 of <command>gnt-instance shutdown && gnt-instance
1849 startup</command>. The default is hard reboot.
1853 For the hard reboot the option
1854 <option>--ignore-secondaries</option> ignores errors for the
1855 secondary node while re-assembling the instance disks.
1859 The <option>--instance</option>, <option>--node</option>,
1860 <option>--primary</option>, <option>--secondary</option>,
1861 <option>--all</option>, <option>--tags</option>,
1862 <option>--node-tags</option>, <option>--pri-node-tags</option> and
1863 <option>--sec-node-tags</option> options are similar as for the
1864 <command>startup</command> command and they influence the
1865 actual instances being rebooted.
1869 The <option>--shutdown-timeout</option> is used to specify how
1870 much time to wait before forcing the shutdown (xm destroy in xen,
1871 killing the kvm process, for kvm). By default two minutes are
1872 given to each instance to stop.
1876 The <option>--force-multiple</option> will skip the
1877 interactive confirmation in the case the more than one
1878 instance will be affected.
1884 # gnt-instance reboot instance1.example.com
1885 # gnt-instance reboot --type=full instance1.example.com
1891 <title>CONSOLE</title>
1893 <command>console</command>
1894 <arg choice="opt">--show-cmd</arg>
1895 <arg choice="req"><replaceable>instance</replaceable></arg>
1899 Connects to the console of the given instance. If the
1900 instance is not up, an error is returned. Use the
1901 <option>--show-cmd</option> option to display the command
1902 instead of executing it.
1906 For HVM instances, this will attempt to connect to the
1907 serial console of the instance. To connect to the
1908 virtualized "physical" console of a HVM instance, use a VNC
1909 client with the connection info from the
1910 <command>info</command> command.
1916 # gnt-instance console instance1.example.com
1924 <title>Disk management</title>
1927 <title>REPLACE-DISKS</title>
1930 <command>replace-disks</command>
1932 <arg>--early-release</arg>
1933 <arg choice="req">-p</arg>
1934 <arg>--disks <replaceable>idx</replaceable></arg>
1935 <arg choice="req"><replaceable>instance</replaceable></arg>
1939 <command>replace-disks</command>
1941 <arg>--early-release</arg>
1942 <arg choice="req">-s</arg>
1943 <arg>--disks <replaceable>idx</replaceable></arg>
1944 <arg choice="req"><replaceable>instance</replaceable></arg>
1948 <command>replace-disks</command>
1950 <arg>--early-release</arg>
1951 <group choice="req">
1952 <arg>--iallocator <replaceable>name</replaceable></arg>
1953 <arg>--new-secondary <replaceable>NODE</replaceable></arg>
1956 <arg choice="req"><replaceable>instance</replaceable></arg>
1960 <command>replace-disks</command>
1962 <arg>--early-release</arg>
1963 <arg choice="req">--auto</arg>
1964 <arg choice="req"><replaceable>instance</replaceable></arg>
1968 This command is a generalized form for replacing disks. It
1969 is currently only valid for the mirrored (DRBD) disk
1974 The first form (when passing the <option>-p</option> option)
1975 will replace the disks on the primary, while the second form
1976 (when passing the <option>-s</option> option will replace
1977 the disks on the secondary node. For these two cases (as the
1978 node doesn't change), it is possible to only run the replace
1979 for a subset of the disks, using the option
1980 <option>--disks</option> which takes a list of
1981 comma-delimited disk indices (zero-based),
1982 e.g. <userinput>0,2</userinput> to replace only the first
1987 The third form (when passing either the
1988 <option>--iallocator</option> or the
1989 <option>--new-secondary</option> option) is designed to
1990 change secondary node of the instance. Specifying
1991 <option>--iallocator</option> makes the new secondary be
1992 selected automatically by the specified allocator plugin,
1993 otherwise the new secondary node will be the one chosen
1994 manually via the <option>--new-secondary</option> option.
1998 The fourth form (when using <option>--auto</option>) will
1999 automatically determine which disks of an instance are faulty and
2000 replace them within the same node. The <option>--auto</option>
2001 option works only when an instance has only faulty disks on
2002 either the primary or secondary node; it doesn't work when
2003 both sides have faulty disks.
2007 The <option>--submit</option> option is used to send the job to
2008 the master daemon but not wait for its completion. The job
2009 ID will be shown so that it can be examined via
2010 <command>gnt-job info</command>.
2014 The <option>--early-release</option> changes the code so
2015 that the old storage on secondary node(s) is removed early
2016 (before the resync is completed) and the internal Ganeti
2017 locks for the current (and new, if any) secondary node are
2018 also released, thus allowing more parallelism in the cluster
2019 operation. This should be used only when recovering from a
2020 disk failure on the current secondary (thus the old storage
2021 is already broken) or when the storage on the primary node
2022 is known to be fine (thus we won't need the old storage for
2023 potential recovery).
2027 Note that it is not possible to select an offline or drained
2028 node as a new secondary.
2034 <title>ACTIVATE-DISKS</title>
2037 <command>activate-disks</command>
2039 <arg>--ignore-size</arg>
2040 <arg choice="req"><replaceable>instance</replaceable></arg>
2043 Activates the block devices of the given instance. If
2044 successful, the command will show the location and name of
2047 node1.example.com:disk/0:/dev/drbd0
2048 node1.example.com:disk/1:/dev/drbd1
2051 In this example, <emphasis>node1.example.com</emphasis> is
2052 the name of the node on which the devices have been
2053 activated. The <emphasis>disk/0</emphasis> and
2054 <emphasis>disk/1</emphasis> are the Ganeti-names of the
2055 instance disks; how they are visible inside the instance is
2056 hypervisor-specific. <emphasis>/dev/drbd0</emphasis> and
2057 <emphasis>/dev/drbd1</emphasis> are the actual block devices
2058 as visible on the node.
2062 The <option>--submit</option> option is used to send the job to
2063 the master daemon but not wait for its completion. The job
2064 ID will be shown so that it can be examined via
2065 <command>gnt-job info</command>.
2069 The <option>--ignore-size</option> option can be used to
2070 activate disks ignoring the currently configured size in
2071 Ganeti. This can be used in cases where the configuration
2072 has gotten out of sync with the real-world (e.g. after a
2073 partially-failed grow-disk operation or due to rounding in
2074 LVM devices). This should not be used in normal cases, but
2075 only when activate-disks fails without it.
2079 Note that it is safe to run this command while the instance
2085 <title>DEACTIVATE-DISKS</title>
2088 <command>deactivate-disks</command>
2090 <arg choice="req"><replaceable>instance</replaceable></arg>
2093 De-activates the block devices of the given instance. Note
2094 that if you run this command for an instance with a drbd
2095 disk template, while it is running, it will not be able to
2096 shutdown the block devices on the primary node, but it will
2097 shutdown the block devices on the secondary nodes, thus
2098 breaking the replication.
2102 The <option>--submit</option> option is used to send the job to
2103 the master daemon but not wait for its completion. The job
2104 ID will be shown so that it can be examined via
2105 <command>gnt-job info</command>.
2111 <title>GROW-DISK</title>
2113 <command>grow-disk</command>
2114 <arg>--no-wait-for-sync</arg>
2116 <arg choice="req"><replaceable>instance</replaceable></arg>
2117 <arg choice="req"><replaceable>disk</replaceable></arg>
2118 <arg choice="req"><replaceable>amount</replaceable></arg>
2122 Grows an instance's disk. This is only possible for
2123 instances having a <literal>plain</literal> or
2124 <literal>drbd</literal> disk template.
2128 Note that this command only change the block device size; it
2129 will not grow the actual filesystems, partitions, etc. that
2130 live on that disk. Usually, you will need to:
2133 <simpara>use <command>gnt-instance grow-disk</command></simpara>
2136 <simpara>reboot the instance (later, at a convenient
2140 <simpara>use a filesystem resizer, such as
2141 <citerefentry> <refentrytitle>ext2online</refentrytitle>
2142 <manvolnum>8</manvolnum> </citerefentry> or
2143 <citerefentry> <refentrytitle>xfs_growfs</refentrytitle>
2144 <manvolnum>8</manvolnum> </citerefentry> to resize the
2145 filesystem, or use <citerefentry>
2146 <refentrytitle>fdisk</refentrytitle>
2147 <manvolnum>8</manvolnum> </citerefentry> to change the
2148 partition table on the disk
2156 The <replaceable>disk</replaceable> argument is the index of
2157 the instance disk to grow. The
2158 <replaceable>amount</replaceable> argument is given either
2159 as a number (and it represents the amount to increase the
2160 disk with in mebibytes) or can be given similar to the
2161 arguments in the create instance operation, with a suffix
2166 Note that the disk grow operation might complete on one node
2167 but fail on the other; this will leave the instance with
2168 different-sized LVs on the two nodes, but this will not
2169 create problems (except for unused space).
2173 If you do not want gnt-instance to wait for the new disk
2174 region to be synced, use the
2175 <option>--no-wait-for-sync</option> option.
2179 The <option>--submit</option> option is used to send the job to
2180 the master daemon but not wait for its completion. The job
2181 ID will be shown so that it can be examined via
2182 <command>gnt-job info</command>.
2186 <para>Example (increase the first disk for instance1 by 16GiB):
2188 # gnt-instance grow-disk instance1.example.com 0 16g
2193 Also note that disk shrinking is not supported; use
2194 <command>gnt-backup export</command> and then
2195 <command>gnt-backup import</command> to reduce the disk size
2201 <title>RECREATE-DISKS</title>
2204 <command>recreate-disks</command>
2206 <arg>--disks=<option>indices</option></arg>
2207 <arg choice="req"><replaceable>instance</replaceable></arg>
2210 Recreates the disks of the given instance, or only a subset
2211 of the disks (if the option <option>disks</option> is
2212 passed, which must be a comma-separated list of disk
2213 indices, starting from zero).
2217 Note that this functionality should only be used for missing
2218 disks; if any of the given disks already exists, the
2219 operation will fail. While this is suboptimal,
2220 recreate-disks should hopefully not be needed in normal
2221 operation and as such the impact of this is low.
2225 The <option>--submit</option> option is used to send the job to
2226 the master daemon but not wait for its completion. The job
2227 ID will be shown so that it can be examined via
2228 <command>gnt-job info</command>.
2236 <title>Recovery</title>
2239 <title>FAILOVER</title>
2242 <command>failover</command>
2244 <arg>--ignore-consistency</arg>
2245 <arg>--shutdown-timeout=<replaceable>N</replaceable></arg>
2247 <arg choice="req"><replaceable>instance</replaceable></arg>
2251 Failover will fail the instance over its secondary
2252 node. This works only for instances having a drbd disk
2257 Normally the failover will check the consistency of the
2258 disks before failing over the instance. If you are trying to
2259 migrate instances off a dead node, this will fail. Use the
2260 <option>--ignore-consistency</option> option for this
2261 purpose. Note that this option can be dangerous as errors in
2262 shutting down the instance will be ignored, resulting in
2263 possibly having the instance running on two machines in
2264 parallel (on disconnected DRBD drives).
2268 The <option>--shutdown-timeout</option> is used to specify how
2269 much time to wait before forcing the shutdown (xm destroy in xen,
2270 killing the kvm process, for kvm). By default two minutes are
2271 given to each instance to stop.
2275 The <option>--submit</option> option is used to send the job to
2276 the master daemon but not wait for its completion. The job
2277 ID will be shown so that it can be examined via
2278 <command>gnt-job info</command>.
2284 # gnt-instance failover instance1.example.com
2290 <title>MIGRATE</title>
2293 <command>migrate</command>
2295 <arg choice="req">--cleanup</arg>
2296 <arg choice="req"><replaceable>instance</replaceable></arg>
2300 <command>migrate</command>
2302 <arg>--non-live</arg>
2303 <arg choice="req"><replaceable>instance</replaceable></arg>
2307 Migrate will move the instance to its secondary node without
2308 shutdown. It only works for instances having the drbd8 disk
2313 The migration command needs a perfectly healthy instance, as
2314 we rely on the dual-master capability of drbd8 and the disks
2315 of the instance are not allowed to be degraded.
2319 The <option>--non-live</option> option will switch (for the
2320 hypervisors that support it) between a "fully live"
2321 (i.e. the interruption is as minimal as possible) migration
2322 and one in which the instance is frozen, its state saved and
2323 transported to the remote node, and then resumed there. This
2324 all depends on the hypervisor support for two different
2325 methods. In any case, it is not an error to pass this
2326 parameter (it will just be ignored if the hypervisor doesn't
2331 If the <option>--cleanup</option> option is passed, the
2332 operation changes from migration to attempting recovery from
2333 a failed previous migration. In this mode, ganeti checks if
2334 the instance runs on the correct node (and updates its
2335 configuration if not) and ensures the instances's disks are
2336 configured correctly. In this mode, the
2337 <option>--non-live</option> option is ignored.
2341 The option <option>-f</option> will skip the prompting for
2345 Example (and expected output):
2347 # gnt-instance migrate instance1
2348 Migrate will happen to the instance instance1. Note that migration is
2349 **experimental** in this version. This might impact the instance if
2350 anything goes wrong. Continue?
2352 * checking disk consistency between source and target
2353 * ensuring the target is in secondary mode
2354 * changing disks into dual-master mode
2355 - INFO: Waiting for instance instance1 to sync disks.
2356 - INFO: Instance instance1's disks are in sync.
2357 * migrating instance to node2.example.com
2358 * changing the instance's disks on source node to secondary
2359 - INFO: Waiting for instance instance1 to sync disks.
2360 - INFO: Instance instance1's disks are in sync.
2361 * changing the instance's disks to single-master
2371 <command>move</command>
2373 <arg>-n <replaceable>node</replaceable></arg>
2374 <arg>--shutdown-timeout=<replaceable>N</replaceable></arg>
2376 <arg choice="req"><replaceable>instance</replaceable></arg>
2380 Move will move the instance to an arbitrary node in the
2381 cluster. This works only for instances having a plain or
2386 Note that since this operation is done via data copy, it
2387 will take a long time for big disks (similar to
2388 replace-disks for a drbd instance).
2392 The <option>--shutdown-timeout</option> is used to specify how
2393 much time to wait before forcing the shutdown (xm destroy in xen,
2394 killing the kvm process, for kvm). By default two minutes are
2395 given to each instance to stop.
2399 The <option>--submit</option> option is used to send the job to
2400 the master daemon but not wait for its completion. The job
2401 ID will be shown so that it can be examined via
2402 <command>gnt-job info</command>.
2408 # gnt-instance move -n node3.example.com instance1.example.com
2419 <title>ADD-TAGS</title>
2422 <command>add-tags</command>
2423 <arg choice="opt">--from <replaceable>file</replaceable></arg>
2424 <arg choice="req"><replaceable>instancename</replaceable></arg>
2426 rep="repeat"><replaceable>tag</replaceable></arg>
2430 Add tags to the given instance. If any of the tags contains
2431 invalid characters, the entire operation will abort.
2434 If the <option>--from</option> option is given, the list of
2435 tags will be extended with the contents of that file (each
2436 line becomes a tag). In this case, there is not need to pass
2437 tags on the command line (if you do, both sources will be
2438 used). A file name of - will be interpreted as stdin.
2443 <title>LIST-TAGS</title>
2446 <command>list-tags</command>
2447 <arg choice="req"><replaceable>instancename</replaceable></arg>
2450 <para>List the tags of the given instance.</para>
2454 <title>REMOVE-TAGS</title>
2456 <command>remove-tags</command>
2457 <arg choice="opt">--from <replaceable>file</replaceable></arg>
2458 <arg choice="req"><replaceable>instancename</replaceable></arg>
2460 rep="repeat"><replaceable>tag</replaceable></arg>
2464 Remove tags from the given instance. If any of the tags are
2465 not existing on the node, the entire operation will abort.
2469 If the <option>--from</option> option is given, the list of
2470 tags will be extended with the contents of that file (each
2471 line becomes a tag). In this case, there is not need to pass
2472 tags on the command line (if you do, both sources will be
2473 used). A file name of - will be interpreted as stdin.
2485 <!-- Keep this comment at the end of the file
2490 sgml-minimize-attributes:nil
2491 sgml-always-quote-attributes:t
2494 sgml-parent-document:nil
2495 sgml-default-dtd-file:nil
2496 sgml-exposed-tags:nil
2497 sgml-local-catalogs:nil
2498 sgml-local-ecat-files:nil