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>:size=<replaceable>VAL</replaceable><arg>,mode=<replaceable>ro|rw</replaceable></arg></arg>
79 <arg>-s <replaceable>SIZE</replaceable></arg>
82 <arg>--no-ip-check</arg>
83 <arg>--no-name-check</arg>
87 <arg rep="repeat">--net=<replaceable>N</replaceable><arg rep="repeat">:options</arg></arg>
91 <arg>-B <replaceable>BEPARAMS</replaceable></arg>
94 <arg>-H <replaceable>HYPERVISOR</replaceable><arg>:<arg choice="plain" rep="repeat">option=<replaceable>value</replaceable></arg></arg></arg>
97 <arg>--file-storage-dir <replaceable>dir_path</replaceable></arg>
98 <arg>--file-driver<group choice="req">
105 <arg>-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg>
106 <arg>--iallocator <replaceable>name</replaceable></arg>
110 <arg choice="req">-o <replaceable>os-type</replaceable></arg>
115 <arg choice="req"><replaceable>instance</replaceable></arg>
119 Creates a new instance on the specified host. The
120 <replaceable>instance</replaceable> argument must be in DNS,
121 but depending on the bridge/routing setup, need not be in
122 the same network as the nodes in the cluster.
126 The <option>disk</option> option specifies the parameters
127 for the disks of the instance. The numbering of disks starts
128 at zero, and at least one disk needs to be passed. For each
129 disk, at least the size needs to be given, and optionally
130 the access mode (read-only or the default of read-write) can
131 also be specified. The size is interpreted (when no unit is
132 given) in mebibytes. You can also use one of the suffixes
133 <literal>m</literal>, <literal>g</literal> or
134 <literal>t</literal> to specificy the exact the units used;
135 these suffixes map to mebibytes, gibibytes and tebibytes.
139 Alternatively, a single-disk instance can be created via the
140 <option>-s</option> option which takes a single argument,
141 the size of the disk. This is similar to the Ganeti 1.2
142 version (but will only create one disk).
146 The minimum disk specification is therefore
147 <userinput>--disk 0:size=20G</userinput> (or <userinput>-s
148 20G</userinput> when using the <option>-s</option> option),
149 and a three-disk instance can be specified as
150 <userinput>--disk 0:size=20G --disk 1:size=4G --disk
151 2:size=100G</userinput>.
155 The <option>--no-ip-check</option> skips the checks that are
156 done to see if the instance's IP is not already alive
157 (i.e. reachable from the master node).
161 The <option>--no-name-check</option> skips the check for the
162 instance name via the resolver (e.g. in DNS or /etc/hosts,
163 depending on your setup). Since the name check is used to
164 compute the IP address, if you pass this option you must
165 also pass the <option>--no-ip-check</option> option.
169 If you don't wat the instance to automatically start after
170 creation, this is possible via the
171 <option>--no-start</option> option. This will leave the
172 instance down until a subsequent <command>gnt-instance
173 start</command> command.
177 The NICs of the instances can be specified via the
178 <option>--net</option> option. By default, one NIC is
179 created for the instance, with a random MAC, and set
180 up according the the cluster level nic parameters.
181 Each NIC can take these parameters (all optional):
186 <simpara>either a value or <constant>GENERATE</constant>
187 to generate a new unique MAC</simpara>
193 <simpara>specifies the IP address assigned to the
194 instance from the Ganeti side (this is not necessarily
195 what the instance will use, but what the node expects
196 the instance to use)</simpara>
202 <simpara>specifies the connection mode for this nic:
203 routed or bridged.</simpara>
209 <simpara>in bridged mode specifies the bridge to attach
210 this NIC to, in routed mode it's intended to
211 differentiate between different routing tables/instance
212 groups (but the meaning is dependent on the network
213 script, see gnt-cluster(8) for more details)</simpara>
217 Of these "mode" and "link" are nic parameters, and inherit their
218 default at cluster level.
222 Alternatively, if no network is desired for the instance, you
223 can prevent the default of one NIC with the
224 <option>--no-nics</option> option.
228 The <option>-o</option> options specifies the operating
229 system to be installed. The available operating systems can
230 be listed with <command>gnt-os list</command>.
234 The <option>-B</option> option specifies the backend
235 parameters for the instance. If no such parameters are
236 specified, the values are inherited from the cluster. Possible
242 <simpara>the memory size of the instance; as usual,
243 suffixes can be used to denote the unit, otherwise the
244 value is taken in mebibites</simpara>
250 <simpara>the number of VCPUs to assign to the instance
251 (if this value makes sense for the hypervisor)</simpara>
255 <term>auto_balance</term>
257 <simpara>whether the instance is considered in the N+1
258 cluster checks (enough redundancy in the cluster to
259 survive a node failure)</simpara>
266 The <option>-H</option> option specified the hypervisor to
267 use for the instance (must be one of the enabled hypervisors
268 on the cluster) and optionally custom parameters for this
269 instance. If not other options are used (i.e. the invocation
270 is just <userinput>-H
271 <replaceable>NAME</replaceable></userinput>) the instance
272 will inherit the cluster options. The defaults below show
273 the cluster defaults at cluster creation time.
277 The possible hypervisor options are as follows:
280 <term>boot_order</term>
282 <simpara>Valid for the Xen HVM and KVM
283 hypervisors.</simpara>
285 <simpara>A string value denoting the boot order. This
286 has different meaning for the Xen HVM hypervisor and
287 for the KVM one.</simpara>
290 For Xen HVM, The boot order is a string of letters
291 listing the boot devices, with valid device letters
329 The default is not to set an HVM boot order which is
334 For KVM the boot order is either
335 <quote>cdrom</quote>, <quote>disk</quote> or
336 <quote>network</quote>. Please note that older
337 versions of KVM couldn't netboot from virtio
338 interfaces. This has been fixed in more recent
339 versions and is confirmed to work at least with
346 <term>cdrom_image_path</term>
348 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
350 <simpara>The path to a CDROM image to attach to the
356 <term>nic_type</term>
358 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
361 This parameter determines the way the network cards
362 are presented to the instance. The possible options are:
364 <member>rtl8139 (default for Xen HVM) (HVM & KVM)</member>
365 <member>ne2k_isa (HVM & KVM)</member>
366 <member>ne2k_pci (HVM & KVM)</member>
367 <member>i82551 (KVM)</member>
368 <member>i82557b (KVM)</member>
369 <member>i82559er (KVM)</member>
370 <member>pcnet (KVM)</member>
371 <member>e1000 (KVM)</member>
372 <member>paravirtual (default for KVM) (HVM & KVM)</member>
378 <term>disk_type</term>
380 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
383 This parameter determines the way the disks are
384 presented to the instance. The possible options are:
386 <member>ioemu (default for HVM & KVM) (HVM & KVM)</member>
387 <member>ide (HVM & KVM)</member>
388 <member>scsi (KVM)</member>
389 <member>sd (KVM)</member>
390 <member>mtd (KVM)</member>
391 <member>pflash (KVM)</member>
397 <term>vnc_bind_address</term>
399 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
401 <para>Specifies the address that the VNC listener for
402 this instance should bind to. Valid values are IPv4
403 addresses. Use the address 0.0.0.0 to bind to all
404 available interfaces (this is the default) or specify
405 the address of one of the interfaces on the node to
406 restrict listening to that interface.</para>
413 <simpara>Valid for the KVM hypervisor.</simpara>
415 <simpara>A boolean option that controls whether the
416 VNC connection is secured with TLS.</simpara>
421 <term>vnc_x509_path</term>
423 <simpara>Valid for the KVM hypervisor.</simpara>
425 <para>If <option>vnc_tls</option> is enabled, this
426 options specifies the path to the x509 certificate to
432 <term>vnc_x509_verify</term>
434 <simpara>Valid for the KVM hypervisor.</simpara>
441 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
444 A boolean option that specifies if the hypervisor
445 should enable ACPI support for this instance. By
446 default, ACPI is disabled.
454 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
457 A boolean option that specifies if the hypervisor
458 should enabled PAE support for this instance. The
459 default is false, disabling PAE support.
465 <term>use_localtime</term>
467 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
470 A boolean option that specifies if the instance
471 should be started with its clock set to the
472 localtime of the machine (when true) or to the UTC
473 (When false). The default is false, which is useful
474 for Linux/Unix machines; for Windows OSes, it is
475 recommended to enable this parameter.
481 <term>kernel_path</term>
483 <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
486 This option specifies the path (on the node) to the
487 kernel to boot the instance with. Xen PVM instances
488 always require this, while for KVM if this option is
489 empty, it will cause the machine to load the kernel
496 <term>kernel_args</term>
498 <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
501 This options specifies extra arguments to the kernel
502 that will be loaded. device. This is always used
503 for Xen PVM, while for KVM it is only used if the
504 <option>kernel_path</option> option is also
509 The default setting for this value is simply
510 <constant>"ro"</constant>, which mounts the root
511 disk (initially) in read-only one. For example,
512 setting this to <userinput>single</userinput> will
513 cause the instance to start in single-user mode.
519 <term>initrd_path</term>
521 <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
524 This option specifies the path (on the node) to the
525 initrd to boot the instance with. Xen PVM instances
526 can use this always, while for KVM if this option is
527 only used if the <option>kernel_path</option> option
528 is also specified. You can pass here either an
529 absolute filename (the path to the initrd) if you
530 want to use an initrd, or use the format
531 <userinput>no_initrd_path</userinput> for no initrd.
537 <term>root_path</term>
539 <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
542 This options specifies the name of the root
543 device. This is always needed for Xen PVM, while for
544 KVM it is only used if the
545 <option>kernel_path</option> option is also
552 <term>serial_console</term>
554 <simpara>Valid for the KVM hypervisor.</simpara>
556 <simpara>This boolean option specifies whether to
557 emulate a serial console for the instance.</simpara>
562 <term>disk_cache</term>
564 <simpara>Valid for the KVM hypervisor.</simpara>
566 <simpara>The disk cache mode. It can be either
567 <userinput>default</userinput> to not pass any cache
568 option to KVM, or one of the KVM cache modes: none
569 (for direct I/O), writethrough (to use the host cache
570 but report completion to the guest only when the host
571 has commited the changes to disk) or writeback (to use
572 the host cache and report completion as soon as the
573 data is in the host cache). Note that there are
574 special considerations for the cache mode depending on
575 version of KVM used and disk type (always raw file
576 under Ganeti), please refer to the KVM documentation
583 <term>security_model</term>
585 <simpara>Valid for the KVM hypervisor.</simpara>
587 <simpara>The security model for kvm. Currently one of
588 <quote>none</quote>, <quote>user</quote> or
589 <quote>pool</quote>. Under <quote>none</quote>, the
590 default, nothing is done and instances are run as
591 the ganeti daemon user (normally root).
594 <simpara>Under <quote>user</quote> kvm will drop
595 privileges and become the user specified by the
596 security_domain parameter.
599 <simpara>Under <quote>pool</quote> a global cluster
600 pool of users will be used, making sure no two
601 instances share the same user on the same node.
602 (this mode is not implemented yet)
609 <term>security_domain</term>
611 <simpara>Valid for the KVM hypervisor.</simpara>
613 <simpara>Under security model <quote>user</quote> the username to
614 run the instance under. It must be a valid username
615 existing on the host.
617 <simpara>Cannot be set under security model <quote>none</quote>
618 or <quote>pool</quote>.
629 The <option>--iallocator</option> option specifies the instance
630 allocator plugin to use. If you pass in this option the allocator
631 will select nodes for this instance automatically, so you don't need
632 to pass them with the <option>-n</option> option. For more
633 information please refer to the instance allocator documentation.
637 The <option>-t</option> options specifies the disk layout type for
638 the instance. The available choices are:
641 <term>diskless</term>
644 This creates an instance with no disks. Its useful for
645 testing only (or other special cases).
652 <para>Disk devices will be regular files.</para>
658 <para>Disk devices will be logical volumes.</para>
665 Disk devices will be drbd (version 8.x) on top of
674 The optional second value of the <option>--node</option> is used for
675 the drbd template type and specifies the remote node.
679 If you do not want gnt-instance to wait for the disk mirror
680 to be synced, use the <option>--no-wait-for-sync</option>
685 The <option>--file-storage-dir</option> specifies the relative path
686 under the cluster-wide file storage directory to store file-based
687 disks. It is useful for having different subdirectories for
688 different instances. The full path of the directory where the disk
689 files are stored will consist of cluster-wide file storage directory
690 + optional subdirectory + instance name. Example:
691 /srv/ganeti/file-storage/mysubdir/instance1.example.com. This option
692 is only relevant for instances using the file storage backend.
696 The <option>--file-driver</option> specifies the driver to use for
697 file-based disks. Note that currently these drivers work with the
698 xen hypervisor only. This option is only relevant for instances using
699 the file storage backend. The available choices are:
705 Kernel loopback driver. This driver uses loopback
706 devices to access the filesystem within the
707 file. However, running I/O intensive applications in
708 your instance using the loop driver might result in
709 slowdowns. Furthermore, if you use the loopback
710 driver consider increasing the maximum amount of
711 loopback devices (on most systems it's 8) using the
719 <para>The blktap driver (for Xen hypervisors). In
720 order to be able to use the blktap driver you should
721 check if the 'blktapctrl' user space disk agent is
722 running (usually automatically started via xend). This
723 user-level disk I/O interface has the advantage of
724 better performance. Especially if you use a network
725 file system (e.g. NFS) to store your instances this is
726 the recommended choice.
734 The <option>--submit</option> option is used to send the job to
735 the master daemon but not wait for its completion. The job
736 ID will be shown so that it can be examined via
737 <command>gnt-job info</command>.
743 # gnt-instance add -t file --disk 0:size=30g -B memory=512 -o debian-etch \
744 -n node1.example.com --file-storage-dir=mysubdir instance1.example.com
745 # gnt-instance add -t plain --disk 0:size=30g -B memory=512 -o debian-etch \
746 -n node1.example.com instance1.example.com
747 # gnt-instance add -t drbd --disk 0:size=30g -B memory=512 -o debian-etch \
748 -n node1.example.com:node2.example.com instance2.example.com
754 <title>BATCH-CREATE</title>
756 <command>batch-create</command>
757 <arg choice="req">instances_file.json</arg>
761 This command (similar to the Ganeti 1.2
762 <command>batcher</command> tool) submits multiple instance
763 creation jobs based on a definition file. The instance
764 configurations do not encompass all the possible options for
765 the <command>add</command> command, but only a subset.
769 The instance file should be a valid-formed JSON file,
770 containing a dictionary with instance name and instance
771 parameters. The accepted parameters are:
775 <term>disk_size</term>
777 <simpara>The size of the disks of the instance.</simpara>
781 <term>disk_templace</term>
783 <simpara>The disk template to use for the instance,
784 the same as in the <command>add</command>
791 <simpara>A dictionary of backend parameters.</simpara>
795 <term>hypervisor</term>
797 <simpara>A dictionary with a single key (the
798 hypervisor name), and as value the hypervisor
799 options. If not passed, the default hypervisor and
800 hypervisor options will be inherited.</simpara>
804 <term>mac, ip, mode, link</term>
806 <simpara>Specifications for the one NIC that will be
807 created for the instance. 'bridge' is also accepted
808 as a backwards compatibile key.</simpara>
814 <simpara>List of nics that will be created for the
815 instance. Each entry should be a dict, with mac, ip, mode
816 and link as possible keys. Please don't provide the "mac,
817 ip, mode, link" parent keys if you use this method for
818 specifying nics.</simpara>
822 <term>primary_node, secondary_node</term>
824 <simpara>The primary and optionally the secondary node
825 to use for the instance (in case an iallocator script
826 is not used).</simpara>
830 <term>iallocator</term>
832 <simpara>Instead of specifying the nodes, an
833 iallocator script can be used to automatically compute
840 <simpara>whether to start the instance</simpara>
844 <term>ip_check</term>
846 <simpara>Skip the check for already-in-use instance;
847 see the description in the <command>add</command>
848 command for details.</simpara>
852 <term>name_check</term>
854 <simpara>Skip the name check for instances;
855 see the description in the <command>add</command>
856 command for details.</simpara>
860 <term>file_storage_dir, file_driver</term>
862 <simpara>Configuration for the <literal>file</literal>
863 disk type, see the <command>add</command> command for
871 A simple definition for one instance can be (with most of
872 the parameters taken from the cluster defaults):
878 "disk_size": ["25G"],
884 "disk_size": ["25G"],
885 "iallocator": "dumb",
886 "hypervisor": "xen-hvm",
887 "hvparams": {"acpi": true},
888 "backend": {"memory": 512}
895 The command will display the job id for each submitted instance, as follows:
897 # gnt-instance batch-create instances.json
906 <title>REMOVE</title>
909 <command>remove</command>
910 <arg>--ignore-failures</arg>
911 <arg>--shutdown-timeout=<replaceable>N</replaceable></arg>
913 <arg choice="req"><replaceable>instance</replaceable></arg>
917 Remove an instance. This will remove all data from the
918 instance and there is <emphasis>no way back</emphasis>. If
919 you are not sure if you use an instance again, use
920 <command>shutdown</command> first and leave it in the
921 shutdown state for a while.
926 The <option>--ignore-failures</option> option will cause the
927 removal to proceed even in the presence of errors during the
928 removal of the instance (e.g. during the shutdown or the
929 disk removal). If this option is not given, the command will
930 stop at the first error.
934 The <option>--shutdown-timeout</option> is used to specify how
935 much time to wait before forcing the shutdown (xm destroy in xen,
936 killing the kvm process, for kvm). By default two minutes are
937 given to each instance to stop.
941 The <option>--submit</option> option is used to send the job to
942 the master daemon but not wait for its completion. The job
943 ID will be shown so that it can be examined via
944 <command>gnt-job info</command>.
950 # gnt-instance remove instance1.example.com
959 <command>list</command>
960 <arg>--no-headers</arg>
961 <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
962 <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
963 <arg rep="repeat">instance</arg>
967 Shows the currently configured instances with memory usage,
968 disk usage, the node they are running on, and their run
973 The <option>--no-headers</option> option will skip the
974 initial header line. The <option>--separator</option> option
975 takes an argument which denotes what will be used between
976 the output fields. Both these options are to help scripting.
980 The <option>-o</option> option takes a comma-separated list
981 of output fields. The available fields and their meaning
987 <simpara>the instance name</simpara>
993 <simpara>the OS of the instance</simpara>
999 <simpara>the primary node of the instance</simpara>
1005 <simpara>comma-separated list of secondary nodes for the
1006 instance; usually this will be just one node</simpara>
1010 <term>admin_state</term>
1012 <simpara>the desired state of the instance (either "yes"
1013 or "no" denoting the instance should run or
1018 <term>disk_template</term>
1020 <simpara>the disk template of the instance</simpara>
1024 <term>oper_state</term>
1026 <simpara>the actual state of the instance; can be
1027 one of the values "running", "stopped", "(node
1034 <simpara>combined form of admin_state and oper_stat;
1036 <computeroutput>ERROR_nodedown</computeroutput> if the
1037 node of the instance is down,
1038 <computeroutput>ERROR_down</computeroutput> if the
1039 instance should run but is down,
1040 <computeroutput>ERROR_up</computeroutput> if the
1041 instance should be stopped but is actually running,
1042 <computeroutput>ADMIN_down</computeroutput> if the
1043 instance has been stopped (and is stopped) and
1044 <computeroutput>running</computeroutput> if the
1045 instance is set to be running (and is
1050 <term>oper_ram</term>
1052 <simpara>the actual memory usage of the instance as seen
1053 by the hypervisor</simpara>
1059 <simpara>the ip address ganeti recognizes as associated with
1060 the first instance interface</simpara>
1066 <simpara>the first instance interface MAC address</simpara>
1071 <term>nic_mode</term>
1073 <simpara>the mode of the first instance NIC
1074 (routed or bridged)</simpara>
1078 <term>nic_link</term>
1080 <simpara>the link of the first instance NIC
1085 <term>sda_size</term>
1087 <simpara>the size of the instance's first disk</simpara>
1091 <term>sdb_size</term>
1093 <simpara>the size of the instance's second disk, if
1100 <simpara>the number of VCPUs allocated to the
1107 <simpara>comma-separated list of the instances's
1112 <term>serial_no</term>
1114 <simpara>the so called 'serial number' of the
1115 instance; this is a numeric field that is incremented
1116 each time the instance is modified, and it can be used
1117 to track modifications</simpara>
1124 the creation time of the instance; note that this
1125 field contains spaces and as such it's harder to
1129 if this attribute is not present (e.g. when
1130 upgrading from older versions), then "N/A" will be
1139 the last modification time of the instance; note
1140 that this field contains spaces and as such it's
1144 if this attribute is not present (e.g. when
1145 upgrading from older versions), then "N/A" will be
1154 <simpara>Show the UUID of the instance (generated
1155 automatically by Ganeti)</simpara>
1160 <term>network_port</term>
1162 <simpara>If the instance has a network port assigned
1163 to it (e.g. for VNC connections), this will be shown,
1164 otherwise <literal>-</literal> will be
1165 displayed.</simpara>
1169 <term>beparams</term>
1171 <simpara>A text format of the entire beparams for the
1172 instance. It's more useful to select individual fields
1173 from this dictionary, see below.</simpara>
1177 <term>disk.count</term>
1179 <simpara>The number of instance disks.</simpara>
1183 <term>disk.size/N</term>
1185 <simpara>The size of the instance's Nth disk. This is
1186 a more generic form of the <literal>sda_size</literal>
1187 and <literal>sdb_size</literal> fields.</simpara>
1191 <term>disk.sizes</term>
1193 <simpara>A comma-separated list of the disk sizes for
1194 this instance.</simpara>
1198 <term>disk_usage</term>
1200 <simpara>The total disk space used by this instance on
1201 each of its nodes. This is not the instance-visible
1202 disk size, but the actual disk "cost" of the
1207 <term>nic.mac/N</term>
1209 <simpara>The MAC of the Nth instance NIC.</simpara>
1213 <term>nic.ip/N</term>
1215 <simpara>The IP address of the Nth instance NIC.</simpara>
1219 <term>nic.mode/N</term>
1221 <simpara>The mode of the Nth instance NIC</simpara>
1225 <term>nic.link/N</term>
1227 <simpara>The link of the Nth instance NIC</simpara>
1231 <term>nic.macs</term>
1233 <simpara>A comma-separated list of all the MACs of the
1234 instance's NICs.</simpara>
1238 <term>nic.ips</term>
1240 <simpara>A comma-separated list of all the IP
1241 addresses of the instance's NICs.</simpara>
1245 <term>nic.modes</term>
1247 <simpara>A comma-separated list of all the modes of the
1248 instance's NICs.</simpara>
1252 <term>nic.links</term>
1254 <simpara>A comma-separated list of all the link parameters
1255 of the instance's NICs.</simpara>
1259 <term>nic.count</term>
1261 <simpara>The number of instance nics.</simpara>
1265 <term>hv/<replaceable>NAME</replaceable></term>
1267 <simpara>The value of the hypervisor parameter called
1268 <replaceable>NAME</replaceable>. For details of what
1269 hypervisor parameters exist and their meaning, see the
1270 <command>add</command> command.</simpara>
1274 <term>be/memory</term>
1276 <simpara>The configured memory for the instance.</simpara>
1280 <term>be/vcpus</term>
1282 <simpara>The configured number of VCPUs for the
1287 <term>be/auto_balance</term>
1289 <simpara>Whether the instance is considered in N+1
1297 If the value of the option starts with the character
1298 <constant>+</constant>, the new field(s) will be added to the
1299 default list. This allows to quickly see the default list
1300 plus a few other fields, instead of retyping the entire list
1305 There is a subtle grouping about the available output
1306 fields: all fields except for <option>oper_state</option>,
1307 <option>oper_ram</option> and <option>status</option> are
1308 configuration value and not run-time values. So if you don't
1309 select any of the these fields, the query will be satisfied
1310 instantly from the cluster configuration, without having to
1311 ask the remote nodes for the data. This can be helpful for
1312 big clusters when you only want some data and it makes sense
1313 to specify a reduced set of output fields.
1316 <para>The default output field list is:
1317 <simplelist type="inline">
1318 <member>name</member>
1320 <member>pnode</member>
1321 <member>admin_state</member>
1322 <member>oper_state</member>
1323 <member>oper_ram</member>
1332 <command>info</command>
1337 <group choice="req">
1339 <arg rep="repeat"><replaceable>instance</replaceable></arg>
1344 Show detailed information about the given instance(s). This is
1345 different from <command>list</command> as it shows detailed data
1346 about the instance's disks (especially useful for the drbd disk
1351 If the option <option>-s</option> is used, only information
1352 available in the configuration file is returned, without
1353 querying nodes, making the operation faster.
1357 Use the <option>--all</option> to get info about all instances,
1358 rather than explicitly passing the ones you're interested in.
1363 <title>MODIFY</title>
1366 <command>modify</command>
1368 <arg choice="opt">-H <replaceable>HYPERVISOR_PARAMETERS</replaceable></arg>
1370 <arg choice="opt">-B <replaceable>BACKEND_PARAMETERS</replaceable></arg>
1373 <arg>--net add<replaceable><optional>:options</optional></replaceable></arg>
1374 <arg>--net remove</arg>
1375 <arg>--net <replaceable>N:options</replaceable></arg>
1379 <arg>--disk add:size=<replaceable>SIZE</replaceable></arg>
1380 <arg>--disk remove</arg>
1381 <arg>--disk <replaceable>N</replaceable>:mode=<replaceable>MODE</replaceable></arg>
1387 <arg choice="req"><replaceable>instance</replaceable></arg>
1391 Modifies the memory size, number of vcpus, ip address, MAC
1392 address and/or nic parameters for an instance. It can also
1393 add and remove disks and NICs to/from the instance. Note
1394 that you need to give at least one of the arguments, otherwise
1395 the command complains.
1399 The <option>-H</option> option specifies hypervisor options
1400 in the form of <userinput>name=value[,...]</userinput>. For details which options can be specified, see the <command>add</command> command.
1405 add:size=<replaceable>SIZE</replaceable></option> option
1406 adds a disk to the instance. The <option>--disk
1407 remove</option> will remove the last disk of the
1408 instance. The <option>--disk
1409 <replaceable>N</replaceable>:mode=<replaceable>MODE</replaceable></option>
1410 option will change the mode of the Nth disk of the instance
1411 between read-only (<literal>ro</literal>) and read-write
1412 (<literal>rw</literal>).
1417 add:<replaceable>options</replaceable></option> option will
1418 add a new NIC to the instance. The available options are the
1419 same as in the <command>add</command> command (mac, ip, link,
1420 mode). The <option>--net remove</option> will remove the
1421 last NIC of the instance, while the <option>--net
1422 <replaceable>N</replaceable>:<replaceable>options</replaceable></option>
1423 option will change the parameters of the Nth instance NIC.
1427 The <option>--submit</option> option is used to send the job to
1428 the master daemon but not wait for its completion. The job
1429 ID will be shown so that it can be examined via
1430 <command>gnt-job info</command>.
1434 All the changes take effect at the next restart. If the
1435 instance is running, there is no effect on the instance.
1440 <title>REINSTALL</title>
1443 <command>reinstall</command>
1444 <arg choice="opt">-o <replaceable>os-type</replaceable></arg>
1445 <arg>--select-os</arg>
1446 <arg choice="opt">-f <replaceable>force</replaceable></arg>
1447 <arg>--force-multiple</arg>
1449 <group choice="opt">
1450 <arg>--instance</arg>
1452 <arg>--primary</arg>
1453 <arg>--secondary</arg>
1457 <arg choice="opt" rep="repeat"><replaceable>instance</replaceable></arg>
1461 Reinstalls the operating system on the given instance(s). The
1462 instance(s) must be stopped when running this command. If the
1463 <option>--os-type</option> is specified, the operating
1468 The <option>--select-os</option> option switches to an
1469 interactive OS reinstall. The user is prompted to select the OS
1470 template from the list of available OS templates.
1474 Since this is a potentially dangerous command, the user will
1475 be required to confirm this action, unless the
1476 <option>-f</option> flag is passed. When multiple instances
1477 are selected (either by passing multiple arguments or by
1478 using the <option>--node</option>,
1479 <option>--primary</option>, <option>--secondary</option> or
1480 <option>--all</option> options), the user must pass both the
1481 <option>--force</option> and
1482 <option>--force-multiple</option> options to skip the
1483 interactive confirmation.
1487 The <option>--submit</option> option is used to send the job to
1488 the master daemon but not wait for its completion. The job
1489 ID will be shown so that it can be examined via
1490 <command>gnt-job info</command>.
1497 <title>RENAME</title>
1500 <command>rename</command>
1501 <arg>--no-ip-check</arg>
1503 <arg choice="req"><replaceable>instance</replaceable></arg>
1504 <arg choice="req"><replaceable>new_name</replaceable></arg>
1508 Renames the given instance. The instance must be stopped
1509 when running this command. The requirements for the new name
1510 are the same as for adding an instance: the new name must be
1511 resolvable and the IP it resolves to must not be reachable
1512 (in order to prevent duplicate IPs the next time the
1513 instance is started). The IP test can be skipped if the
1514 <option>--no-ip-check</option> option is passed.
1518 The <option>--submit</option> option is used to send the job to
1519 the master daemon but not wait for its completion. The job
1520 ID will be shown so that it can be examined via
1521 <command>gnt-job info</command>.
1529 <title>Starting/stopping/connecting to console</title>
1532 <title>STARTUP</title>
1535 <command>startup</command>
1539 <arg>--force-multiple</arg>
1541 <group choice="opt">
1542 <arg>--instance</arg>
1544 <arg>--primary</arg>
1545 <arg>--secondary</arg>
1548 <arg>--node-tags</arg>
1549 <arg>--pri-node-tags</arg>
1550 <arg>--sec-node-tags</arg>
1553 <arg>-H <option>key=value...</option></arg>
1554 <arg>-B <option>key=value...</option></arg>
1559 rep="repeat"><replaceable>name</replaceable></arg>
1563 Starts one or more instances, depending on the following
1564 options. The four available modes are:
1567 <term><option>--instance</option></term>
1569 <simpara>will start the instances given as arguments
1570 (at least one argument required); this is the default
1577 <simpara>will start the instances who have the given
1578 node as either primary or secondary</simpara>
1582 <term><option>--primary</option></term>
1584 <simpara>will start all instances whose primary node
1585 is in the list of nodes passed as arguments (at least
1586 one node required)</simpara>
1590 <term><option>--secondary</option></term>
1592 <simpara>will start all instances whose secondary node
1593 is in the list of nodes passed as arguments (at least
1594 one node required)</simpara>
1600 <simpara>will start all instances in the cluster (no
1601 arguments accepted)</simpara>
1607 <simpara>will start all instances in the cluster with
1608 the tags given as arguments</simpara>
1612 <term>--node-tags</term>
1614 <simpara>will start all instances in the cluster on
1615 nodes with the tags given as arguments</simpara>
1619 <term>--pri-node-tags</term>
1621 <simpara>will start all instances in the cluster on
1622 primary nodes with the tags given as
1627 <term>--sec-node-tags</term>
1629 <simpara>will start all instances in the cluster on
1630 secondary nodes with the tags given as
1638 Note that although you can pass more than one selection
1639 option, the last one wins, so in order to guarantee the
1640 desired result, don't pass more than one such option.
1644 Use <option>--force</option> to start even if secondary disks are
1649 The <option>--force-multiple</option> will skip the
1650 interactive confirmation in the case the more than one
1651 instance will be affected.
1655 The <option>-H</option> and <option>-B</option> options
1656 specify temporary hypervisor and backend parameters that can
1657 be used to start an instance with modified parameters. They
1658 can be useful for quick testing without having to modify an
1659 instance back and forth, e.g.:
1661 # gnt-instance start -H root_args="single" instance1
1662 # gnt-instance start -B memory=2048 instance2
1664 The first form will start the instance
1665 <userinput>instance1</userinput> in single-user mode, and
1666 the instance <userinput>instance2</userinput> with 2GB of
1667 RAM (this time only, unless that is the actual instance
1668 memory size already). Note that the values override the
1669 instance parameters (and not extend them): an instance with
1670 "root_args=ro" when started with <userinput>-H
1671 root_args=single</userinput> will result in "single", not
1676 The <option>--submit</option> option is used to send the job to
1677 the master daemon but not wait for its completion. The job
1678 ID will be shown so that it can be examined via
1679 <command>gnt-job info</command>.
1685 # gnt-instance start instance1.example.com
1686 # gnt-instance start --node node1.example.com node2.example.com
1687 # gnt-instance start --all
1693 <title>SHUTDOWN</title>
1696 <command>shutdown</command>
1698 <arg>--timeout=<replaceable>N</replaceable></arg>
1700 <arg>--force-multiple</arg>
1702 <group choice="opt">
1703 <arg>--instance</arg>
1705 <arg>--primary</arg>
1706 <arg>--secondary</arg>
1709 <arg>--node-tags</arg>
1710 <arg>--pri-node-tags</arg>
1711 <arg>--sec-node-tags</arg>
1717 rep="repeat"><replaceable>name</replaceable></arg>
1721 Stops one or more instances. If the instance cannot be
1722 cleanly stopped during a hardcoded interval (currently 2
1723 minutes), it will forcibly stop the instance (equivalent to
1724 switching off the power on a physical machine).
1728 The <option>--timeout</option> is used to specify how much time to
1729 wait before forcing the shutdown (xm destroy in xen, killing the kvm
1730 process, for kvm). By default two minutes are given to each instance
1735 The <option>--instance</option>, <option>--node</option>,
1736 <option>--primary</option>, <option>--secondary</option>,
1737 <option>--all</option>, <option>--tags</option>,
1738 <option>--node-tags</option>, <option>--pri-node-tags</option> and
1739 <option>--sec-node-tags</option> options are similar as for the
1740 <command>startup</command> command and they influence the
1741 actual instances being shutdown.
1745 The <option>--submit</option> option is used to send the job to
1746 the master daemon but not wait for its completion. The job
1747 ID will be shown so that it can be examined via
1748 <command>gnt-job info</command>.
1755 # gnt-instance shutdown instance1.example.com
1756 # gnt-instance shutdown --all
1762 <title>REBOOT</title>
1765 <command>reboot</command>
1767 <arg>--type=<replaceable>REBOOT-TYPE</replaceable></arg>
1769 <arg>--ignore-secondaries</arg>
1771 <arg>--shutdown-timeout=<replaceable>N</replaceable></arg>
1773 <arg>--force-multiple</arg>
1775 <group choice="opt">
1776 <arg>--instance</arg>
1778 <arg>--primary</arg>
1779 <arg>--secondary</arg>
1782 <arg>--node-tags</arg>
1783 <arg>--pri-node-tags</arg>
1784 <arg>--sec-node-tags</arg>
1790 rep="repeat"><replaceable>name</replaceable></arg>
1794 Reboots one or more instances. The type of reboot depends on
1795 the value of <option>--type</option>. A soft reboot does a
1796 hypervisor reboot, a hard reboot does a instance stop,
1797 recreates the hypervisor config for the instance and
1798 starts the instance. A full reboot does the equivalent
1799 of <command>gnt-instance shutdown && gnt-instance
1800 startup</command>. The default is hard reboot.
1804 For the hard reboot the option
1805 <option>--ignore-secondaries</option> ignores errors for the
1806 secondary node while re-assembling the instance disks.
1810 The <option>--instance</option>, <option>--node</option>,
1811 <option>--primary</option>, <option>--secondary</option>,
1812 <option>--all</option>, <option>--tags</option>,
1813 <option>--node-tags</option>, <option>--pri-node-tags</option> and
1814 <option>--sec-node-tags</option> options are similar as for the
1815 <command>startup</command> command and they influence the
1816 actual instances being rebooted.
1820 The <option>--shutdown-timeout</option> is used to specify how
1821 much time to wait before forcing the shutdown (xm destroy in xen,
1822 killing the kvm process, for kvm). By default two minutes are
1823 given to each instance to stop.
1827 The <option>--force-multiple</option> will skip the
1828 interactive confirmation in the case the more than one
1829 instance will be affected.
1835 # gnt-instance reboot instance1.example.com
1836 # gnt-instance reboot --type=full instance1.example.com
1842 <title>CONSOLE</title>
1844 <command>console</command>
1845 <arg choice="opt">--show-cmd</arg>
1846 <arg choice="req"><replaceable>instance</replaceable></arg>
1850 Connects to the console of the given instance. If the
1851 instance is not up, an error is returned. Use the
1852 <option>--show-cmd</option> option to display the command
1853 instead of executing it.
1857 For HVM instances, this will attempt to connect to the
1858 serial console of the instance. To connect to the
1859 virtualized "physical" console of a HVM instance, use a VNC
1860 client with the connection info from the
1861 <command>info</command> command.
1867 # gnt-instance console instance1.example.com
1875 <title>Disk management</title>
1878 <title>REPLACE-DISKS</title>
1881 <command>replace-disks</command>
1883 <arg>--early-release</arg>
1884 <arg choice="req">-p</arg>
1885 <arg>--disks <replaceable>idx</replaceable></arg>
1886 <arg choice="req"><replaceable>instance</replaceable></arg>
1890 <command>replace-disks</command>
1892 <arg>--early-release</arg>
1893 <arg choice="req">-s</arg>
1894 <arg>--disks <replaceable>idx</replaceable></arg>
1895 <arg choice="req"><replaceable>instance</replaceable></arg>
1899 <command>replace-disks</command>
1901 <arg>--early-release</arg>
1902 <group choice="req">
1903 <arg>--iallocator <replaceable>name</replaceable></arg>
1904 <arg>--new-secondary <replaceable>NODE</replaceable></arg>
1907 <arg choice="req"><replaceable>instance</replaceable></arg>
1911 <command>replace-disks</command>
1913 <arg>--early-release</arg>
1914 <arg choice="req">--auto</arg>
1915 <arg choice="req"><replaceable>instance</replaceable></arg>
1919 This command is a generalized form for replacing disks. It
1920 is currently only valid for the mirrored (DRBD) disk
1925 The first form (when passing the <option>-p</option> option)
1926 will replace the disks on the primary, while the second form
1927 (when passing the <option>-s</option> option will replace
1928 the disks on the secondary node. For these two cases (as the
1929 node doesn't change), it is possible to only run the replace
1930 for a subset of the disks, using the option
1931 <option>--disks</option> which takes a list of
1932 comma-delimited disk indices (zero-based),
1933 e.g. <userinput>0,2</userinput> to replace only the first
1938 The third form (when passing either the
1939 <option>--iallocator</option> or the
1940 <option>--new-secondary</option> option) is designed to
1941 change secondary node of the instance. Specifying
1942 <option>--iallocator</option> makes the new secondary be
1943 selected automatically by the specified allocator plugin,
1944 otherwise the new secondary node will be the one chosen
1945 manually via the <option>--new-secondary</option> option.
1949 The fourth form (when using <option>--auto</option>) will
1950 automatically determine which disks of an instance are faulty and
1951 replace them within the same node. The <option>--auto</option>
1952 option works only when an instance has only faulty disks on
1953 either the primary or secondary node; it doesn't work when
1954 both sides have faulty disks.
1958 The <option>--submit</option> option is used to send the job to
1959 the master daemon but not wait for its completion. The job
1960 ID will be shown so that it can be examined via
1961 <command>gnt-job info</command>.
1965 The <option>--early-release</option> changes the code so
1966 that the old storage on secondary node(s) is removed early
1967 (before the resync is completed) and the internal Ganeti
1968 locks for the current (and new, if any) secondary node are
1969 also released, thus allowing more parallelism in the cluster
1970 operation. This should be used only when recovering from a
1971 disk failure on the current secondary (thus the old storage
1972 is already broken) or when the storage on the primary node
1973 is known to be fine (thus we won't need the old storage for
1974 potential recovery).
1978 Note that it is not possible to select an offline or drained
1979 node as a new secondary.
1985 <title>ACTIVATE-DISKS</title>
1988 <command>activate-disks</command>
1990 <arg>--ignore-size</arg>
1991 <arg choice="req"><replaceable>instance</replaceable></arg>
1994 Activates the block devices of the given instance. If
1995 successful, the command will show the location and name of
1998 node1.example.com:disk/0:/dev/drbd0
1999 node1.example.com:disk/1:/dev/drbd1
2002 In this example, <emphasis>node1.example.com</emphasis> is
2003 the name of the node on which the devices have been
2004 activated. The <emphasis>disk/0</emphasis> and
2005 <emphasis>disk/1</emphasis> are the Ganeti-names of the
2006 instance disks; how they are visible inside the instance is
2007 hypervisor-specific. <emphasis>/dev/drbd0</emphasis> and
2008 <emphasis>/dev/drbd1</emphasis> are the actual block devices
2009 as visible on the node.
2013 The <option>--submit</option> option is used to send the job to
2014 the master daemon but not wait for its completion. The job
2015 ID will be shown so that it can be examined via
2016 <command>gnt-job info</command>.
2020 The <option>--ignore-size</option> option can be used to
2021 activate disks ignoring the currently configured size in
2022 Ganeti. This can be used in cases where the configuration
2023 has gotten out of sync with the real-world (e.g. after a
2024 partially-failed grow-disk operation or due to rounding in
2025 LVM devices). This should not be used in normal cases, but
2026 only when activate-disks fails without it.
2030 Note that it is safe to run this command while the instance
2036 <title>DEACTIVATE-DISKS</title>
2039 <command>deactivate-disks</command>
2041 <arg choice="req"><replaceable>instance</replaceable></arg>
2044 De-activates the block devices of the given instance. Note
2045 that if you run this command for an instance with a drbd
2046 disk template, while it is running, it will not be able to
2047 shutdown the block devices on the primary node, but it will
2048 shutdown the block devices on the secondary nodes, thus
2049 breaking the replication.
2053 The <option>--submit</option> option is used to send the job to
2054 the master daemon but not wait for its completion. The job
2055 ID will be shown so that it can be examined via
2056 <command>gnt-job info</command>.
2062 <title>GROW-DISK</title>
2064 <command>grow-disk</command>
2065 <arg>--no-wait-for-sync</arg>
2067 <arg choice="req"><replaceable>instance</replaceable></arg>
2068 <arg choice="req"><replaceable>disk</replaceable></arg>
2069 <arg choice="req"><replaceable>amount</replaceable></arg>
2073 Grows an instance's disk. This is only possible for
2074 instances having a <literal>plain</literal> or
2075 <literal>drbd</literal> disk template.
2079 Note that this command only change the block device size; it
2080 will not grow the actual filesystems, partitions, etc. that
2081 live on that disk. Usually, you will need to:
2084 <simpara>use <command>gnt-instance grow-disk</command></simpara>
2087 <simpara>reboot the instance (later, at a convenient
2091 <simpara>use a filesystem resizer, such as
2092 <citerefentry> <refentrytitle>ext2online</refentrytitle>
2093 <manvolnum>8</manvolnum> </citerefentry> or
2094 <citerefentry> <refentrytitle>xfs_growfs</refentrytitle>
2095 <manvolnum>8</manvolnum> </citerefentry> to resize the
2096 filesystem, or use <citerefentry>
2097 <refentrytitle>fdisk</refentrytitle>
2098 <manvolnum>8</manvolnum> </citerefentry> to change the
2099 partition table on the disk
2107 The <replaceable>disk</replaceable> argument is the index of
2108 the instance disk to grow. The
2109 <replaceable>amount</replaceable> argument is given either
2110 as a number (and it represents the amount to increase the
2111 disk with in mebibytes) or can be given similar to the
2112 arguments in the create instance operation, with a suffix
2117 Note that the disk grow operation might complete on one node
2118 but fail on the other; this will leave the instance with
2119 different-sized LVs on the two nodes, but this will not
2120 create problems (except for unused space).
2124 If you do not want gnt-instance to wait for the new disk
2125 region to be synced, use the
2126 <option>--no-wait-for-sync</option> option.
2130 The <option>--submit</option> option is used to send the job to
2131 the master daemon but not wait for its completion. The job
2132 ID will be shown so that it can be examined via
2133 <command>gnt-job info</command>.
2137 <para>Example (increase the first disk for instance1 by 16GiB):
2139 # gnt-instance grow-disk instance1.example.com 0 16g
2144 Also note that disk shrinking is not supported; use
2145 <command>gnt-backup export</command> and then
2146 <command>gnt-backup import</command> to reduce the disk size
2152 <title>RECREATE-DISKS</title>
2155 <command>recreate-disks</command>
2157 <arg>--disks=<option>indices</option></arg>
2158 <arg choice="req"><replaceable>instance</replaceable></arg>
2161 Recreates the disks of the given instance, or only a subset
2162 of the disks (if the option <option>disks</option> is
2163 passed, which must be a comma-separated list of disk
2164 indices, starting from zero).
2168 Note that this functionality should only be used for missing
2169 disks; if any of the given disks already exists, the
2170 operation will fail. While this is suboptimal,
2171 recreate-disks should hopefully not be needed in normal
2172 operation and as such the impact of this is low.
2176 The <option>--submit</option> option is used to send the job to
2177 the master daemon but not wait for its completion. The job
2178 ID will be shown so that it can be examined via
2179 <command>gnt-job info</command>.
2187 <title>Recovery</title>
2190 <title>FAILOVER</title>
2193 <command>failover</command>
2195 <arg>--ignore-consistency</arg>
2196 <arg>--shutdown-timeout=<replaceable>N</replaceable></arg>
2198 <arg choice="req"><replaceable>instance</replaceable></arg>
2202 Failover will fail the instance over its secondary
2203 node. This works only for instances having a drbd disk
2208 Normally the failover will check the consistency of the
2209 disks before failing over the instance. If you are trying to
2210 migrate instances off a dead node, this will fail. Use the
2211 <option>--ignore-consistency</option> option for this
2212 purpose. Note that this option can be dangerous as errors in
2213 shutting down the instance will be ignored, resulting in
2214 possibly having the instance running on two machines in
2215 parallel (on disconnected DRBD drives).
2219 The <option>--shutdown-timeout</option> is used to specify how
2220 much time to wait before forcing the shutdown (xm destroy in xen,
2221 killing the kvm process, for kvm). By default two minutes are
2222 given to each instance to stop.
2226 The <option>--submit</option> option is used to send the job to
2227 the master daemon but not wait for its completion. The job
2228 ID will be shown so that it can be examined via
2229 <command>gnt-job info</command>.
2235 # gnt-instance failover instance1.example.com
2241 <title>MIGRATE</title>
2244 <command>migrate</command>
2246 <arg choice="req">--cleanup</arg>
2247 <arg choice="req"><replaceable>instance</replaceable></arg>
2251 <command>migrate</command>
2253 <arg>--non-live</arg>
2254 <arg choice="req"><replaceable>instance</replaceable></arg>
2258 Migrate will move the instance to its secondary node without
2259 shutdown. It only works for instances having the drbd8 disk
2264 The migration command needs a perfectly healthy instance, as
2265 we rely on the dual-master capability of drbd8 and the disks
2266 of the instance are not allowed to be degraded.
2270 The <option>--non-live</option> option will switch (for the
2271 hypervisors that support it) between a "fully live"
2272 (i.e. the interruption is as minimal as possible) migration
2273 and one in which the instance is frozen, its state saved and
2274 transported to the remote node, and then resumed there. This
2275 all depends on the hypervisor support for two different
2276 methods. In any case, it is not an error to pass this
2277 parameter (it will just be ignored if the hypervisor doesn't
2282 If the <option>--cleanup</option> option is passed, the
2283 operation changes from migration to attempting recovery from
2284 a failed previous migration. In this mode, ganeti checks if
2285 the instance runs on the correct node (and updates its
2286 configuration if not) and ensures the instances's disks are
2287 configured correctly. In this mode, the
2288 <option>--non-live</option> option is ignored.
2292 The option <option>-f</option> will skip the prompting for
2296 Example (and expected output):
2298 # gnt-instance migrate instance1
2299 Migrate will happen to the instance instance1. Note that migration is
2300 **experimental** in this version. This might impact the instance if
2301 anything goes wrong. Continue?
2303 * checking disk consistency between source and target
2304 * ensuring the target is in secondary mode
2305 * changing disks into dual-master mode
2306 - INFO: Waiting for instance instance1 to sync disks.
2307 - INFO: Instance instance1's disks are in sync.
2308 * migrating instance to node2.example.com
2309 * changing the instance's disks on source node to secondary
2310 - INFO: Waiting for instance instance1 to sync disks.
2311 - INFO: Instance instance1's disks are in sync.
2312 * changing the instance's disks to single-master
2322 <command>move</command>
2324 <arg>-n <replaceable>node</replaceable></arg>
2325 <arg>--shutdown-timeout=<replaceable>N</replaceable></arg>
2327 <arg choice="req"><replaceable>instance</replaceable></arg>
2331 Move will move the instance to an arbitrary node in the
2332 cluster. This works only for instances having a plain or
2337 Note that since this operation is done via data copy, it
2338 will take a long time for big disks (similar to
2339 replace-disks for a drbd instance).
2343 The <option>--shutdown-timeout</option> is used to specify how
2344 much time to wait before forcing the shutdown (xm destroy in xen,
2345 killing the kvm process, for kvm). By default two minutes are
2346 given to each instance to stop.
2350 The <option>--submit</option> option is used to send the job to
2351 the master daemon but not wait for its completion. The job
2352 ID will be shown so that it can be examined via
2353 <command>gnt-job info</command>.
2359 # gnt-instance move -n node3.example.com instance1.example.com
2370 <title>ADD-TAGS</title>
2373 <command>add-tags</command>
2374 <arg choice="opt">--from <replaceable>file</replaceable></arg>
2375 <arg choice="req"><replaceable>instancename</replaceable></arg>
2377 rep="repeat"><replaceable>tag</replaceable></arg>
2381 Add tags to the given instance. If any of the tags contains
2382 invalid characters, the entire operation will abort.
2385 If the <option>--from</option> option is given, the list of
2386 tags will be extended with the contents of that file (each
2387 line becomes a tag). In this case, there is not need to pass
2388 tags on the command line (if you do, both sources will be
2389 used). A file name of - will be interpreted as stdin.
2394 <title>LIST-TAGS</title>
2397 <command>list-tags</command>
2398 <arg choice="req"><replaceable>instancename</replaceable></arg>
2401 <para>List the tags of the given instance.</para>
2405 <title>REMOVE-TAGS</title>
2407 <command>remove-tags</command>
2408 <arg choice="opt">--from <replaceable>file</replaceable></arg>
2409 <arg choice="req"><replaceable>instancename</replaceable></arg>
2411 rep="repeat"><replaceable>tag</replaceable></arg>
2415 Remove tags from the given instance. If any of the tags are
2416 not existing on the node, the entire operation will abort.
2420 If the <option>--from</option> option is given, the list of
2421 tags will be extended with the contents of that file (each
2422 line becomes a tag). In this case, there is not need to pass
2423 tags on the command line (if you do, both sources will be
2424 used). A file name of - will be interpreted as stdin.
2436 <!-- Keep this comment at the end of the file
2441 sgml-minimize-attributes:nil
2442 sgml-always-quote-attributes:t
2445 sgml-parent-document:nil
2446 sgml-default-dtd-file:nil
2447 sgml-exposed-tags:nil
2448 sgml-local-catalogs:nil
2449 sgml-local-ecat-files:nil