Update man page of gnt-instance
[ganeti-local] / man / gnt-instance.sgml
1 <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
2
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">
11
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">
16 ]>
17
18 <refentry>
19   <refentryinfo>
20     <copyright>
21       <year>2006</year>
22       <year>2007</year>
23       <year>2008</year>
24       <year>2009</year>
25       <year>2010</year>
26       <holder>Google Inc.</holder>
27     </copyright>
28     &dhdate;
29   </refentryinfo>
30   <refmeta>
31     &dhucpackage;
32
33     &dhsection;
34     <refmiscinfo>ganeti 2.0</refmiscinfo>
35   </refmeta>
36   <refnamediv>
37     <refname>&dhpackage;</refname>
38
39     <refpurpose>ganeti instance administration</refpurpose>
40   </refnamediv>
41   <refsynopsisdiv>
42     <cmdsynopsis>
43       <command>&dhpackage; </command>
44
45       <arg choice="req">command</arg>
46       <arg>arguments...</arg>
47     </cmdsynopsis>
48   </refsynopsisdiv>
49   <refsect1>
50     <title>DESCRIPTION</title>
51
52     <para>
53       The <command>&dhpackage;</command> is used for instance
54       administration in the ganeti system.
55     </para>
56
57   </refsect1>
58   <refsect1>
59     <title>COMMANDS</title>
60
61     <refsect2>
62       <title>Creation/removal/querying</title>
63
64       <refsect3>
65         <title>ADD</title>
66         <cmdsynopsis>
67           <command>add</command>
68           <sbr>
69           <arg choice="req">-t<group choice="req">
70               <arg>diskless</arg>
71               <arg>file</arg>
72               <arg>plain</arg>
73               <arg>drbd</arg>
74             </group></arg>
75           <sbr>
76
77           <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>
80           </group>
81           <sbr>
82           <arg>--no-ip-check</arg>
83           <arg>--no-name-check</arg>
84           <arg>--no-start</arg>
85           <sbr>
86           <group>
87             <arg rep="repeat">--net=<replaceable>N</replaceable><arg rep="repeat">:options</arg></arg>
88             <arg>--no-nics</arg>
89           </group>
90           <sbr>
91           <arg>-B <replaceable>BEPARAMS</replaceable></arg>
92           <sbr>
93
94           <arg>-H <replaceable>HYPERVISOR</replaceable><arg>:<arg choice="plain" rep="repeat">option=<replaceable>value</replaceable></arg></arg></arg>
95           <sbr>
96
97           <arg>--file-storage-dir <replaceable>dir_path</replaceable></arg>
98           <arg>--file-driver<group choice="req">
99               <arg>loop</arg>
100               <arg>blktap</arg>
101             </group></arg>
102           <sbr>
103
104           <group choice="req">
105             <arg>-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg>
106             <arg>--iallocator <replaceable>name</replaceable></arg>
107           </group>
108           <sbr>
109
110           <arg choice="req">-o <replaceable>os-type</replaceable></arg>
111           <sbr>
112           <arg>--submit</arg>
113           <sbr>
114
115           <arg choice="req"><replaceable>instance</replaceable></arg>
116         </cmdsynopsis>
117
118         <para>
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.
123         </para>
124
125         <para>
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.
136         </para>
137
138         <para>
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).
143         </para>
144
145         <para>
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>.
152         </para>
153
154         <para>
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).
158         </para>
159
160         <para>
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.
166         </para>
167
168         <para>
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.
174         </para>
175
176         <para>
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):
182           <variablelist>
183             <varlistentry>
184               <term>mac</term>
185               <listitem>
186                 <simpara>either a value or <constant>GENERATE</constant>
187                   to generate a new unique MAC</simpara>
188               </listitem>
189             </varlistentry>
190             <varlistentry>
191               <term>ip</term>
192               <listitem>
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>
197               </listitem>
198             </varlistentry>
199             <varlistentry>
200               <term>mode</term>
201               <listitem>
202                 <simpara>specifies the connection mode for this nic:
203                   routed or bridged.</simpara>
204               </listitem>
205             </varlistentry>
206             <varlistentry>
207               <term>link</term>
208               <listitem>
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>
214               </listitem>
215             </varlistentry>
216           </variablelist>
217           Of these "mode" and "link" are nic parameters, and inherit their
218           default at cluster level.
219         </para>
220
221         <para>
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.
225         </para>
226
227         <para>
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>.
231         </para>
232
233         <para>
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
237           parameters are:
238           <variablelist>
239             <varlistentry>
240               <term>memory</term>
241               <listitem>
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>
245               </listitem>
246             </varlistentry>
247             <varlistentry>
248               <term>vcpus</term>
249               <listitem>
250                 <simpara>the number of VCPUs to assign to the instance
251                   (if this value makes sense for the hypervisor)</simpara>
252               </listitem>
253             </varlistentry>
254             <varlistentry>
255               <term>auto_balance</term>
256               <listitem>
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>
260               </listitem>
261             </varlistentry>
262           </variablelist>
263         </para>
264
265         <para>
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.
274         </para>
275
276         <para>
277           The possible hypervisor options are as follows:
278           <variablelist>
279             <varlistentry>
280               <term>boot_order</term>
281               <listitem>
282                 <simpara>Valid for the Xen HVM and KVM
283                 hypervisors.</simpara>
284
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>
288
289                 <simpara>
290                   For Xen HVM, The boot order is a string of letters
291                   listing the boot devices, with valid device letters
292                   being:
293                 </simpara>
294                   <variablelist>
295                     <varlistentry>
296                       <term>a</term>
297                       <listitem>
298                         <para>
299                           floppy drive
300                         </para>
301                       </listitem>
302                     </varlistentry>
303                     <varlistentry>
304                       <term>c</term>
305                       <listitem>
306                         <para>
307                           hard disk
308                         </para>
309                       </listitem>
310                     </varlistentry>
311                     <varlistentry>
312                       <term>d</term>
313                       <listitem>
314                         <para>
315                           CDROM drive
316                         </para>
317                       </listitem>
318                     </varlistentry>
319                     <varlistentry>
320                       <term>n</term>
321                       <listitem>
322                         <para>
323                           network boot (PXE)
324                         </para>
325                       </listitem>
326                     </varlistentry>
327                   </variablelist>
328                 <simpara>
329                   The default is not to set an HVM boot order which is
330                   interpreted as 'dc'.
331                 </simpara>
332
333               </listitem>
334             </varlistentry>
335             <varlistentry>
336               <term>cdrom_image_path</term>
337               <listitem>
338                 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
339
340                 <simpara>The path to a CDROM image to attach to the
341                 instance.</simpara>
342
343               </listitem>
344             </varlistentry>
345             <varlistentry>
346               <term>nic_type</term>
347               <listitem>
348                 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
349
350                 <para>
351                   This parameter determines the way the network cards
352                   are presented to the instance. The possible options are:
353                   <simplelist>
354                     <member>rtl8139 (default for Xen HVM) (HVM & KVM)</member>
355                     <member>ne2k_isa (HVM & KVM)</member>
356                     <member>ne2k_pci (HVM & KVM)</member>
357                     <member>i82551 (KVM)</member>
358                     <member>i82557b (KVM)</member>
359                     <member>i82559er (KVM)</member>
360                     <member>pcnet (KVM)</member>
361                     <member>e1000 (KVM)</member>
362                     <member>paravirtual (default for KVM) (HVM & KVM)</member>
363                   </simplelist>
364                 </para>
365               </listitem>
366             </varlistentry>
367             <varlistentry>
368               <term>disk_type</term>
369               <listitem>
370                 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
371
372                 <para>
373                   This parameter determines the way the disks are
374                   presented to the instance. The possible options are:
375                   <simplelist>
376                     <member>ioemu (default for HVM & KVM) (HVM & KVM)</member>
377                     <member>ide (HVM & KVM)</member>
378                     <member>scsi (KVM)</member>
379                     <member>sd (KVM)</member>
380                     <member>mtd (KVM)</member>
381                     <member>pflash (KVM)</member>
382                   </simplelist>
383                 </para>
384               </listitem>
385             </varlistentry>
386             <varlistentry>
387               <term>vnc_bind_address</term>
388               <listitem>
389                 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
390
391                 <para>Specifies the address that the VNC listener for
392                 this instance should bind to. Valid values are IPv4
393                 addresses. Use the address 0.0.0.0 to bind to all
394                 available interfaces (this is the default) or specify
395                 the address of one of the interfaces on the node to
396                 restrict listening to that interface.</para>
397               </listitem>
398             </varlistentry>
399
400             <varlistentry>
401               <term>vnc_tls</term>
402               <listitem>
403                 <simpara>Valid for the KVM hypervisor.</simpara>
404
405                 <simpara>A boolean option that controls whether the
406                 VNC connection is secured with TLS.</simpara>
407               </listitem>
408             </varlistentry>
409
410             <varlistentry>
411               <term>vnc_x509_path</term>
412               <listitem>
413                 <simpara>Valid for the KVM hypervisor.</simpara>
414
415                 <para>If <option>vnc_tls</option> is enabled, this
416                 options specifies the path to the x509 certificate to
417                 use.</para>
418               </listitem>
419             </varlistentry>
420
421             <varlistentry>
422               <term>vnc_x509_verify</term>
423               <listitem>
424                 <simpara>Valid for the KVM hypervisor.</simpara>
425               </listitem>
426             </varlistentry>
427
428             <varlistentry>
429               <term>acpi</term>
430               <listitem>
431                 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
432
433                 <para>
434                   A boolean option that specifies if the hypervisor
435                   should enable ACPI support for this instance. By
436                   default, ACPI is disabled.
437                 </para>
438               </listitem>
439             </varlistentry>
440
441             <varlistentry>
442               <term>pae</term>
443               <listitem>
444                 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
445
446                 <para>
447                   A boolean option that specifies if the hypervisor
448                   should enabled PAE support for this instance. The
449                   default is false, disabling PAE support.
450                 </para>
451               </listitem>
452             </varlistentry>
453
454             <varlistentry>
455               <term>use_localtime</term>
456               <listitem>
457                 <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
458
459                 <para>
460                   A boolean option that specifies if the instance
461                   should be started with its clock set to the
462                   localtime of the machine (when true) or to the UTC
463                   (When false). The default is false, which is useful
464                   for Linux/Unix machines; for Windows OSes, it is
465                   recommended to enable this parameter.
466                 </para>
467               </listitem>
468             </varlistentry>
469
470             <varlistentry>
471               <term>kernel_path</term>
472               <listitem>
473                 <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
474
475                 <para>
476                   This option specifies the path (on the node) to the
477                   kernel to boot the instance with. Xen PVM instances
478                   always require this, while for KVM if this option is
479                   empty, it will cause the machine to load the kernel
480                   from its disks.
481                 </para>
482               </listitem>
483             </varlistentry>
484
485             <varlistentry>
486               <term>kernel_args</term>
487               <listitem>
488                 <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
489
490                 <para>
491                   This options specifies extra arguments to the kernel
492                   that will be loaded.  device. This is always used
493                   for Xen PVM, while for KVM it is only used if the
494                   <option>kernel_path</option> option is also
495                   specified.
496                 </para>
497
498                 <para>
499                   The default setting for this value is simply
500                   <constant>"ro"</constant>, which mounts the root
501                   disk (initially) in read-only one. For example,
502                   setting this to <userinput>single</userinput> will
503                   cause the instance to start in single-user mode.
504                 </para>
505               </listitem>
506             </varlistentry>
507
508             <varlistentry>
509               <term>initrd_path</term>
510               <listitem>
511                 <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
512
513                 <para>
514                   This option specifies the path (on the node) to the
515                   initrd to boot the instance with. Xen PVM instances
516                   can use this always, while for KVM if this option is
517                   only used if the <option>kernel_path</option> option
518                   is also specified. You can pass here either an
519                   absolute filename (the path to the initrd) if you
520                   want to use an initrd, or use the format
521                   <userinput>no_initrd_path</userinput> for no initrd.
522                 </para>
523               </listitem>
524             </varlistentry>
525
526             <varlistentry>
527               <term>root_path</term>
528               <listitem>
529                 <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
530
531                 <para>
532                   This options specifies the name of the root
533                   device. This is always needed for Xen PVM, while for
534                   KVM it is only used if the
535                   <option>kernel_path</option> option is also
536                   specified.
537                 </para>
538               </listitem>
539             </varlistentry>
540
541             <varlistentry>
542               <term>serial_console</term>
543               <listitem>
544                 <simpara>Valid for the KVM hypervisor.</simpara>
545
546                 <simpara>This boolean option specifies whether to
547                 emulate a serial console for the instance.</simpara>
548               </listitem>
549             </varlistentry>
550
551             <varlistentry>
552               <term>disk_cache</term>
553               <listitem>
554                 <simpara>Valid for the KVM hypervisor.</simpara>
555
556                 <simpara>The disk cache mode. It can be either
557                 <userinput>default</userinput> to not pass any cache
558                 option to KVM, or one of the KVM cache modes: none
559                 (for direct I/O), writethrough (to use the host cache
560                 but report completion to the guest only when the host
561                 has commited the changes to disk) or writeback (to use
562                 the host cache and report completion as soon as the
563                 data is in the host cache). Note that there are
564                 special considerations for the cache mode depending on
565                 version of KVM used and disk type (always raw file
566                 under Ganeti), please refer to the KVM documentation
567                 for more details.
568                 </simpara>
569               </listitem>
570             </varlistentry>
571
572           </variablelist>
573
574         </para>
575
576         <para>
577           The <option>--iallocator</option> option specifies the instance
578           allocator plugin to use. If you pass in this option the allocator
579           will select nodes for this instance automatically, so you don't need
580           to pass them with the <option>-n</option> option. For more
581           information please refer to the instance allocator documentation.
582         </para>
583
584         <para>
585           The <option>-t</option> options specifies the disk layout type for
586           the instance. The available choices are:
587           <variablelist>
588             <varlistentry>
589               <term>diskless</term>
590               <listitem>
591                 <para>
592                   This creates an instance with no disks. Its useful for
593                   testing only (or other special cases).
594                 </para>
595               </listitem>
596             </varlistentry>
597             <varlistentry>
598               <term>file</term>
599               <listitem>
600                 <para>Disk devices will be regular files.</para>
601               </listitem>
602             </varlistentry>
603             <varlistentry>
604               <term>plain</term>
605               <listitem>
606                 <para>Disk devices will be logical volumes.</para>
607               </listitem>
608             </varlistentry>
609             <varlistentry>
610               <term>drbd</term>
611               <listitem>
612                 <para>
613                   Disk devices will be drbd (version 8.x) on top of
614                   lvm volumes.
615                 </para>
616               </listitem>
617             </varlistentry>
618           </variablelist>
619         </para>
620
621         <para>
622           The optional second value of the <option>--node</option> is used for
623           the drbd template type and specifies the remote node.
624         </para>
625
626         <para>
627           If you do not want gnt-instance to wait for the disk mirror
628           to be synced, use the <option>--no-wait-for-sync</option>
629           option.
630         </para>
631
632         <para>
633           The <option>--file-storage-dir</option> specifies the relative path
634           under the cluster-wide file storage directory to store file-based
635           disks. It is useful for having different subdirectories for
636           different instances. The full path of the directory where the disk
637           files are stored will consist of cluster-wide file storage directory
638           + optional subdirectory + instance name. Example:
639           /srv/ganeti/file-storage/mysubdir/instance1.example.com. This option
640           is only relevant for instances using the file storage backend.
641         </para>
642
643         <para>
644           The <option>--file-driver</option> specifies the driver to use for
645           file-based disks. Note that currently these drivers work with the
646           xen hypervisor only. This option is only relevant for instances using
647           the file storage backend. The available choices are:
648           <variablelist>
649             <varlistentry>
650               <term>loop</term>
651               <listitem>
652                 <para>
653                   Kernel loopback driver. This driver uses loopback
654                   devices to access the filesystem within the
655                   file. However, running I/O intensive applications in
656                   your instance using the loop driver might result in
657                   slowdowns.  Furthermore, if you use the loopback
658                   driver consider increasing the maximum amount of
659                   loopback devices (on most systems it's 8) using the
660                   max_loop param.
661                 </para>
662               </listitem>
663             </varlistentry>
664             <varlistentry>
665               <term>blktap</term>
666               <listitem>
667                 <para>The blktap driver (for Xen hypervisors). In
668                 order to be able to use the blktap driver you should
669                 check if the 'blktapctrl' user space disk agent is
670                 running (usually automatically started via xend). This
671                 user-level disk I/O interface has the advantage of
672                 better performance. Especially if you use a network
673                 file system (e.g. NFS) to store your instances this is
674                 the recommended choice.
675                 </para>
676               </listitem>
677             </varlistentry>
678           </variablelist>
679         </para>
680
681         <para>
682           The <option>--submit</option> option is used to send the job to
683           the master daemon but not wait for its completion. The job
684           ID will be shown so that it can be examined via
685           <command>gnt-job info</command>.
686         </para>
687
688         <para>
689           Example:
690           <screen>
691 # gnt-instance add -t file --disk 0:size=30g -B memory=512 -o debian-etch \
692   -n node1.example.com --file-storage-dir=mysubdir instance1.example.com
693 # gnt-instance add -t plain --disk 0:size=30g -B memory=512 -o debian-etch \
694   -n node1.example.com instance1.example.com
695 # gnt-instance add -t drbd --disk 0:size=30g -B memory=512 -o debian-etch \
696   -n node1.example.com:node2.example.com instance2.example.com
697           </screen>
698         </para>
699       </refsect3>
700
701       <refsect3>
702         <title>BATCH-CREATE</title>
703         <cmdsynopsis>
704           <command>batch-create</command>
705           <arg choice="req">instances_file.json</arg>
706         </cmdsynopsis>
707
708         <para>
709           This command (similar to the Ganeti 1.2
710           <command>batcher</command> tool) submits multiple instance
711           creation jobs based on a definition file. The instance
712           configurations do not encompass all the possible options for
713           the <command>add</command> command, but only a subset.
714         </para>
715
716         <para>
717           The instance file should be a valid-formed JSON file,
718           containing a dictionary with instance name and instance
719           parameters. The accepted parameters are:
720
721           <variablelist>
722             <varlistentry>
723               <term>disk_size</term>
724               <listitem>
725                 <simpara>The size of the disks of the instance.</simpara>
726               </listitem>
727             </varlistentry>
728             <varlistentry>
729               <term>disk_templace</term>
730               <listitem>
731                 <simpara>The disk template to use for the instance,
732                 the same as in the <command>add</command>
733                 command.</simpara>
734               </listitem>
735             </varlistentry>
736             <varlistentry>
737               <term>backend</term>
738               <listitem>
739                 <simpara>A dictionary of backend parameters.</simpara>
740               </listitem>
741             </varlistentry>
742             <varlistentry>
743               <term>hypervisor</term>
744               <listitem>
745                 <simpara>A dictionary with a single key (the
746                 hypervisor name), and as value the hypervisor
747                 options. If not passed, the default hypervisor and
748                 hypervisor options will be inherited.</simpara>
749               </listitem>
750             </varlistentry>
751             <varlistentry>
752               <term>mac, ip, mode, link</term>
753               <listitem>
754                 <simpara>Specifications for the one NIC that will be
755                 created for the instance. 'bridge' is also accepted
756                 as a backwards compatibile key.</simpara>
757               </listitem>
758             </varlistentry>
759             <varlistentry>
760               <term>nics</term>
761               <listitem>
762                 <simpara>List of nics that will be created for the
763                 instance. Each entry should be a dict, with mac, ip, mode
764                 and link as possible keys. Please don't provide the "mac,
765                 ip, mode, link" parent keys if you use this method for
766                 specifying nics.</simpara>
767               </listitem>
768             </varlistentry>
769             <varlistentry>
770               <term>primary_node, secondary_node</term>
771               <listitem>
772                 <simpara>The primary and optionally the secondary node
773                 to use for the instance (in case an iallocator script
774                 is not used).</simpara>
775               </listitem>
776             </varlistentry>
777             <varlistentry>
778               <term>iallocator</term>
779               <listitem>
780                 <simpara>Instead of specifying the nodes, an
781                 iallocator script can be used to automatically compute
782                 them.</simpara>
783               </listitem>
784             </varlistentry>
785             <varlistentry>
786               <term>start</term>
787               <listitem>
788                 <simpara>whether to start the instance</simpara>
789               </listitem>
790             </varlistentry>
791             <varlistentry>
792               <term>ip_check</term>
793               <listitem>
794                 <simpara>Skip the check for already-in-use instance;
795                 see the description in the <command>add</command>
796                 command for details.</simpara>
797               </listitem>
798             </varlistentry>
799             <varlistentry>
800               <term>name_check</term>
801               <listitem>
802                 <simpara>Skip the name check for instances;
803                 see the description in the <command>add</command>
804                 command for details.</simpara>
805               </listitem>
806             </varlistentry>
807             <varlistentry>
808               <term>file_storage_dir, file_driver</term>
809               <listitem>
810                 <simpara>Configuration for the <literal>file</literal>
811                 disk type, see the <command>add</command> command for
812                 details.</simpara>
813               </listitem>
814             </varlistentry>
815           </variablelist>
816         </para>
817
818         <para>
819           A simple definition for one instance can be (with most of
820           the parameters taken from the cluster defaults):
821           <screen>
822 {
823   "instance3": {
824     "template": "drbd",
825     "os": "debootstrap",
826     "disk_size": ["25G"],
827     "iallocator": "dumb"
828   },
829   "instance5": {
830     "template": "drbd",
831     "os": "debootstrap",
832     "disk_size": ["25G"],
833     "iallocator": "dumb",
834     "hypervisor": "xen-hvm",
835     "hvparams": {"acpi": true},
836     "backend": {"memory": 512}
837   }
838 }
839 </screen>
840         </para>
841
842         <para>
843           The command will display the job id for each submitted instance, as follows:
844           <screen>
845 # gnt-instance batch-create instances.json
846 instance3: 11224
847 instance5: 11225
848 </screen>
849         </para>
850
851       </refsect3>
852
853       <refsect3>
854         <title>REMOVE</title>
855
856         <cmdsynopsis>
857           <command>remove</command>
858           <arg>--ignore-failures</arg>
859           <arg>--shutdown-timeout=<replaceable>N</replaceable></arg>
860           <arg>--submit</arg>
861           <arg choice="req"><replaceable>instance</replaceable></arg>
862         </cmdsynopsis>
863
864         <para>
865           Remove an instance. This will remove all data from the
866           instance and there is <emphasis>no way back</emphasis>. If
867           you are not sure if you use an instance again, use
868           <command>shutdown</command> first and leave it in the
869           shutdown state for a while.
870
871         </para>
872
873         <para>
874           The <option>--ignore-failures</option> option will cause the
875           removal to proceed even in the presence of errors during the
876           removal of the instance (e.g. during the shutdown or the
877           disk removal). If this option is not given, the command will
878           stop at the first error.
879         </para>
880
881         <para>
882           The <option>--shutdown-timeout</option> is used to specify how
883           much time to wait before forcing the shutdown (xm destroy in xen,
884           killing the kvm process, for kvm). By default two minutes are
885           given to each instance to stop.
886         </para>
887
888         <para>
889           The <option>--submit</option> option is used to send the job to
890           the master daemon but not wait for its completion. The job
891           ID will be shown so that it can be examined via
892           <command>gnt-job info</command>.
893         </para>
894
895         <para>
896           Example:
897           <screen>
898 # gnt-instance remove instance1.example.com
899           </screen>
900         </para>
901       </refsect3>
902
903       <refsect3>
904         <title>LIST</title>
905
906         <cmdsynopsis>
907           <command>list</command>
908           <arg>--no-headers</arg>
909           <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
910           <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
911           <arg rep="repeat">instance</arg>
912         </cmdsynopsis>
913
914         <para>
915           Shows the currently configured instances with memory usage,
916           disk usage, the node they are running on, and their run
917           status.
918         </para>
919
920         <para>
921           The <option>--no-headers</option> option will skip the
922           initial header line. The <option>--separator</option> option
923           takes an argument which denotes what will be used between
924           the output fields. Both these options are to help scripting.
925         </para>
926
927         <para>
928           The <option>-o</option> option takes a comma-separated list
929           of output fields. The available fields and their meaning
930           are:
931           <variablelist>
932             <varlistentry>
933               <term>name</term>
934               <listitem>
935                 <simpara>the instance name</simpara>
936               </listitem>
937             </varlistentry>
938             <varlistentry>
939               <term>os</term>
940               <listitem>
941                 <simpara>the OS of the instance</simpara>
942               </listitem>
943             </varlistentry>
944             <varlistentry>
945               <term>pnode</term>
946               <listitem>
947                 <simpara>the primary node of the instance</simpara>
948               </listitem>
949             </varlistentry>
950             <varlistentry>
951               <term>snodes</term>
952               <listitem>
953                 <simpara>comma-separated list of secondary nodes for the
954                   instance; usually this will be just one node</simpara>
955               </listitem>
956             </varlistentry>
957             <varlistentry>
958               <term>admin_state</term>
959               <listitem>
960                 <simpara>the desired state of the instance (either "yes"
961                   or "no" denoting the instance should run or
962                   not)</simpara>
963               </listitem>
964             </varlistentry>
965             <varlistentry>
966               <term>disk_template</term>
967               <listitem>
968                 <simpara>the disk template of the instance</simpara>
969               </listitem>
970             </varlistentry>
971             <varlistentry>
972               <term>oper_state</term>
973               <listitem>
974                 <simpara>the actual state of the instance; can be
975                 one of the values "running", "stopped", "(node
976                 down)"</simpara>
977               </listitem>
978             </varlistentry>
979             <varlistentry>
980               <term>status</term>
981               <listitem>
982                 <simpara>combined form of admin_state and oper_stat;
983                 this can be one of:
984                 <computeroutput>ERROR_nodedown</computeroutput> if the
985                 node of the instance is down,
986                 <computeroutput>ERROR_down</computeroutput> if the
987                 instance should run but is down,
988                 <computeroutput>ERROR_up</computeroutput> if the
989                 instance should be stopped but is actually running,
990                 <computeroutput>ADMIN_down</computeroutput> if the
991                 instance has been stopped (and is stopped) and
992                 <computeroutput>running</computeroutput> if the
993                 instance is set to be running (and is
994                 running)</simpara>
995               </listitem>
996             </varlistentry>
997             <varlistentry>
998               <term>oper_ram</term>
999               <listitem>
1000                 <simpara>the actual memory usage of the instance as seen
1001                   by the hypervisor</simpara>
1002               </listitem>
1003             </varlistentry>
1004             <varlistentry>
1005               <term>ip</term>
1006               <listitem>
1007                 <simpara>the ip address ganeti recognizes as associated with
1008                 the first instance interface</simpara>
1009               </listitem>
1010             </varlistentry>
1011             <varlistentry>
1012               <term>mac</term>
1013               <listitem>
1014                 <simpara>the first instance interface MAC address</simpara>
1015               </listitem>
1016             </varlistentry>
1017
1018             <varlistentry>
1019               <term>nic_mode</term>
1020               <listitem>
1021                 <simpara>the mode of the first instance NIC
1022                 (routed or bridged)</simpara>
1023               </listitem>
1024             </varlistentry>
1025             <varlistentry>
1026               <term>nic_link</term>
1027               <listitem>
1028                 <simpara>the link of the first instance NIC
1029                 </simpara>
1030               </listitem>
1031             </varlistentry>
1032             <varlistentry>
1033               <term>sda_size</term>
1034               <listitem>
1035                 <simpara>the size of the instance's first disk</simpara>
1036               </listitem>
1037             </varlistentry>
1038             <varlistentry>
1039               <term>sdb_size</term>
1040               <listitem>
1041                 <simpara>the size of the instance's second disk, if
1042                 any</simpara>
1043               </listitem>
1044             </varlistentry>
1045             <varlistentry>
1046               <term>vcpus</term>
1047               <listitem>
1048                 <simpara>the number of VCPUs allocated to the
1049                 instance</simpara>
1050               </listitem>
1051             </varlistentry>
1052             <varlistentry>
1053               <term>tags</term>
1054               <listitem>
1055                 <simpara>comma-separated list of the instances's
1056                 tags</simpara>
1057               </listitem>
1058             </varlistentry>
1059             <varlistentry>
1060               <term>serial_no</term>
1061               <listitem>
1062                 <simpara>the so called 'serial number' of the
1063                 instance; this is a numeric field that is incremented
1064                 each time the instance is modified, and it can be used
1065                 to track modifications</simpara>
1066               </listitem>
1067             </varlistentry>
1068             <varlistentry>
1069               <term>ctime</term>
1070               <listitem>
1071                 <para>
1072                   the creation time of the instance; note that this
1073                   field contains spaces and as such it's harder to
1074                   parse
1075                 </para>
1076                 <para>
1077                   if this attribute is not present (e.g. when
1078                   upgrading from older versions), then "N/A" will be
1079                   shown instead
1080                 </para>
1081               </listitem>
1082             </varlistentry>
1083             <varlistentry>
1084               <term>mtime</term>
1085               <listitem>
1086                 <para>
1087                   the last modification time of the instance; note
1088                   that this field contains spaces and as such it's
1089                   harder to parse
1090                 </para>
1091                 <para>
1092                   if this attribute is not present (e.g. when
1093                   upgrading from older versions), then "N/A" will be
1094                   shown instead
1095                 </para>
1096               </listitem>
1097             </varlistentry>
1098
1099             <varlistentry>
1100               <term>uuid</term>
1101               <listitem>
1102                 <simpara>Show the UUID of the instance (generated
1103                 automatically by Ganeti)</simpara>
1104               </listitem>
1105             </varlistentry>
1106
1107             <varlistentry>
1108               <term>network_port</term>
1109               <listitem>
1110                 <simpara>If the instance has a network port assigned
1111                 to it (e.g. for VNC connections), this will be shown,
1112                 otherwise <literal>-</literal> will be
1113                 displayed.</simpara>
1114               </listitem>
1115             </varlistentry>
1116             <varlistentry>
1117               <term>beparams</term>
1118               <listitem>
1119                 <simpara>A text format of the entire beparams for the
1120                 instance. It's more useful to select individual fields
1121                 from this dictionary, see below.</simpara>
1122               </listitem>
1123             </varlistentry>
1124             <varlistentry>
1125               <term>disk.count</term>
1126               <listitem>
1127                 <simpara>The number of instance disks.</simpara>
1128               </listitem>
1129             </varlistentry>
1130             <varlistentry>
1131               <term>disk.size/N</term>
1132               <listitem>
1133                 <simpara>The size of the instance's Nth disk. This is
1134                 a more generic form of the <literal>sda_size</literal>
1135                 and <literal>sdb_size</literal> fields.</simpara>
1136               </listitem>
1137             </varlistentry>
1138             <varlistentry>
1139               <term>disk.sizes</term>
1140               <listitem>
1141                 <simpara>A comma-separated list of the disk sizes for
1142                 this instance.</simpara>
1143               </listitem>
1144             </varlistentry>
1145             <varlistentry>
1146               <term>disk_usage</term>
1147               <listitem>
1148                 <simpara>The total disk space used by this instance on
1149                 each of its nodes. This is not the instance-visible
1150                 disk size, but the actual disk "cost" of the
1151                 instance.</simpara>
1152               </listitem>
1153             </varlistentry>
1154             <varlistentry>
1155               <term>nic.mac/N</term>
1156               <listitem>
1157                 <simpara>The MAC of the Nth instance NIC.</simpara>
1158               </listitem>
1159             </varlistentry>
1160             <varlistentry>
1161               <term>nic.ip/N</term>
1162               <listitem>
1163                 <simpara>The IP address of the Nth instance NIC.</simpara>
1164               </listitem>
1165             </varlistentry>
1166             <varlistentry>
1167               <term>nic.mode/N</term>
1168               <listitem>
1169                 <simpara>The mode of the Nth instance NIC</simpara>
1170               </listitem>
1171             </varlistentry>
1172             <varlistentry>
1173               <term>nic.link/N</term>
1174               <listitem>
1175                 <simpara>The link of the Nth instance NIC</simpara>
1176               </listitem>
1177             </varlistentry>
1178             <varlistentry>
1179               <term>nic.macs</term>
1180               <listitem>
1181                 <simpara>A comma-separated list of all the MACs of the
1182                 instance's NICs.</simpara>
1183               </listitem>
1184             </varlistentry>
1185             <varlistentry>
1186               <term>nic.ips</term>
1187               <listitem>
1188                 <simpara>A comma-separated list of all the IP
1189                 addresses of the instance's NICs.</simpara>
1190               </listitem>
1191             </varlistentry>
1192             <varlistentry>
1193               <term>nic.modes</term>
1194               <listitem>
1195                 <simpara>A comma-separated list of all the modes of the
1196                 instance's NICs.</simpara>
1197               </listitem>
1198             </varlistentry>
1199             <varlistentry>
1200               <term>nic.links</term>
1201               <listitem>
1202                 <simpara>A comma-separated list of all the link parameters
1203                 of the instance's NICs.</simpara>
1204               </listitem>
1205             </varlistentry>
1206             <varlistentry>
1207               <term>nic.count</term>
1208               <listitem>
1209                 <simpara>The number of instance nics.</simpara>
1210               </listitem>
1211             </varlistentry>
1212             <varlistentry>
1213               <term>hv/<replaceable>NAME</replaceable></term>
1214               <listitem>
1215                 <simpara>The value of the hypervisor parameter called
1216                 <replaceable>NAME</replaceable>. For details of what
1217                 hypervisor parameters exist and their meaning, see the
1218                 <command>add</command> command.</simpara>
1219               </listitem>
1220             </varlistentry>
1221             <varlistentry>
1222               <term>be/memory</term>
1223               <listitem>
1224                 <simpara>The configured memory for the instance.</simpara>
1225               </listitem>
1226             </varlistentry>
1227             <varlistentry>
1228               <term>be/vcpus</term>
1229               <listitem>
1230                 <simpara>The configured number of VCPUs for the
1231                 instance.</simpara>
1232               </listitem>
1233             </varlistentry>
1234             <varlistentry>
1235               <term>be/auto_balance</term>
1236               <listitem>
1237                 <simpara>Whether the instance is considered in N+1
1238                 checks.</simpara>
1239               </listitem>
1240             </varlistentry>
1241           </variablelist>
1242         </para>
1243
1244         <para>
1245           If the value of the option starts with the character
1246           <constant>+</constant>, the new field(s) will be added to the
1247           default list. This allows to quickly see the default list
1248           plus a few other fields, instead of retyping the entire list
1249           of fields.
1250         </para>
1251
1252         <para>
1253           There is a subtle grouping about the available output
1254           fields: all fields except for <option>oper_state</option>,
1255           <option>oper_ram</option> and <option>status</option> are
1256           configuration value and not run-time values. So if you don't
1257           select any of the these fields, the query will be satisfied
1258           instantly from the cluster configuration, without having to
1259           ask the remote nodes for the data. This can be helpful for
1260           big clusters when you only want some data and it makes sense
1261           to specify a reduced set of output fields.
1262         </para>
1263
1264         <para>The default output field list is:
1265           <simplelist type="inline">
1266             <member>name</member>
1267             <member>os</member>
1268             <member>pnode</member>
1269             <member>admin_state</member>
1270             <member>oper_state</member>
1271             <member>oper_ram</member>
1272           </simplelist>.
1273         </para>
1274       </refsect3>
1275
1276       <refsect3>
1277         <title>INFO</title>
1278
1279         <cmdsynopsis>
1280           <command>info</command>
1281           <group>
1282             <arg>-s</arg>
1283             <arg>--static</arg>
1284           </group>
1285           <group choice="req">
1286             <arg>--all</arg>
1287             <arg rep="repeat"><replaceable>instance</replaceable></arg>
1288           </group>
1289         </cmdsynopsis>
1290
1291         <para>
1292           Show detailed information about the given instance(s). This is
1293           different from <command>list</command> as it shows detailed data
1294           about the instance's disks (especially useful for the drbd disk
1295           template).
1296         </para>
1297
1298         <para>
1299           If the option <option>-s</option> is used, only information
1300           available in the configuration file is returned, without
1301           querying nodes, making the operation faster.
1302         </para>
1303
1304         <para>
1305           Use the <option>--all</option> to get info about all instances,
1306           rather than explicitely passing the ones you're interested in.
1307         </para>
1308       </refsect3>
1309
1310       <refsect3>
1311         <title>MODIFY</title>
1312
1313         <cmdsynopsis>
1314           <command>modify</command>
1315           <sbr>
1316           <arg choice="opt">-H <replaceable>HYPERVISOR_PARAMETERS</replaceable></arg>
1317           <sbr>
1318           <arg choice="opt">-B <replaceable>BACKEND_PARAMETERS</replaceable></arg>
1319           <sbr>
1320           <group>
1321             <arg>--net add<replaceable><optional>:options</optional></replaceable></arg>
1322             <arg>--net remove</arg>
1323             <arg>--net <replaceable>N:options</replaceable></arg>
1324           </group>
1325           <sbr>
1326           <group>
1327             <arg>--disk add:size=<replaceable>SIZE</replaceable></arg>
1328             <arg>--disk remove</arg>
1329             <arg>--disk <replaceable>N</replaceable>:mode=<replaceable>MODE</replaceable></arg>
1330           </group>
1331
1332           <sbr>
1333           <arg>--submit</arg>
1334           <sbr>
1335           <arg choice="req"><replaceable>instance</replaceable></arg>
1336         </cmdsynopsis>
1337
1338         <para>
1339           Modifies the memory size, number of vcpus, ip address, MAC
1340           address and/or nic parameters for an instance. It can also
1341           add and remove disks and NICs to/from the instance. Note
1342           that you need to give at least one of the arguments, otherwise
1343           the command complains.
1344         </para>
1345
1346         <para>
1347           The <option>-H</option> option specifies hypervisor options
1348           in the form of <userinput>name=value[,...]</userinput>. For details which options can be specified, see the <command>add</command> command.
1349         </para>
1350
1351         <para>
1352           The <option>--disk
1353           add:size=<replaceable>SIZE</replaceable></option> option
1354           adds a disk to the instance. The <option>--disk
1355           remove</option> will remove the last disk of the
1356           instance. The <option>--disk
1357           <replaceable>N</replaceable>:mode=<replaceable>MODE</replaceable></option>
1358           option will change the mode of the Nth disk of the instance
1359           between read-only (<literal>ro</literal>) and read-write
1360           (<literal>rw</literal>).
1361         </para>
1362
1363         <para>
1364           The <option>--net
1365           add:<replaceable>options</replaceable></option> option will
1366           add a new NIC to the instance. The available options are the
1367           same as in the <command>add</command> command (mac, ip, link,
1368           mode). The <option>--net remove</option> will remove the
1369           last NIC of the instance, while the <option>--net
1370           <replaceable>N</replaceable>:<replaceable>options</replaceable></option>
1371           option will change the parameters of the Nth instance NIC.
1372         </para>
1373
1374         <para>
1375           The <option>--submit</option> option is used to send the job to
1376           the master daemon but not wait for its completion. The job
1377           ID will be shown so that it can be examined via
1378           <command>gnt-job info</command>.
1379         </para>
1380
1381         <para>
1382           All the changes take effect at the next restart. If the
1383           instance is running, there is no effect on the instance.
1384         </para>
1385       </refsect3>
1386
1387       <refsect3>
1388         <title>REINSTALL</title>
1389
1390         <cmdsynopsis>
1391           <command>reinstall</command>
1392           <arg choice="opt">-o <replaceable>os-type</replaceable></arg>
1393           <arg>--select-os</arg>
1394           <arg choice="opt">-f <replaceable>force</replaceable></arg>
1395           <arg>--force-multiple</arg>
1396           <sbr>
1397           <group choice="opt">
1398             <arg>--instance</arg>
1399             <arg>--node</arg>
1400             <arg>--primary</arg>
1401             <arg>--secondary</arg>
1402             <arg>--all</arg>
1403           </group>
1404           <arg>--submit</arg>
1405           <arg choice="opt" rep="repeat"><replaceable>instance</replaceable></arg>
1406         </cmdsynopsis>
1407
1408         <para>
1409           Reinstalls the operating system on the given instance(s). The
1410           instance(s) must be stopped when running this command. If the
1411           <option>--os-type</option> is specified, the operating
1412           system is changed.
1413         </para>
1414
1415         <para>
1416           The <option>--select-os</option> option switches to an
1417           interactive OS reinstall. The user is prompted to select the OS
1418           template from the list of available OS templates.
1419         </para>
1420
1421         <para>
1422           Since this is a potentially dangerous command, the user will
1423           be required to confirm this action, unless the
1424           <option>-f</option> flag is passed. When multiple instances
1425           are selected (either by passing multiple arguments or by
1426           using the <option>--node</option>,
1427           <option>--primary</option>, <option>--secondary</option> or
1428           <option>--all</option> options), the user must pass both the
1429           <option>--force</option> and
1430           <option>--force-multiple</option> options to skip the
1431           interactive confirmation.
1432         </para>
1433
1434         <para>
1435           The <option>--submit</option> option is used to send the job to
1436           the master daemon but not wait for its completion. The job
1437           ID will be shown so that it can be examined via
1438           <command>gnt-job info</command>.
1439         </para>
1440
1441
1442       </refsect3>
1443
1444       <refsect3>
1445         <title>RENAME</title>
1446
1447         <cmdsynopsis>
1448           <command>rename</command>
1449           <arg>--no-ip-check</arg>
1450           <arg>--submit</arg>
1451           <arg choice="req"><replaceable>instance</replaceable></arg>
1452           <arg choice="req"><replaceable>new_name</replaceable></arg>
1453         </cmdsynopsis>
1454
1455         <para>
1456           Renames the given instance. The instance must be stopped
1457           when running this command. The requirements for the new name
1458           are the same as for adding an instance: the new name must be
1459           resolvable and the IP it resolves to must not be reachable
1460           (in order to prevent duplicate IPs the next time the
1461           instance is started). The IP test can be skipped if the
1462           <option>--no-ip-check</option> option is passed.
1463         </para>
1464
1465         <para>
1466           The <option>--submit</option> option is used to send the job to
1467           the master daemon but not wait for its completion. The job
1468           ID will be shown so that it can be examined via
1469           <command>gnt-job info</command>.
1470         </para>
1471
1472       </refsect3>
1473
1474     </refsect2>
1475
1476     <refsect2>
1477       <title>Starting/stopping/connecting to console</title>
1478
1479       <refsect3>
1480         <title>STARTUP</title>
1481
1482         <cmdsynopsis>
1483           <command>startup</command>
1484           <sbr>
1485           <arg>--force</arg>
1486           <sbr>
1487           <arg>--force-multiple</arg>
1488           <sbr>
1489           <group choice="opt">
1490             <arg>--instance</arg>
1491             <arg>--node</arg>
1492             <arg>--primary</arg>
1493             <arg>--secondary</arg>
1494             <arg>--all</arg>
1495             <arg>--tags</arg>
1496             <arg>--node-tags</arg>
1497             <arg>--pri-node-tags</arg>
1498             <arg>--sec-node-tags</arg>
1499           </group>
1500           <sbr>
1501           <arg>-H <option>key=value...</option></arg>
1502           <arg>-B <option>key=value...</option></arg>
1503           <sbr>
1504           <arg>--submit</arg>
1505           <sbr>
1506           <arg choice="opt"
1507           rep="repeat"><replaceable>name</replaceable></arg>
1508         </cmdsynopsis>
1509
1510         <para>
1511           Starts one or more instances, depending on the following
1512           options. The four available modes are:
1513           <variablelist>
1514             <varlistentry>
1515               <term><option>--instance</option></term>
1516               <listitem>
1517                 <simpara>will start the instances given as arguments
1518                 (at least one argument required); this is the default
1519                 selection</simpara>
1520               </listitem>
1521             </varlistentry>
1522             <varlistentry>
1523               <term>--node</term>
1524               <listitem>
1525                 <simpara>will start the instances who have the given
1526                 node as either primary or secondary</simpara>
1527               </listitem>
1528             </varlistentry>
1529             <varlistentry>
1530               <term><option>--primary</option></term>
1531               <listitem>
1532                 <simpara>will start all instances whose primary node
1533                 is in the list of nodes passed as arguments (at least
1534                 one node required)</simpara>
1535               </listitem>
1536             </varlistentry>
1537             <varlistentry>
1538               <term><option>--secondary</option></term>
1539               <listitem>
1540                 <simpara>will start all instances whose secondary node
1541                 is in the list of nodes passed as arguments (at least
1542                 one node required)</simpara>
1543               </listitem>
1544             </varlistentry>
1545             <varlistentry>
1546               <term>--all</term>
1547               <listitem>
1548                 <simpara>will start all instances in the cluster (no
1549                 arguments accepted)</simpara>
1550               </listitem>
1551             </varlistentry>
1552             <varlistentry>
1553               <term>--tags</term>
1554               <listitem>
1555                 <simpara>will start all instances in the cluster with
1556                 the tags given as arguments</simpara>
1557               </listitem>
1558             </varlistentry>
1559             <varlistentry>
1560               <term>--node-tags</term>
1561               <listitem>
1562                 <simpara>will start all instances in the cluster on
1563                 nodes with the tags given as arguments</simpara>
1564               </listitem>
1565             </varlistentry>
1566             <varlistentry>
1567               <term>--pri-node-tags</term>
1568               <listitem>
1569                 <simpara>will start all instances in the cluster on
1570                 primary nodes with the tags given as
1571                 arguments</simpara>
1572               </listitem>
1573             </varlistentry>
1574             <varlistentry>
1575               <term>--sec-node-tags</term>
1576               <listitem>
1577                 <simpara>will start all instances in the cluster on
1578                 secondary nodes with the tags given as
1579                 arguments</simpara>
1580               </listitem>
1581             </varlistentry>
1582           </variablelist>
1583         </para>
1584
1585         <para>
1586           Note that although you can pass more than one selection
1587           option, the last one wins, so in order to guarantee the
1588           desired result, don't pass more than one such option.
1589         </para>
1590
1591         <para>
1592           Use <option>--force</option> to start even if secondary disks are
1593           failing.
1594         </para>
1595
1596         <para>
1597           The <option>--force-multiple</option> will skip the
1598           interactive confirmation in the case the more than one
1599           instance will be affected.
1600         </para>
1601
1602         <para>
1603           The <option>-H</option> and <option>-B</option> options
1604           specify temporary hypervisor and backend parameters that can
1605           be used to start an instance with modified parameters. They
1606           can be useful for quick testing without having to modify an
1607           instance back and forth, e.g.:
1608           <screen>
1609 # gnt-instance start -H root_args="single" instance1
1610 # gnt-instance start -B memory=2048 instance2
1611           </screen>
1612           The first form will start the instance
1613           <userinput>instance1</userinput> in single-user mode, and
1614           the instance <userinput>instance2</userinput> with 2GB of
1615           RAM (this time only, unless that is the actual instance
1616           memory size already). Note that the values override the
1617           instance parameters (and not extend them): an instance with
1618           "root_args=ro" when started with <userinput>-H
1619           root_args=single</userinput> will result in "single", not
1620           "ro single".
1621         </para>
1622
1623         <para>
1624           The <option>--submit</option> option is used to send the job to
1625           the master daemon but not wait for its completion. The job
1626           ID will be shown so that it can be examined via
1627           <command>gnt-job info</command>.
1628         </para>
1629
1630         <para>
1631           Example:
1632           <screen>
1633 # gnt-instance start instance1.example.com
1634 # gnt-instance start --node node1.example.com node2.example.com
1635 # gnt-instance start --all
1636           </screen>
1637         </para>
1638       </refsect3>
1639
1640       <refsect3>
1641         <title>SHUTDOWN</title>
1642
1643         <cmdsynopsis>
1644           <command>shutdown</command>
1645           <sbr>
1646           <arg>--timeout=<replaceable>N</replaceable></arg>
1647           <sbr>
1648           <arg>--force-multiple</arg>
1649           <sbr>
1650           <group choice="opt">
1651             <arg>--instance</arg>
1652             <arg>--node</arg>
1653             <arg>--primary</arg>
1654             <arg>--secondary</arg>
1655             <arg>--all</arg>
1656             <arg>--tags</arg>
1657             <arg>--node-tags</arg>
1658             <arg>--pri-node-tags</arg>
1659             <arg>--sec-node-tags</arg>
1660           </group>
1661           <sbr>
1662           <arg>--submit</arg>
1663           <sbr>
1664           <arg choice="opt"
1665           rep="repeat"><replaceable>name</replaceable></arg>
1666         </cmdsynopsis>
1667
1668         <para>
1669           Stops one or more instances. If the instance cannot be
1670           cleanly stopped during a hardcoded interval (currently 2
1671           minutes), it will forcibly stop the instance (equivalent to
1672           switching off the power on a physical machine).
1673         </para>
1674
1675         <para>
1676           The <option>--timeout</option> is used to specify how much time to
1677           wait before forcing the shutdown (xm destroy in xen, killing the kvm
1678           process, for kvm). By default two minutes are given to each instance
1679           to stop.
1680         </para>
1681
1682         <para>
1683           The <option>--instance</option>, <option>--node</option>,
1684           <option>--primary</option>, <option>--secondary</option>,
1685           <option>--all</option>, <option>--tags</option>,
1686           <option>--node-tags</option>, <option>--pri-node-tags</option> and
1687           <option>--sec-node-tags</option> options are similar as for the
1688           <command>startup</command> command and they influence the
1689           actual instances being shutdown.
1690         </para>
1691
1692         <para>
1693           The <option>--submit</option> option is used to send the job to
1694           the master daemon but not wait for its completion. The job
1695           ID will be shown so that it can be examined via
1696           <command>gnt-job info</command>.
1697         </para>
1698
1699
1700         <para>
1701           Example:
1702           <screen>
1703 # gnt-instance shutdown instance1.example.com
1704 # gnt-instance shutdown --all
1705           </screen>
1706         </para>
1707       </refsect3>
1708
1709       <refsect3>
1710         <title>REBOOT</title>
1711
1712         <cmdsynopsis>
1713           <command>reboot</command>
1714           <sbr>
1715           <arg>--type=<replaceable>REBOOT-TYPE</replaceable></arg>
1716           <sbr>
1717           <arg>--ignore-secondaries</arg>
1718           <sbr>
1719           <arg>--shutdown-timeout=<replaceable>N</replaceable></arg>
1720           <sbr>
1721           <arg>--force-multiple</arg>
1722           <sbr>
1723           <group choice="opt">
1724             <arg>--instance</arg>
1725             <arg>--node</arg>
1726             <arg>--primary</arg>
1727             <arg>--secondary</arg>
1728             <arg>--all</arg>
1729             <arg>--tags</arg>
1730             <arg>--node-tags</arg>
1731             <arg>--pri-node-tags</arg>
1732             <arg>--sec-node-tags</arg>
1733           </group>
1734           <sbr>
1735           <arg>--submit</arg>
1736           <sbr>
1737           <arg choice="opt"
1738           rep="repeat"><replaceable>name</replaceable></arg>
1739         </cmdsynopsis>
1740
1741         <para>
1742           Reboots one or more instances. The type of reboot depends on
1743           the value of <option>--type</option>. A soft reboot does a
1744           hypervisor reboot, a hard reboot does a instance stop,
1745           recreates the hypervisor config for the instance and
1746           starts the instance. A full reboot does the equivalent
1747           of <command>gnt-instance shutdown &amp;&amp; gnt-instance
1748           startup</command>. The default is hard reboot.
1749         </para>
1750
1751         <para>
1752           For the hard reboot the option
1753           <option>--ignore-secondaries</option> ignores errors for the
1754           secondary node while re-assembling the instance disks.
1755         </para>
1756
1757         <para>
1758           The <option>--instance</option>, <option>--node</option>,
1759           <option>--primary</option>, <option>--secondary</option>,
1760           <option>--all</option>, <option>--tags</option>,
1761           <option>--node-tags</option>, <option>--pri-node-tags</option> and
1762           <option>--sec-node-tags</option> options are similar as for the
1763           <command>startup</command> command and they influence the
1764           actual instances being rebooted.
1765         </para>
1766
1767         <para>
1768           The <option>--shutdown-timeout</option> is used to specify how
1769           much time to wait before forcing the shutdown (xm destroy in xen,
1770           killing the kvm process, for kvm). By default two minutes are
1771           given to each instance to stop.
1772         </para>
1773
1774         <para>
1775           The <option>--force-multiple</option> will skip the
1776           interactive confirmation in the case the more than one
1777           instance will be affected.
1778         </para>
1779
1780         <para>
1781           Example:
1782           <screen>
1783 # gnt-instance reboot instance1.example.com
1784 # gnt-instance reboot --type=full instance1.example.com
1785           </screen>
1786         </para>
1787       </refsect3>
1788
1789       <refsect3>
1790         <title>CONSOLE</title>
1791         <cmdsynopsis>
1792           <command>console</command>
1793           <arg choice="opt">--show-cmd</arg>
1794           <arg choice="req"><replaceable>instance</replaceable></arg>
1795         </cmdsynopsis>
1796
1797         <para>
1798           Connects to the console of the given instance. If the
1799           instance is not up, an error is returned. Use the
1800           <option>--show-cmd</option> option to display the command
1801           instead of executing it.
1802         </para>
1803
1804         <para>
1805           For HVM instances, this will attempt to connect to the
1806           serial console of the instance. To connect to the
1807           virtualized "physical" console of a HVM instance, use a VNC
1808           client with the connection info from the
1809           <command>info</command> command.
1810         </para>
1811
1812         <para>
1813           Example:
1814           <screen>
1815 # gnt-instance console instance1.example.com
1816           </screen>
1817         </para>
1818       </refsect3>
1819
1820     </refsect2>
1821
1822     <refsect2>
1823       <title>Disk management</title>
1824
1825       <refsect3>
1826         <title>REPLACE-DISKS</title>
1827
1828         <cmdsynopsis>
1829           <command>replace-disks</command>
1830           <arg>--submit</arg>
1831           <arg choice="req">-p</arg>
1832           <arg>--disks <replaceable>idx</replaceable></arg>
1833           <arg choice="req"><replaceable>instance</replaceable></arg>
1834         </cmdsynopsis>
1835
1836         <cmdsynopsis>
1837           <command>replace-disks</command>
1838           <arg>--submit</arg>
1839           <arg choice="req">-s</arg>
1840           <arg>--disks <replaceable>idx</replaceable></arg>
1841           <arg choice="req"><replaceable>instance</replaceable></arg>
1842         </cmdsynopsis>
1843
1844         <cmdsynopsis>
1845           <command>replace-disks</command>
1846           <arg>--submit</arg>
1847           <group choice="req">
1848             <arg>--iallocator <replaceable>name</replaceable></arg>
1849             <arg>--new-secondary <replaceable>NODE</replaceable></arg>
1850           </group>
1851
1852           <arg choice="req"><replaceable>instance</replaceable></arg>
1853         </cmdsynopsis>
1854
1855         <cmdsynopsis>
1856           <command>replace-disks</command>
1857           <arg>--submit</arg>
1858           <arg choice="req">--auto</arg>
1859           <arg choice="req"><replaceable>instance</replaceable></arg>
1860         </cmdsynopsis>
1861
1862         <para>
1863           This command is a generalized form for replacing disks. It
1864           is currently only valid for the mirrored (DRBD) disk
1865           template.
1866         </para>
1867
1868         <para>
1869           The first form (when passing the <option>-p</option> option)
1870           will replace the disks on the primary, while the second form
1871           (when passing the <option>-s</option> option will replace
1872           the disks on the secondary node. For these two cases (as the
1873           node doesn't change), it is possible to only run the replace
1874           for a subset of the disks, using the option
1875           <option>--disks</option> which takes a list of
1876           comma-delimited disk indices (zero-based),
1877           e.g. <userinput>0,2</userinput> to replace only the first
1878           and third disks.
1879         </para>
1880
1881         <para>
1882           The third form (when passing either the
1883           <option>--iallocator</option> or the
1884           <option>--new-secondary</option> option) is designed to
1885           change secondary node of the instance.  Specifying
1886           <option>--iallocator</option> makes the new secondary be
1887           selected automatically by the specified allocator plugin,
1888           otherwise the new secondary node will be the one chosen
1889           manually via the <option>--new-secondary</option> option.
1890         </para>
1891
1892         <para>
1893           The fourth form (when using <option>--auto</option>) will
1894           automatically determine which disks of an instance are faulty and
1895           replace them within the same node. The <option>--auto</option>
1896           option works only when an instance has only faulty disks on
1897           either the primary or secondary node; it doesn't work when
1898           both sides have faulty disks.
1899         </para>
1900
1901         <para>
1902           The <option>--submit</option> option is used to send the job to
1903           the master daemon but not wait for its completion. The job
1904           ID will be shown so that it can be examined via
1905           <command>gnt-job info</command>.
1906         </para>
1907
1908         <para>
1909           Note that it is not possible to select an offline or drained
1910           node as a new secondary.
1911         </para>
1912
1913       </refsect3>
1914
1915       <refsect3>
1916         <title>ACTIVATE-DISKS</title>
1917
1918         <cmdsynopsis>
1919           <command>activate-disks</command>
1920           <arg>--submit</arg>
1921           <arg>--ignore-size</arg>
1922           <arg choice="req"><replaceable>instance</replaceable></arg>
1923         </cmdsynopsis>
1924         <para>
1925           Activates the block devices of the given instance. If
1926           successful, the command will show the location and name of
1927           the block devices:
1928           <screen>
1929 node1.example.com:disk/0:/dev/drbd0
1930 node1.example.com:disk/1:/dev/drbd1
1931           </screen>
1932
1933           In this example, <emphasis>node1.example.com</emphasis> is
1934           the name of the node on which the devices have been
1935           activated. The <emphasis>disk/0</emphasis> and
1936           <emphasis>disk/1</emphasis> are the Ganeti-names of the
1937           instance disks; how they are visible inside the instance is
1938           hypervisor-specific. <emphasis>/dev/drbd0</emphasis> and
1939           <emphasis>/dev/drbd1</emphasis> are the actual block devices
1940           as visible on the node.
1941         </para>
1942
1943         <para>
1944           The <option>--submit</option> option is used to send the job to
1945           the master daemon but not wait for its completion. The job
1946           ID will be shown so that it can be examined via
1947           <command>gnt-job info</command>.
1948         </para>
1949
1950         <para>
1951           The <option>--ignore-size</option> option can be used to
1952           activate disks ignoring the currently configured size in
1953           Ganeti. This can be used in cases where the configuration
1954           has gotten out of sync with the real-world (e.g. after a
1955           partially-failed grow-disk operation or due to rounding in
1956           LVM devices). This should not be used in normal cases, but
1957           only when activate-disks fails without it.
1958         </para>
1959
1960         <para>
1961           Note that it is safe to run this command while the instance
1962           is already running.
1963         </para>
1964       </refsect3>
1965
1966       <refsect3>
1967         <title>DEACTIVATE-DISKS</title>
1968
1969         <cmdsynopsis>
1970           <command>deactivate-disks</command>
1971           <arg>--submit</arg>
1972           <arg choice="req"><replaceable>instance</replaceable></arg>
1973         </cmdsynopsis>
1974         <para>
1975           De-activates the block devices of the given instance. Note
1976           that if you run this command for an instance with a drbd
1977           disk template, while it is running, it will not be able to
1978           shutdown the block devices on the primary node, but it will
1979           shutdown the block devices on the secondary nodes, thus
1980           breaking the replication.
1981         </para>
1982
1983         <para>
1984           The <option>--submit</option> option is used to send the job to
1985           the master daemon but not wait for its completion. The job
1986           ID will be shown so that it can be examined via
1987           <command>gnt-job info</command>.
1988         </para>
1989
1990       </refsect3>
1991
1992       <refsect3>
1993         <title>GROW-DISK</title>
1994         <cmdsynopsis>
1995           <command>grow-disk</command>
1996           <arg>--no-wait-for-sync</arg>
1997           <arg>--submit</arg>
1998           <arg choice="req"><replaceable>instance</replaceable></arg>
1999           <arg choice="req"><replaceable>disk</replaceable></arg>
2000           <arg choice="req"><replaceable>amount</replaceable></arg>
2001         </cmdsynopsis>
2002
2003         <para>
2004           Grows an instance's disk. This is only possible for
2005           instances having a <literal>plain</literal> or
2006           <literal>drbd</literal> disk template.
2007         </para>
2008
2009         <para>
2010           Note that this command only change the block device size; it
2011           will not grow the actual filesystems, partitions, etc. that
2012           live on that disk. Usually, you will need to:
2013           <orderedlist>
2014             <listitem>
2015               <simpara>use <command>gnt-instance grow-disk</command></simpara>
2016             </listitem>
2017             <listitem>
2018               <simpara>reboot the instance (later, at a convenient
2019               time)</simpara>
2020             </listitem>
2021             <listitem>
2022               <simpara>use a filesystem resizer, such as
2023               <citerefentry> <refentrytitle>ext2online</refentrytitle>
2024               <manvolnum>8</manvolnum> </citerefentry> or
2025               <citerefentry> <refentrytitle>xfs_growfs</refentrytitle>
2026               <manvolnum>8</manvolnum> </citerefentry> to resize the
2027               filesystem, or use <citerefentry>
2028               <refentrytitle>fdisk</refentrytitle>
2029               <manvolnum>8</manvolnum> </citerefentry> to change the
2030               partition table on the disk
2031               </simpara>
2032             </listitem>
2033           </orderedlist>
2034         </para>
2035
2036
2037         <para>
2038           The <replaceable>disk</replaceable> argument is the index of
2039           the instance disk to grow. The
2040           <replaceable>amount</replaceable> argument is given either
2041           as a number (and it represents the amount to increase the
2042           disk with in mebibytes) or can be given similar to the
2043           arguments in the create instance operation, with a suffix
2044           denoting the unit.
2045         </para>
2046
2047         <para>
2048           Note that the disk grow operation might complete on one node
2049           but fail on the other; this will leave the instance with
2050           different-sized LVs on the two nodes, but this will not
2051           create problems (except for unused space).
2052         </para>
2053
2054         <para>
2055           If you do not want gnt-instance to wait for the new disk
2056           region to be synced, use the
2057           <option>--no-wait-for-sync</option> option.
2058         </para>
2059
2060         <para>
2061           The <option>--submit</option> option is used to send the job to
2062           the master daemon but not wait for its completion. The job
2063           ID will be shown so that it can be examined via
2064           <command>gnt-job info</command>.
2065         </para>
2066
2067
2068         <para>Example (increase the first disk for instance1 by 16GiB):
2069           <screen>
2070 # gnt-instance grow-disk instance1.example.com 0 16g
2071           </screen>
2072         </para>
2073
2074         <para>
2075           Also note that disk shrinking is not supported; use
2076           <command>gnt-backup export</command> and then
2077           <command>gnt-backup import</command> to reduce the disk size
2078           of an instance.
2079         </para>
2080       </refsect3>
2081
2082       <refsect3>
2083         <title>RECREATE-DISKS</title>
2084
2085         <cmdsynopsis>
2086           <command>recreate-disks</command>
2087           <arg>--submit</arg>
2088           <arg>--disks=<option>indices</option></arg>
2089           <arg choice="req"><replaceable>instance</replaceable></arg>
2090         </cmdsynopsis>
2091         <para>
2092           Recreates the disks of the given instance, or only a subset
2093           of the disks (if the option <option>disks</option> is
2094           passed, which must be a comma-separated list of disk
2095           indices, starting from zero).
2096         </para>
2097
2098         <para>
2099           Note that this functionality should only be used for missing
2100           disks; if any of the given disks already exists, the
2101           operation will fail. While this is suboptimal,
2102           recreate-disks should hopefully not be needed in normal
2103           operation and as such the impact of this is low.
2104         </para>
2105
2106         <para>
2107           The <option>--submit</option> option is used to send the job to
2108           the master daemon but not wait for its completion. The job
2109           ID will be shown so that it can be examined via
2110           <command>gnt-job info</command>.
2111         </para>
2112
2113       </refsect3>
2114
2115     </refsect2>
2116
2117     <refsect2>
2118       <title>Recovery</title>
2119
2120       <refsect3>
2121         <title>FAILOVER</title>
2122
2123         <cmdsynopsis>
2124           <command>failover</command>
2125           <arg>-f</arg>
2126           <arg>--ignore-consistency</arg>
2127           <arg>--shutdown-timeout=<replaceable>N</replaceable></arg>
2128           <arg>--submit</arg>
2129           <arg choice="req"><replaceable>instance</replaceable></arg>
2130         </cmdsynopsis>
2131
2132         <para>
2133           Failover will fail the instance over its secondary
2134           node. This works only for instances having a drbd disk
2135           template.
2136         </para>
2137
2138         <para>
2139           Normally the failover will check the consistency of the
2140           disks before failing over the instance. If you are trying to
2141           migrate instances off a dead node, this will fail. Use the
2142           <option>--ignore-consistency</option> option for this
2143           purpose. Note that this option can be dangerous as errors in
2144           shutting down the instance will be ignored, resulting in
2145           possibly having the instance running on two machines in
2146           parallel (on disconnected DRBD drives).
2147         </para>
2148
2149         <para>
2150           The <option>--shutdown-timeout</option> is used to specify how
2151           much time to wait before forcing the shutdown (xm destroy in xen,
2152           killing the kvm process, for kvm). By default two minutes are
2153           given to each instance to stop.
2154         </para>
2155
2156         <para>
2157           The <option>--submit</option> option is used to send the job to
2158           the master daemon but not wait for its completion. The job
2159           ID will be shown so that it can be examined via
2160           <command>gnt-job info</command>.
2161         </para>
2162
2163         <para>
2164           Example:
2165           <screen>
2166 # gnt-instance failover instance1.example.com
2167           </screen>
2168         </para>
2169       </refsect3>
2170
2171       <refsect3>
2172         <title>MIGRATE</title>
2173
2174         <cmdsynopsis>
2175           <command>migrate</command>
2176           <arg>-f</arg>
2177           <arg choice="req">--cleanup</arg>
2178           <arg choice="req"><replaceable>instance</replaceable></arg>
2179         </cmdsynopsis>
2180
2181         <cmdsynopsis>
2182           <command>migrate</command>
2183           <arg>-f</arg>
2184           <arg>--non-live</arg>
2185           <arg choice="req"><replaceable>instance</replaceable></arg>
2186         </cmdsynopsis>
2187
2188         <para>
2189           Migrate will move the instance to its secondary node without
2190           shutdown. It only works for instances having the drbd8 disk
2191           template type.
2192         </para>
2193
2194         <para>
2195           The migration command needs a perfectly healthy instance, as
2196           we rely on the dual-master capability of drbd8 and the disks
2197           of the instance are not allowed to be degraded.
2198         </para>
2199
2200         <para>
2201           The <option>--non-live</option> option will switch (for the
2202           hypervisors that support it) between a "fully live"
2203           (i.e. the interruption is as minimal as possible) migration
2204           and one in which the instance is frozen, its state saved and
2205           transported to the remote node, and then resumed there. This
2206           all depends on the hypervisor support for two different
2207           methods. In any case, it is not an error to pass this
2208           parameter (it will just be ignored if the hypervisor doesn't
2209           support it).
2210         </para>
2211
2212         <para>
2213           If the <option>--cleanup</option> option is passed, the
2214           operation changes from migration to attempting recovery from
2215           a failed previous migration. In this mode, ganeti checks if
2216           the instance runs on the correct node (and updates its
2217           configuration if not) and ensures the instances's disks are
2218           configured correctly. In this mode, the
2219           <option>--non-live</option> option is ignored.
2220         </para>
2221
2222         <para>
2223           The option <option>-f</option> will skip the prompting for
2224           confirmation.
2225         </para>
2226         <para>
2227           Example (and expected output):
2228           <screen>
2229 # gnt-instance migrate instance1
2230 Migrate will happen to the instance instance1. Note that migration is
2231 **experimental** in this version. This might impact the instance if
2232 anything goes wrong. Continue?
2233 y/[n]/?: y
2234 * checking disk consistency between source and target
2235 * ensuring the target is in secondary mode
2236 * changing disks into dual-master mode
2237  - INFO: Waiting for instance instance1 to sync disks.
2238  - INFO: Instance instance1's disks are in sync.
2239 * migrating instance to node2.example.com
2240 * changing the instance's disks on source node to secondary
2241  - INFO: Waiting for instance instance1 to sync disks.
2242  - INFO: Instance instance1's disks are in sync.
2243 * changing the instance's disks to single-master
2244 #
2245           </screen>
2246         </para>
2247       </refsect3>
2248
2249       <refsect3>
2250         <title>MOVE</title>
2251
2252         <cmdsynopsis>
2253           <command>move</command>
2254           <arg>-f</arg>
2255           <arg>-n <replaceable>node</replaceable></arg>
2256           <arg>--shutdown-timeout=<replaceable>N</replaceable></arg>
2257           <arg>--submit</arg>
2258           <arg choice="req"><replaceable>instance</replaceable></arg>
2259         </cmdsynopsis>
2260
2261         <para>
2262           Move will move the instance to an arbitrary node in the
2263           cluster. This works only for instances having a plain or
2264           file disk template.
2265         </para>
2266
2267         <para>
2268           Note that since this operation is done via data copy, it
2269           will take a long time for big disks (similar to
2270           replace-disks for a drbd instance).
2271         </para>
2272
2273         <para>
2274           The <option>--shutdown-timeout</option> is used to specify how
2275           much time to wait before forcing the shutdown (xm destroy in xen,
2276           killing the kvm process, for kvm). By default two minutes are
2277           given to each instance to stop.
2278         </para>
2279
2280         <para>
2281           The <option>--submit</option> option is used to send the job to
2282           the master daemon but not wait for its completion. The job
2283           ID will be shown so that it can be examined via
2284           <command>gnt-job info</command>.
2285         </para>
2286
2287         <para>
2288           Example:
2289           <screen>
2290 # gnt-instance move -n node3.example.com instance1.example.com
2291           </screen>
2292         </para>
2293       </refsect3>
2294
2295     </refsect2>
2296
2297     <refsect2>
2298       <title>TAGS</title>
2299
2300     <refsect3>
2301         <title>ADD-TAGS</title>
2302
2303         <cmdsynopsis>
2304           <command>add-tags</command>
2305           <arg choice="opt">--from <replaceable>file</replaceable></arg>
2306           <arg choice="req"><replaceable>instancename</replaceable></arg>
2307           <arg choice="req"
2308             rep="repeat"><replaceable>tag</replaceable></arg>
2309         </cmdsynopsis>
2310
2311         <para>
2312           Add tags to the given instance. If any of the tags contains
2313           invalid characters, the entire operation will abort.
2314         </para>
2315         <para>
2316           If the <option>--from</option> option is given, the list of
2317           tags will be extended with the contents of that file (each
2318           line becomes a tag). In this case, there is not need to pass
2319           tags on the command line (if you do, both sources will be
2320           used). A file name of - will be interpreted as stdin.
2321         </para>
2322       </refsect3>
2323
2324       <refsect3>
2325         <title>LIST-TAGS</title>
2326
2327         <cmdsynopsis>
2328           <command>list-tags</command>
2329           <arg choice="req"><replaceable>instancename</replaceable></arg>
2330         </cmdsynopsis>
2331
2332         <para>List the tags of the given instance.</para>
2333       </refsect3>
2334
2335       <refsect3>
2336         <title>REMOVE-TAGS</title>
2337         <cmdsynopsis>
2338           <command>remove-tags</command>
2339           <arg choice="opt">--from <replaceable>file</replaceable></arg>
2340           <arg choice="req"><replaceable>instancename</replaceable></arg>
2341           <arg choice="req"
2342             rep="repeat"><replaceable>tag</replaceable></arg>
2343         </cmdsynopsis>
2344
2345         <para>
2346           Remove tags from the given instance. If any of the tags are
2347           not existing on the node, the entire operation will abort.
2348         </para>
2349
2350         <para>
2351           If the <option>--from</option> option is given, the list of
2352           tags will be extended with the contents of that file (each
2353           line becomes a tag). In this case, there is not need to pass
2354           tags on the command line (if you do, both sources will be
2355           used). A file name of - will be interpreted as stdin.
2356         </para>
2357       </refsect3>
2358
2359     </refsect2>
2360
2361   </refsect1>
2362
2363   &footer;
2364
2365 </refentry>
2366
2367 <!-- Keep this comment at the end of the file
2368 Local variables:
2369 mode: sgml
2370 sgml-omittag:t
2371 sgml-shorttag:t
2372 sgml-minimize-attributes:nil
2373 sgml-always-quote-attributes:t
2374 sgml-indent-step:2
2375 sgml-indent-data:t
2376 sgml-parent-document:nil
2377 sgml-default-dtd-file:nil
2378 sgml-exposed-tags:nil
2379 sgml-local-catalogs:nil
2380 sgml-local-ecat-files:nil
2381 End:
2382 -->