Statistics
| Branch: | Tag: | Revision:

root / man / gnt-instance.sgml @ edc8fc5f

History | View | Annotate | Download (78.6 kB)

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>February 11, 2009</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
      <holder>Google Inc.</holder>
26
    </copyright>
27
    &dhdate;
28
  </refentryinfo>
29
  <refmeta>
30
    &dhucpackage;
31

    
32
    &dhsection;
33
    <refmiscinfo>ganeti 2.0</refmiscinfo>
34
  </refmeta>
35
  <refnamediv>
36
    <refname>&dhpackage;</refname>
37

    
38
    <refpurpose>ganeti instance administration</refpurpose>
39
  </refnamediv>
40
  <refsynopsisdiv>
41
    <cmdsynopsis>
42
      <command>&dhpackage; </command>
43

    
44
      <arg choice="req">command</arg>
45
      <arg>arguments...</arg>
46
    </cmdsynopsis>
47
  </refsynopsisdiv>
48
  <refsect1>
49
    <title>DESCRIPTION</title>
50

    
51
    <para>
52
      The <command>&dhpackage;</command> is used for instance
53
      administration in the ganeti system.
54
    </para>
55

    
56
  </refsect1>
57
  <refsect1>
58
    <title>COMMANDS</title>
59

    
60
    <refsect2>
61
      <title>Creation/removal/querying</title>
62

    
63
      <refsect3>
64
        <title>ADD</title>
65
        <cmdsynopsis>
66
          <command>add</command>
67
          <sbr>
68
          <arg choice="req">-t<group choice="req">
69
              <arg>diskless</arg>
70
              <arg>file</arg>
71
              <arg>plain</arg>
72
              <arg>drbd</arg>
73
            </group></arg>
74
          <sbr>
75

    
76
          <group choice="req">
77
            <arg rep="repeat">--disk=<replaceable>N</replaceable>:size=<replaceable>VAL</replaceable><arg>,mode=<replaceable>ro|rw</replaceable></arg></arg>
78
            <arg>-s <replaceable>SIZE</replaceable></arg>
79
          </group>
80
          <sbr>
81
          <group>
82
            <arg rep="repeat">--net=<replaceable>N</replaceable><arg rep="repeat">:options</arg></arg>
83
            <arg>--no-nics</arg>
84
          </group>
85
          <sbr>
86
          <arg>-B <replaceable>BEPARAMS</replaceable></arg>
87
          <sbr>
88

    
89
          <arg>-H <replaceable>HYPERVISOR</replaceable><arg>:<arg choice="plain" rep="repeat">option=<replaceable>value</replaceable></arg></arg></arg>
90
          <sbr>
91

    
92
          <arg>--file-storage-dir <replaceable>dir_path</replaceable></arg>
93
          <arg>--file-driver<group choice="req">
94
              <arg>loop</arg>
95
              <arg>blktap</arg>
96
            </group></arg>
97
          <sbr>
98

    
99
          <group choice="req">
100
            <arg>-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg>
101
            <arg>--iallocator <replaceable>name</replaceable></arg>
102
          </group>
103
          <sbr>
104

    
105
          <arg choice="req">-o <replaceable>os-type</replaceable></arg>
106
          <sbr>
107
          <arg>--submit</arg>
108
          <sbr>
109

    
110
          <arg choice="req"><replaceable>instance</replaceable></arg>
111
        </cmdsynopsis>
112

    
113
        <para>
114
          Creates a new instance on the specified host. The
115
          <replaceable>instance</replaceable> argument must be in DNS,
116
          but depending on the bridge/routing setup, need not be in
117
          the same network as the nodes in the cluster.
118
        </para>
119

    
120
        <para>
121
          The <option>disk</option> option specifies the parameters
122
          for the disks of the instance. The numbering of disks starts
123
          at zero, and at least one disk needs to be passed. For each
124
          disk, at least the size needs to be given, and optionally
125
          the access mode (read-only or the default of read-write) can
126
          also be specified.  The size is interpreted (when no unit is
127
          given) in mebibytes. You can also use one of the suffixes
128
          <literal>m</literal>, <literal>g</literal> or
129
          <literal>t</literal> to specificy the exact the units used;
130
          these suffixes map to mebibytes, gibibytes and tebibytes.
131
        </para>
132

    
133
        <para>
134
          Alternatively, a single-disk instance can be created via the
135
          <option>-s</option> option which takes a single argument,
136
          the size of the disk. This is similar to the Ganeti 1.2
137
          version (but will only create one disk).
138
        </para>
139

    
140
        <para>
141
          The minimum disk specification is therefore
142
          <userinput>--disk 0:size=20G</userinput> (or <userinput>-s
143
          20G</userinput> when using the <option>-s</option> option),
144
          and a three-disk instance can be specified as
145
          <userinput>--disk 0:size=20G --disk 1:size=4G --disk
146
          2:size=100G</userinput>.
147
        </para>
148

    
149
        <para>
150
          The NICs of the instances can be specified via the
151
          <option>--net</option> option. By default, one NIC is
152
          created for the instance, with a random MAC, and set
153
          up according the the cluster level nic parameters.
154
          Each NIC can take these parameters (all optional):
155
          <variablelist>
156
            <varlistentry>
157
              <term>mac</term>
158
              <listitem>
159
                <simpara>either a value or <constant>GENERATE</constant>
160
                  to generate a new unique MAC</simpara>
161
              </listitem>
162
            </varlistentry>
163
            <varlistentry>
164
              <term>ip</term>
165
              <listitem>
166
                <simpara>specifies the IP address assigned to the
167
                  instance from the Ganeti side (this is not necessarily
168
                  what the instance will use, but what the node expects
169
                  the instance to use)</simpara>
170
              </listitem>
171
            </varlistentry>
172
            <varlistentry>
173
              <term>mode</term>
174
              <listitem>
175
                <simpara>specifies the connection mode for this nic:
176
                  routed or bridged.</simpara>
177
              </listitem>
178
            </varlistentry>
179
            <varlistentry>
180
              <term>link</term>
181
              <listitem>
182
                <simpara>in bridged mode specifies the bridge to attach
183
                  this NIC to, in routed mode it's intended to
184
                  differentiate between different routing tables/instance
185
                  groups (but the meaning is dependent on the network
186
                  script, see gnt-cluster(8) for more details)</simpara>
187
              </listitem>
188
            </varlistentry>
189
          </variablelist>
190
          Of these "mode" and "link" are nic parameters, and inherit their
191
          default at cluster level.
192
        </para>
193

    
194
        <para>
195
          Alternatively, if no network is desired for the instance, you
196
          can prevent the default of one NIC with the
197
          <option>--no-nics</option> option.
198
        </para>
199

    
200
        <para>
201
          The <option>-o</option> options specifies the operating
202
          system to be installed. The available operating systems can
203
          be listed with <command>gnt-os list</command>.
204
        </para>
205

    
206
        <para>
207
          The <option>-B</option> option specifies the backend
208
          parameters for the instance. If no such parameters are
209
          specified, the values are inherited from the cluster. Possible
210
          parameters are:
211
          <variablelist>
212
            <varlistentry>
213
              <term>memory</term>
214
              <listitem>
215
                <simpara>the memory size of the instance; as usual,
216
                  suffixes can be used to denote the unit, otherwise the
217
                  value is taken in mebibites</simpara>
218
              </listitem>
219
            </varlistentry>
220
            <varlistentry>
221
              <term>vcpus</term>
222
              <listitem>
223
                <simpara>the number of VCPUs to assign to the instance
224
                  (if this value makes sense for the hypervisor)</simpara>
225
              </listitem>
226
            </varlistentry>
227
            <varlistentry>
228
              <term>auto_balance</term>
229
              <listitem>
230
                <simpara>whether the instance is considered in the N+1
231
                  cluster checks (enough redundancy in the cluster to
232
                  survive a node failure)</simpara>
233
              </listitem>
234
            </varlistentry>
235
          </variablelist>
236
        </para>
237

    
238
        <para>
239
          The <option>-H</option> option specified the hypervisor to
240
          use for the instance (must be one of the enabled hypervisors
241
          on the cluster) and optionally custom parameters for this
242
          instance. If not other options are used (i.e. the invocation
243
          is just <userinput>-H
244
          <replaceable>NAME</replaceable></userinput>) the instance
245
          will inherit the cluster options. The defaults below show
246
          the cluster defaults at cluster creation time.
247
        </para>
248

    
249
        <para>
250
          The possible hypervisor options are as follows:
251
          <variablelist>
252
            <varlistentry>
253
              <term>boot_order</term>
254
              <listitem>
255
                <simpara>Valid for the Xen HVM and KVM
256
                hypervisors.</simpara>
257

    
258
                <simpara>A string value denoting the boot order. This
259
                has different meaning for the Xen HVM hypervisor and
260
                for the KVM one.</simpara>
261

    
262
                <simpara>
263
                  For Xen HVM, The boot order is a string of letters
264
                  listing the boot devices, with valid device letters
265
                  being:
266
                </simpara>
267
                  <variablelist>
268
                    <varlistentry>
269
                      <term>a</term>
270
                      <listitem>
271
                        <para>
272
                          floppy drive
273
                        </para>
274
                      </listitem>
275
                    </varlistentry>
276
                    <varlistentry>
277
                      <term>c</term>
278
                      <listitem>
279
                        <para>
280
                          hard disk
281
                        </para>
282
                      </listitem>
283
                    </varlistentry>
284
                    <varlistentry>
285
                      <term>d</term>
286
                      <listitem>
287
                        <para>
288
                          CDROM drive
289
                        </para>
290
                      </listitem>
291
                    </varlistentry>
292
                    <varlistentry>
293
                      <term>n</term>
294
                      <listitem>
295
                        <para>
296
                          network boot (PXE)
297
                        </para>
298
                      </listitem>
299
                    </varlistentry>
300
                  </variablelist>
301
                <simpara>
302
                  The default is not to set an HVM boot order which is
303
                  interpreted as 'dc'.
304
                </simpara>
305

    
306
              </listitem>
307
            </varlistentry>
308
            <varlistentry>
309
              <term>cdrom_image_path</term>
310
              <listitem>
311
                <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
312

    
313
                <simpara>The path to a CDROM image to attach to the
314
                instance.</simpara>
315

    
316
              </listitem>
317
            </varlistentry>
318
            <varlistentry>
319
              <term>nic_type</term>
320
              <listitem>
321
                <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
322

    
323
                <para>
324
                  This parameter determines the way the network cards
325
                  are presented to the instance. The possible options are:
326
                  <simplelist>
327
                    <member>rtl8139 (default for Xen HVM) (HVM & KVM)</member>
328
                    <member>ne2k_isa (HVM & KVM)</member>
329
                    <member>ne2k_pci (HVM & KVM)</member>
330
                    <member>i82551 (KVM)</member>
331
                    <member>i82557b (KVM)</member>
332
                    <member>i82559er (KVM)</member>
333
                    <member>pcnet (KVM)</member>
334
                    <member>e1000 (KVM)</member>
335
                    <member>paravirtual (default for KVM) (HVM & KVM)</member>
336
                  </simplelist>
337
                </para>
338
              </listitem>
339
            </varlistentry>
340
            <varlistentry>
341
              <term>disk_type</term>
342
              <listitem>
343
                <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
344

    
345
                <para>
346
                  This parameter determines the way the disks are
347
                  presented to the instance. The possible options are:
348
                  <simplelist>
349
                    <member>ioemu (default for HVM & KVM) (HVM & KVM)</member>
350
                    <member>ide (HVM & KVM)</member>
351
                    <member>scsi (KVM)</member>
352
                    <member>sd (KVM)</member>
353
                    <member>mtd (KVM)</member>
354
                    <member>pflash (KVM)</member>
355
                  </simplelist>
356
                </para>
357
              </listitem>
358
            </varlistentry>
359
            <varlistentry>
360
              <term>vnc_bind_address</term>
361
              <listitem>
362
                <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
363

    
364
                <para>Specifies the address that the VNC listener for
365
                this instance should bind to. Valid values are IPv4
366
                addresses. Use the address 0.0.0.0 to bind to all
367
                available interfaces (this is the default) or specify
368
                the address of one of the interfaces on the node to
369
                restrict listening to that interface.</para>
370
              </listitem>
371
            </varlistentry>
372

    
373
            <varlistentry>
374
              <term>vnc_tls</term>
375
              <listitem>
376
                <simpara>Valid for the KVM hypervisor.</simpara>
377

    
378
                <simpara>A boolean option that controls whether the
379
                VNC connection is secured with TLS.</simpara>
380
              </listitem>
381
            </varlistentry>
382

    
383
            <varlistentry>
384
              <term>vnc_x509_path</term>
385
              <listitem>
386
                <simpara>Valid for the KVM hypervisor.</simpara>
387

    
388
                <para>If <option>vnc_tls</option> is enabled, this
389
                options specifies the path to the x509 certificate to
390
                use.</para>
391
              </listitem>
392
            </varlistentry>
393

    
394
            <varlistentry>
395
              <term>vnc_x509_verify</term>
396
              <listitem>
397
                <simpara>Valid for the KVM hypervisor.</simpara>
398
              </listitem>
399
            </varlistentry>
400

    
401
            <varlistentry>
402
              <term>acpi</term>
403
              <listitem>
404
                <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
405

    
406
                <para>
407
                  A boolean option that specifies if the hypervisor
408
                  should enable ACPI support for this instance. By
409
                  default, ACPI is disabled.
410
                </para>
411
              </listitem>
412
            </varlistentry>
413

    
414
            <varlistentry>
415
              <term>pae</term>
416
              <listitem>
417
                <simpara>Valid for the Xen HVM and KVM hypervisors.</simpara>
418

    
419
                <para>
420
                  A boolean option that specifies if the hypervisor
421
                  should enabled PAE support for this instance. The
422
                  default is false, disabling PAE support.
423
                </para>
424
              </listitem>
425
            </varlistentry>
426

    
427
            <varlistentry>
428
              <term>kernel_path</term>
429
              <listitem>
430
                <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
431

    
432
                <para>
433
                  This option specifies the path (on the node) to the
434
                  kernel to boot the instance with. Xen PVM instances
435
                  always require this, while for KVM if this option is
436
                  empty, it will cause the machine to load the kernel
437
                  from its disks.
438
                </para>
439
              </listitem>
440
            </varlistentry>
441

    
442
            <varlistentry>
443
              <term>kernel_args</term>
444
              <listitem>
445
                <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
446

    
447
                <para>
448
                  This options specifies extra arguments to the kernel
449
                  that will be loaded.  device. This is always used
450
                  for Xen PVM, while for KVM it is only used if the
451
                  <option>kernel_path</option> option is also
452
                  specified.
453
                </para>
454

    
455
                <para>
456
                  The default setting for this value is simply
457
                  <constant>"ro"</constant>, which mounts the root
458
                  disk (initially) in read-only one. For example,
459
                  setting this to <userinput>single</userinput> will
460
                  cause the instance to start in single-user mode.
461
                </para>
462
              </listitem>
463
            </varlistentry>
464

    
465
            <varlistentry>
466
              <term>initrd_path</term>
467
              <listitem>
468
                <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
469

    
470
                <para>
471
                  This option specifies the path (on the node) to the
472
                  initrd to boot the instance with. Xen PVM instances
473
                  can use this always, while for KVM if this option is
474
                  only used if the <option>kernel_path</option> option
475
                  is also specified. You can pass here either an
476
                  absolute filename (the path to the initrd) if you
477
                  want to use an initrd, or use the format
478
                  <userinput>no_initrd_path</userinput> for no initrd.
479
                </para>
480
              </listitem>
481
            </varlistentry>
482

    
483
            <varlistentry>
484
              <term>root_path</term>
485
              <listitem>
486
                <simpara>Valid for the Xen PVM and KVM hypervisors.</simpara>
487

    
488
                <para>
489
                  This options specifies the name of the root
490
                  device. This is always needed for Xen PVM, while for
491
                  KVM it is only used if the
492
                  <option>kernel_path</option> option is also
493
                  specified.
494
                </para>
495
              </listitem>
496
            </varlistentry>
497

    
498
            <varlistentry>
499
              <term>serial_console</term>
500
              <listitem>
501
                <simpara>Valid for the KVM hypervisor.</simpara>
502

    
503
                <simpara>This boolean option specifies whether to
504
                emulate a serial console for the instance.</simpara>
505
              </listitem>
506
            </varlistentry>
507
          </variablelist>
508
        </para>
509

    
510
        <para>
511
        </para>
512

    
513
        <para>
514
          The <option>--iallocator</option> option specifies the instance
515
          allocator plugin to use. If you pass in this option the allocator
516
          will select nodes for this instance automatically, so you don't need
517
          to pass them with the <option>-n</option> option. For more
518
          information please refer to the instance allocator documentation.
519
        </para>
520

    
521
        <para>
522
          The <option>-t</option> options specifies the disk layout type for
523
          the instance. The available choices are:
524
          <variablelist>
525
            <varlistentry>
526
              <term>diskless</term>
527
              <listitem>
528
                <para>
529
                  This creates an instance with no disks. Its useful for
530
                  testing only (or other special cases).
531
                </para>
532
              </listitem>
533
            </varlistentry>
534
            <varlistentry>
535
              <term>file</term>
536
              <listitem>
537
                <para>Disk devices will be regular files.</para>
538
              </listitem>
539
            </varlistentry>
540
            <varlistentry>
541
              <term>plain</term>
542
              <listitem>
543
                <para>Disk devices will be logical volumes.</para>
544
              </listitem>
545
            </varlistentry>
546
            <varlistentry>
547
              <term>drbd</term>
548
              <listitem>
549
                <para>
550
                  Disk devices will be drbd (version 8.x) on top of
551
                  lvm volumes.
552
                </para>
553
              </listitem>
554
            </varlistentry>
555
          </variablelist>
556
        </para>
557

    
558
        <para>
559
          The optional second value of the <option>--node</option> is used for
560
          the drbd template type and specifies the remote node.
561
        </para>
562

    
563
        <para>
564
          If you do not want gnt-instance to wait for the disk mirror
565
          to be synced, use the <option>--no-wait-for-sync</option>
566
          option.
567
        </para>
568

    
569
        <para>
570
          The <option>--file-storage-dir</option> specifies the relative path
571
          under the cluster-wide file storage directory to store file-based
572
          disks. It is useful for having different subdirectories for
573
          different instances. The full path of the directory where the disk
574
          files are stored will consist of cluster-wide file storage directory
575
          + optional subdirectory + instance name. Example:
576
          /srv/ganeti/file-storage/mysubdir/instance1.example.com. This option
577
          is only relevant for instances using the file storage backend.
578
        </para>
579

    
580
        <para>
581
          The <option>--file-driver</option> specifies the driver to use for
582
          file-based disks. Note that currently these drivers work with the
583
          xen hypervisor only. This option is only relevant for instances using
584
          the file storage backend. The available choices are:
585
          <variablelist>
586
            <varlistentry>
587
              <term>loop</term>
588
              <listitem>
589
                <para>
590
                  Kernel loopback driver. This driver uses loopback
591
                  devices to access the filesystem within the
592
                  file. However, running I/O intensive applications in
593
                  your instance using the loop driver might result in
594
                  slowdowns.  Furthermore, if you use the loopback
595
                  driver consider increasing the maximum amount of
596
                  loopback devices (on most systems it's 8) using the
597
                  max_loop param.
598
                </para>
599
              </listitem>
600
            </varlistentry>
601
            <varlistentry>
602
              <term>blktap</term>
603
              <listitem>
604
                <para>The blktap driver (for Xen hypervisors). In
605
                order to be able to use the blktap driver you should
606
                check if the 'blktapctrl' user space disk agent is
607
                running (usually automatically started via xend). This
608
                user-level disk I/O interface has the advantage of
609
                better performance. Especially if you use a network
610
                file system (e.g. NFS) to store your instances this is
611
                the recommended choice.
612
                </para>
613
              </listitem>
614
            </varlistentry>
615
          </variablelist>
616
        </para>
617

    
618
        <para>
619
          The <option>--submit</option> option is used to send the job to
620
          the master daemon but not wait for its completion. The job
621
          ID will be shown so that it can be examined via
622
          <command>gnt-job info</command>.
623
        </para>
624

    
625
        <para>
626
          Example:
627
          <screen>
628
# gnt-instance add -t file --disk 0:size=30g -B memory=512 -o debian-etch \
629
  -n node1.example.com --file-storage-dir=mysubdir instance1.example.com
630
# gnt-instance add -t plain --disk 0:size=30g -B memory=512 -o debian-etch \
631
  -n node1.example.com instance1.example.com
632
# gnt-instance add -t drbd --disk 0:size=30g -B memory=512 -o debian-etch \
633
  -n node1.example.com:node2.example.com instance2.example.com
634
          </screen>
635
        </para>
636
      </refsect3>
637

    
638
      <refsect3>
639
        <title>BATCH-CREATE</title>
640
        <cmdsynopsis>
641
          <command>batch-create</command>
642
          <arg choice="req">instances_file.json</arg>
643
        </cmdsynopsis>
644

    
645
        <para>
646
          This command (similar to the Ganeti 1.2
647
          <command>batcher</command> tool) submits multiple instance
648
          creation jobs based on a definition file. The instance
649
          configurations do not encompass all the possible options for
650
          the <command>add</command> command, but only a subset.
651
        </para>
652

    
653
        <para>
654
          The instance file should be a valid-formed JSON file,
655
          containing a dictionary with instance name and instance
656
          parameters. The accepted parameters are:
657

    
658
          <variablelist>
659
            <varlistentry>
660
              <term>disk_size</term>
661
              <listitem>
662
                <simpara>The size of the disks of the instance.</simpara>
663
              </listitem>
664
            </varlistentry>
665
            <varlistentry>
666
              <term>disk_templace</term>
667
              <listitem>
668
                <simpara>The disk template to use for the instance,
669
                the same as in the <command>add</command>
670
                command.</simpara>
671
              </listitem>
672
            </varlistentry>
673
            <varlistentry>
674
              <term>backend</term>
675
              <listitem>
676
                <simpara>A dictionary of backend parameters.</simpara>
677
              </listitem>
678
            </varlistentry>
679
            <varlistentry>
680
              <term>hypervisor</term>
681
              <listitem>
682
                <simpara>A dictionary with a single key (the
683
                hypervisor name), and as value the hypervisor
684
                options. If not passed, the default hypervisor and
685
                hypervisor options will be inherited.</simpara>
686
              </listitem>
687
            </varlistentry>
688
            <varlistentry>
689
              <term>mac, ip, mode, link</term>
690
              <listitem>
691
                <simpara>Specifications for the one NIC that will be
692
                created for the instance. 'bridge' is also accepted
693
                as a backwards compatibile key.</simpara>
694
              </listitem>
695
            </varlistentry>
696
            <varlistentry>
697
              <term>nics</term>
698
              <listitem>
699
                <simpara>List of nics that will be created for the
700
                instance. Each entry should be a dict, with mac, ip, mode
701
                and link as possible keys. Please don't provide the "mac,
702
                ip, mode, link" parent keys if you use this method for
703
                specifying nics.</simpara>
704
              </listitem>
705
            </varlistentry>
706
            <varlistentry>
707
              <term>primary_node, secondary_node</term>
708
              <listitem>
709
                <simpara>The primary and optionally the secondary node
710
                to use for the instance (in case an iallocator script
711
                is not used).</simpara>
712
              </listitem>
713
            </varlistentry>
714
            <varlistentry>
715
              <term>iallocator</term>
716
              <listitem>
717
                <simpara>Instead of specifying the nodes, an
718
                iallocator script can be used to automatically compute
719
                them.</simpara>
720
              </listitem>
721
            </varlistentry>
722
            <varlistentry>
723
              <term>start</term>
724
              <listitem>
725
                <simpara>whether to start the instance</simpara>
726
              </listitem>
727
            </varlistentry>
728
            <varlistentry>
729
              <term>ip_check</term>
730
              <listitem>
731
                <simpara>Skip the check for already-in-use instance;
732
                see the description in the <command>add</command>
733
                command for details.</simpara>
734
              </listitem>
735
            </varlistentry>
736
            <varlistentry>
737
              <term>file_storage_dir, file_driver</term>
738
              <listitem>
739
                <simpara>Configuration for the <literal>file</literal>
740
                disk type, see the <command>add</command> command for
741
                details.</simpara>
742
              </listitem>
743
            </varlistentry>
744
          </variablelist>
745
        </para>
746

    
747
        <para>
748
          A simple definition for one instance can be (with most of
749
          the parameters taken from the cluster defaults):
750
          <screen>
751
{
752
  "instance3": {
753
    "template": "drbd",
754
    "os": "debootstrap",
755
    "disk_size": ["25G"],
756
    "iallocator": "dumb"
757
  },
758
  "instance5": {
759
    "template": "drbd",
760
    "os": "debootstrap",
761
    "disk_size": ["25G"],
762
    "iallocator": "dumb",
763
    "hypervisor": "xen-hvm",
764
    "hvparams": {"acpi": true},
765
    "backend": {"memory": 512}
766
  }
767
}
768
</screen>
769
        </para>
770

    
771
        <para>
772
          The command will display the job id for each submitted instance, as follows:
773
          <screen>
774
# gnt-instance batch-create instances.json
775
instance3: 11224
776
instance5: 11225
777
</screen>
778
        </para>
779

    
780
      </refsect3>
781

    
782
      <refsect3>
783
        <title>REMOVE</title>
784

    
785
        <cmdsynopsis>
786
          <command>remove</command>
787
          <arg>--ignore-failures</arg>
788
          <arg>--submit</arg>
789
          <arg choice="req"><replaceable>instance</replaceable></arg>
790
        </cmdsynopsis>
791

    
792
        <para>
793
          Remove an instance. This will remove all data from the
794
          instance and there is <emphasis>no way back</emphasis>. If
795
          you are not sure if you use an instance again, use
796
          <command>shutdown</command> first and leave it in the
797
          shutdown state for a while.
798

    
799
        </para>
800

    
801
        <para>
802
          The <option>--ignore-failures</option> option will cause the
803
          removal to proceed even in the presence of errors during the
804
          removal of the instance (e.g. during the shutdown or the
805
          disk removal). If this option is not given, the command will
806
          stop at the first error.
807
        </para>
808

    
809
        <para>
810
          The <option>--submit</option> option is used to send the job to
811
          the master daemon but not wait for its completion. The job
812
          ID will be shown so that it can be examined via
813
          <command>gnt-job info</command>.
814
        </para>
815

    
816
        <para>
817
          Example:
818
          <screen>
819
# gnt-instance remove instance1.example.com
820
          </screen>
821
        </para>
822
      </refsect3>
823

    
824
      <refsect3>
825
        <title>LIST</title>
826

    
827
        <cmdsynopsis>
828
          <command>list</command>
829
          <arg>--no-headers</arg>
830
          <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
831
          <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
832
          <arg rep="repeat">instance</arg>
833
        </cmdsynopsis>
834

    
835
        <para>
836
          Shows the currently configured instances with memory usage,
837
          disk usage, the node they are running on, and their run
838
          status.
839
        </para>
840

    
841
        <para>
842
          The <option>--no-headers</option> option will skip the
843
          initial header line. The <option>--separator</option> option
844
          takes an argument which denotes what will be used between
845
          the output fields. Both these options are to help scripting.
846
        </para>
847

    
848
        <para>
849
          The <option>-o</option> option takes a comma-separated list
850
          of output fields. The available fields and their meaning
851
          are:
852
          <variablelist>
853
            <varlistentry>
854
              <term>name</term>
855
              <listitem>
856
                <simpara>the instance name</simpara>
857
              </listitem>
858
            </varlistentry>
859
            <varlistentry>
860
              <term>os</term>
861
              <listitem>
862
                <simpara>the OS of the instance</simpara>
863
              </listitem>
864
            </varlistentry>
865
            <varlistentry>
866
              <term>pnode</term>
867
              <listitem>
868
                <simpara>the primary node of the instance</simpara>
869
              </listitem>
870
            </varlistentry>
871
            <varlistentry>
872
              <term>snodes</term>
873
              <listitem>
874
                <simpara>comma-separated list of secondary nodes for the
875
                  instance; usually this will be just one node</simpara>
876
              </listitem>
877
            </varlistentry>
878
            <varlistentry>
879
              <term>admin_state</term>
880
              <listitem>
881
                <simpara>the desired state of the instance (either "yes"
882
                  or "no" denoting the instance should run or
883
                  not)</simpara>
884
              </listitem>
885
            </varlistentry>
886
            <varlistentry>
887
              <term>disk_template</term>
888
              <listitem>
889
                <simpara>the disk template of the instance</simpara>
890
              </listitem>
891
            </varlistentry>
892
            <varlistentry>
893
              <term>oper_state</term>
894
              <listitem>
895
                <simpara>the actual state of the instance; can be
896
                one of the values "running", "stopped", "(node
897
                down)"</simpara>
898
              </listitem>
899
            </varlistentry>
900
            <varlistentry>
901
              <term>status</term>
902
              <listitem>
903
                <simpara>combined form of admin_state and oper_stat;
904
                this can be one of:
905
                <computeroutput>ERROR_nodedown</computeroutput> if the
906
                node of the instance is down,
907
                <computeroutput>ERROR_down</computeroutput> if the
908
                instance should run but is down,
909
                <computeroutput>ERROR_up</computeroutput> if the
910
                instance should be stopped but is actually running,
911
                <computeroutput>ADMIN_down</computeroutput> if the
912
                instance has been stopped (and is stopped) and
913
                <computeroutput>running</computeroutput> if the
914
                instance is set to be running (and is
915
                running)</simpara>
916
              </listitem>
917
            </varlistentry>
918
            <varlistentry>
919
              <term>oper_ram</term>
920
              <listitem>
921
                <simpara>the actual memory usage of the instance as seen
922
                  by the hypervisor</simpara>
923
              </listitem>
924
            </varlistentry>
925
            <varlistentry>
926
              <term>ip</term>
927
              <listitem>
928
                <simpara>the ip address ganeti recognizes as associated with
929
                the first instance interface</simpara>
930
              </listitem>
931
            </varlistentry>
932
            <varlistentry>
933
              <term>mac</term>
934
              <listitem>
935
                <simpara>the first instance interface MAC address</simpara>
936
              </listitem>
937
            </varlistentry>
938

    
939
            <varlistentry>
940
              <term>mode</term>
941
              <listitem>
942
                <simpara>the mode of the first instance NIC
943
                (routed or bridged)</simpara>
944
              </listitem>
945
            </varlistentry>
946
            <varlistentry>
947
              <term>link</term>
948
              <listitem>
949
                <simpara>the link of the first instance NIC
950
                </simpara>
951
              </listitem>
952
            </varlistentry>
953
            <varlistentry>
954
              <term>sda_size</term>
955
              <listitem>
956
                <simpara>the size of the instance's first disk</simpara>
957
              </listitem>
958
            </varlistentry>
959
            <varlistentry>
960
              <term>sdb_size</term>
961
              <listitem>
962
                <simpara>the size of the instance's second disk, if
963
                any</simpara>
964
              </listitem>
965
            </varlistentry>
966
            <varlistentry>
967
              <term>vcpus</term>
968
              <listitem>
969
                <simpara>the number of VCPUs allocated to the
970
                instance</simpara>
971
              </listitem>
972
            </varlistentry>
973
            <varlistentry>
974
              <term>tags</term>
975
              <listitem>
976
                <simpara>comma-separated list of the instances's
977
                tags</simpara>
978
              </listitem>
979
            </varlistentry>
980
            <varlistentry>
981
              <term>serial_no</term>
982
              <listitem>
983
                <simpara>the so called 'serial number' of the
984
                instance; this is a numeric field that is incremented
985
                each time the instance is modified, and it can be used
986
                to track modifications</simpara>
987
              </listitem>
988
            </varlistentry>
989
            <varlistentry>
990
              <term>ctime</term>
991
              <listitem>
992
                <para>
993
                  the creation time of the instance; note that this
994
                  field contains spaces and as such it's harder to
995
                  parse
996
                </para>
997
                <para>
998
                  if this attribute is not present (e.g. when
999
                  upgrading from older versions), then "N/A" will be
1000
                  shown instead
1001
                </para>
1002
              </listitem>
1003
            </varlistentry>
1004
            <varlistentry>
1005
              <term>mtime</term>
1006
              <listitem>
1007
                <para>
1008
                  the last modification time of the instance; note
1009
                  that this field contains spaces and as such it's
1010
                  harder to parse
1011
                </para>
1012
                <para>
1013
                  if this attribute is not present (e.g. when
1014
                  upgrading from older versions), then "N/A" will be
1015
                  shown instead
1016
                </para>
1017
              </listitem>
1018
            </varlistentry>
1019

    
1020
            <varlistentry>
1021
              <term>uuid</term>
1022
              <listitem>
1023
                <simpara>Show the UUID of the instance (generated
1024
                automatically by Ganeti)</simpara>
1025
              </listitem>
1026
            </varlistentry>
1027

    
1028
            <varlistentry>
1029
              <term>network_port</term>
1030
              <listitem>
1031
                <simpara>If the instance has a network port assigned
1032
                to it (e.g. for VNC connections), this will be shown,
1033
                otherwise <literal>-</literal> will be
1034
                displayed.</simpara>
1035
              </listitem>
1036
            </varlistentry>
1037
            <varlistentry>
1038
              <term>beparams</term>
1039
              <listitem>
1040
                <simpara>A text format of the entire beparams for the
1041
                instance. It's more useful to select individual fields
1042
                from this dictionary, see below.</simpara>
1043
              </listitem>
1044
            </varlistentry>
1045
            <varlistentry>
1046
              <term>disk.count</term>
1047
              <listitem>
1048
                <simpara>The number of instance disks.</simpara>
1049
              </listitem>
1050
            </varlistentry>
1051
            <varlistentry>
1052
              <term>disk.size/N</term>
1053
              <listitem>
1054
                <simpara>The size of the instance's Nth disk. This is
1055
                a more generic form of the <literal>sda_size</literal>
1056
                and <literal>sdb_size</literal> fields.</simpara>
1057
              </listitem>
1058
            </varlistentry>
1059
            <varlistentry>
1060
              <term>disk.sizes</term>
1061
              <listitem>
1062
                <simpara>A comma-separated list of the disk sizes for
1063
                this instance.</simpara>
1064
              </listitem>
1065
            </varlistentry>
1066
            <varlistentry>
1067
              <term>disk_usage</term>
1068
              <listitem>
1069
                <simpara>The total disk space used by this instance on
1070
                each of its nodes. This is not the instance-visible
1071
                disk size, but the actual disk "cost" of the
1072
                instance.</simpara>
1073
              </listitem>
1074
            </varlistentry>
1075
            <varlistentry>
1076
              <term>nic.mac/N</term>
1077
              <listitem>
1078
                <simpara>The MAC of the Nth instance NIC.</simpara>
1079
              </listitem>
1080
            </varlistentry>
1081
            <varlistentry>
1082
              <term>nic.ip/N</term>
1083
              <listitem>
1084
                <simpara>The IP address of the Nth instance NIC.</simpara>
1085
              </listitem>
1086
            </varlistentry>
1087
            <varlistentry>
1088
              <term>nic.mode/N</term>
1089
              <listitem>
1090
                <simpara>The mode of the Nth instance NIC</simpara>
1091
              </listitem>
1092
            </varlistentry>
1093
            <varlistentry>
1094
              <term>nic.link/N</term>
1095
              <listitem>
1096
                <simpara>The link of the Nth instance NIC</simpara>
1097
              </listitem>
1098
            </varlistentry>
1099
            <varlistentry>
1100
              <term>nic.macs</term>
1101
              <listitem>
1102
                <simpara>A comma-separated list of all the MACs of the
1103
                instance's NICs.</simpara>
1104
              </listitem>
1105
            </varlistentry>
1106
            <varlistentry>
1107
              <term>nic.ips</term>
1108
              <listitem>
1109
                <simpara>A comma-separated list of all the IP
1110
                addresses of the instance's NICs.</simpara>
1111
              </listitem>
1112
            </varlistentry>
1113
            <varlistentry>
1114
              <term>nic.modes</term>
1115
              <listitem>
1116
                <simpara>A comma-separated list of all the modes of the
1117
                instance's NICs.</simpara>
1118
              </listitem>
1119
            </varlistentry>
1120
            <varlistentry>
1121
              <term>nic.links</term>
1122
              <listitem>
1123
                <simpara>A comma-separated list of all the link parameters
1124
                of the instance's NICs.</simpara>
1125
              </listitem>
1126
            </varlistentry>
1127
            <varlistentry>
1128
              <term>nic.count</term>
1129
              <listitem>
1130
                <simpara>The number of instance nics.</simpara>
1131
              </listitem>
1132
            </varlistentry>
1133
            <varlistentry>
1134
              <term>hv/<replaceable>NAME</replaceable></term>
1135
              <listitem>
1136
                <simpara>The value of the hypervisor parameter called
1137
                <replaceable>NAME</replaceable>. For details of what
1138
                hypervisor parameters exist and their meaning, see the
1139
                <command>add</command> command.</simpara>
1140
              </listitem>
1141
            </varlistentry>
1142
            <varlistentry>
1143
              <term>be/memory</term>
1144
              <listitem>
1145
                <simpara>The configured memory for the instance.</simpara>
1146
              </listitem>
1147
            </varlistentry>
1148
            <varlistentry>
1149
              <term>be/vcpus</term>
1150
              <listitem>
1151
                <simpara>The configured number of VCPUs for the
1152
                instance.</simpara>
1153
              </listitem>
1154
            </varlistentry>
1155
            <varlistentry>
1156
              <term>be/auto_balance</term>
1157
              <listitem>
1158
                <simpara>Whether the instance is considered in N+1
1159
                checks.</simpara>
1160
              </listitem>
1161
            </varlistentry>
1162
          </variablelist>
1163
        </para>
1164

    
1165
        <para>
1166
          If the value of the option starts with the character
1167
          <constant>+</constant>, the new field(s) will be added to the
1168
          default list. This allows to quickly see the default list
1169
          plus a few other fields, instead of retyping the entire list
1170
          of fields.
1171
        </para>
1172

    
1173
        <para>
1174
          There is a subtle grouping about the available output
1175
          fields: all fields except for <option>oper_state</option>,
1176
          <option>oper_ram</option> and <option>status</option> are
1177
          configuration value and not run-time values. So if you don't
1178
          select any of the these fields, the query will be satisfied
1179
          instantly from the cluster configuration, without having to
1180
          ask the remote nodes for the data. This can be helpful for
1181
          big clusters when you only want some data and it makes sense
1182
          to specify a reduced set of output fields.
1183
        </para>
1184

    
1185
        <para>The default output field list is:
1186
          <simplelist type="inline">
1187
            <member>name</member>
1188
            <member>os</member>
1189
            <member>pnode</member>
1190
            <member>admin_state</member>
1191
            <member>oper_state</member>
1192
            <member>oper_ram</member>
1193
          </simplelist>.
1194
        </para>
1195
      </refsect3>
1196

    
1197
      <refsect3>
1198
        <title>INFO</title>
1199

    
1200
        <cmdsynopsis>
1201
          <command>info</command>
1202
          <group>
1203
            <arg>-s</arg>
1204
            <arg>--static</arg>
1205
          </group>
1206
          <group choice="req">
1207
            <arg>--all</arg>
1208
            <arg rep="repeat"><replaceable>instance</replaceable></arg>
1209
          </group>
1210
        </cmdsynopsis>
1211

    
1212
        <para>
1213
          Show detailed information about the given instance(s). This is
1214
          different from <command>list</command> as it shows detailed data
1215
          about the instance's disks (especially useful for the drbd disk
1216
          template).
1217
        </para>
1218

    
1219
        <para>
1220
          If the option <option>-s</option> is used, only information
1221
          available in the configuration file is returned, without
1222
          querying nodes, making the operation faster.
1223
        </para>
1224

    
1225
        <para>
1226
          Use the <option>--all</option> to get info about all instances,
1227
          rather than explicitely passing the ones you're interested in.
1228
        </para>
1229
      </refsect3>
1230

    
1231
      <refsect3>
1232
        <title>MODIFY</title>
1233

    
1234
        <cmdsynopsis>
1235
          <command>modify</command>
1236
          <sbr>
1237
          <arg choice="opt">-H <replaceable>HYPERVISOR_PARAMETERS</replaceable></arg>
1238
          <sbr>
1239
          <arg choice="opt">-B <replaceable>BACKEND_PARAMETERS</replaceable></arg>
1240
          <sbr>
1241
          <group>
1242
            <arg>--net add<replaceable><optional>:options</optional></replaceable></arg>
1243
            <arg>--net remove</arg>
1244
            <arg>--net <replaceable>N:options</replaceable></arg>
1245
          </group>
1246
          <sbr>
1247
          <group>
1248
            <arg>--disk add:size=<replaceable>SIZE</replaceable></arg>
1249
            <arg>--disk remove</arg>
1250
            <arg>--disk <replaceable>N</replaceable>:mode=<replaceable>MODE</replaceable></arg>
1251
          </group>
1252

    
1253
          <sbr>
1254
          <arg>--submit</arg>
1255
          <sbr>
1256
          <arg choice="req"><replaceable>instance</replaceable></arg>
1257
        </cmdsynopsis>
1258

    
1259
        <para>
1260
          Modifies the memory size, number of vcpus, ip address, MAC
1261
          address and/or nic parameters for an instance. It can also
1262
          add and remove disks and NICs to/from the instance. Note
1263
          that you need to give at least one of the arguments, otherwise
1264
          the command complains.
1265
        </para>
1266

    
1267
        <para>
1268
          The <option>-H</option> option specifies hypervisor options
1269
          in the form of <userinput>name=value[,...]</userinput>. For details which options can be specified, see the <command>add</command> command.
1270
        </para>
1271

    
1272
        <para>
1273
          The <option>--disk
1274
          add:size=<replaceable>SIZE</replaceable></option> option
1275
          adds a disk to the instance. The <option>--disk
1276
          remove</option> will remove the last disk of the
1277
          instance. The <option>--disk
1278
          <replaceable>N</replaceable>:mode=<replaceable>MODE</replaceable></option>
1279
          option will change the mode of the Nth disk of the instance
1280
          between read-only (<literal>ro</literal>) and read-write
1281
          (<literal>rw</literal>).
1282
        </para>
1283

    
1284
        <para>
1285
          The <option>--net
1286
          add:<replaceable>options</replaceable></option> option will
1287
          add a new NIC to the instance. The available options are the
1288
          same as in the <command>add</command> command (mac, ip, link,
1289
          mode). The <option>--net remove</option> will remove the
1290
          last NIC of the instance, while the <option>--net
1291
          <replaceable>N</replaceable>:<replaceable>options</replaceable></option>
1292
          option will change the parameters of the Nth instance NIC.
1293
        </para>
1294

    
1295
        <para>
1296
          The <option>--submit</option> option is used to send the job to
1297
          the master daemon but not wait for its completion. The job
1298
          ID will be shown so that it can be examined via
1299
          <command>gnt-job info</command>.
1300
        </para>
1301

    
1302
        <para>
1303
          All the changes take effect at the next restart. If the
1304
          instance is running, there is no effect on the instance.
1305
        </para>
1306
      </refsect3>
1307

    
1308
      <refsect3>
1309
        <title>REINSTALL</title>
1310

    
1311
        <cmdsynopsis>
1312
          <command>reinstall</command>
1313
          <arg choice="opt">-o <replaceable>os-type</replaceable></arg>
1314
          <arg>--select-os</arg>
1315
          <arg choice="opt">-f <replaceable>force</replaceable></arg>
1316
          <arg>--force-multiple</arg>
1317
          <sbr>
1318
          <group choice="opt">
1319
            <arg>--instance</arg>
1320
            <arg>--node</arg>
1321
            <arg>--primary</arg>
1322
            <arg>--secondary</arg>
1323
            <arg>--all</arg>
1324
          </group>
1325
          <arg>--submit</arg>
1326
          <arg choice="opt" rep="repeat"><replaceable>instance</replaceable></arg>
1327
        </cmdsynopsis>
1328

    
1329
        <para>
1330
          Reinstalls the operating system on the given instance(s). The
1331
          instance(s) must be stopped when running this command. If the
1332
          <option>--os-type</option> is specified, the operating
1333
          system is changed.
1334
        </para>
1335

    
1336
        <para>
1337
          The <option>--select-os</option> option switches to an
1338
          interactive OS reinstall. The user is prompted to select the OS
1339
          template from the list of available OS templates.
1340
        </para>
1341

    
1342
        <para>
1343
          Since this is a potentially dangerous command, the user will
1344
          be required to confirm this action, unless the
1345
          <option>-f</option> flag is passed. When multiple instances
1346
          are selected (either by passing multiple arguments or by
1347
          using the <option>--node</option>,
1348
          <option>--primary</option>, <option>--secondary</option> or
1349
          <option>--all</option> options), the user must pass both the
1350
          <option>--force</option> and
1351
          <option>--force-multiple</option> options to skip the
1352
          interactive confirmation.
1353
        </para>
1354

    
1355
        <para>
1356
          The <option>--submit</option> option is used to send the job to
1357
          the master daemon but not wait for its completion. The job
1358
          ID will be shown so that it can be examined via
1359
          <command>gnt-job info</command>.
1360
        </para>
1361

    
1362

    
1363
      </refsect3>
1364

    
1365
      <refsect3>
1366
        <title>RENAME</title>
1367

    
1368
        <cmdsynopsis>
1369
          <command>rename</command>
1370
          <arg>--no-ip-check</arg>
1371
          <arg>--submit</arg>
1372
          <arg choice="req"><replaceable>instance</replaceable></arg>
1373
          <arg choice="req"><replaceable>new_name</replaceable></arg>
1374
        </cmdsynopsis>
1375

    
1376
        <para>
1377
          Renames the given instance. The instance must be stopped
1378
          when running this command. The requirements for the new name
1379
          are the same as for adding an instance: the new name must be
1380
          resolvable and the IP it resolves to must not be reachable
1381
          (in order to prevent duplicate IPs the next time the
1382
          instance is started). The IP test can be skipped if the
1383
          <option>--no-ip-check</option> option is passed.
1384
        </para>
1385

    
1386
        <para>
1387
          The <option>--submit</option> option is used to send the job to
1388
          the master daemon but not wait for its completion. The job
1389
          ID will be shown so that it can be examined via
1390
          <command>gnt-job info</command>.
1391
        </para>
1392

    
1393
      </refsect3>
1394

    
1395
    </refsect2>
1396

    
1397
    <refsect2>
1398
      <title>Starting/stopping/connecting to console</title>
1399

    
1400
      <refsect3>
1401
        <title>STARTUP</title>
1402

    
1403
        <cmdsynopsis>
1404
          <command>startup</command>
1405
          <sbr>
1406
          <arg>--force</arg>
1407
          <sbr>
1408
          <arg>--force-multiple</arg>
1409
          <sbr>
1410
          <group choice="opt">
1411
            <arg>--instance</arg>
1412
            <arg>--node</arg>
1413
            <arg>--primary</arg>
1414
            <arg>--secondary</arg>
1415
            <arg>--all</arg>
1416
          </group>
1417
          <sbr>
1418
          <arg>-H <option>key=value...</option></arg>
1419
          <arg>-B <option>key=value...</option></arg>
1420
          <sbr>
1421
          <arg>--submit</arg>
1422
          <sbr>
1423
          <arg choice="opt"
1424
          rep="repeat"><replaceable>name</replaceable></arg>
1425
        </cmdsynopsis>
1426

    
1427
        <para>
1428
          Starts one or more instances, depending on the following
1429
          options. The four available modes are:
1430
          <variablelist>
1431
            <varlistentry>
1432
              <term><option>--instance</option></term>
1433
              <listitem>
1434
                <simpara>will start the instances given as arguments
1435
                (at least one argument required); this is the default
1436
                selection</simpara>
1437
              </listitem>
1438
            </varlistentry>
1439
            <varlistentry>
1440
              <term>--node</term>
1441
              <listitem>
1442
                <simpara>will start the instances who have the given
1443
                node as either primary or secondary</simpara>
1444
              </listitem>
1445
            </varlistentry>
1446
            <varlistentry>
1447
              <term><option>--primary</option></term>
1448
              <listitem>
1449
                <simpara>will start all instances whose primary node
1450
                is in the list of nodes passed as arguments (at least
1451
                one node required)</simpara>
1452
              </listitem>
1453
            </varlistentry>
1454
            <varlistentry>
1455
              <term><option>--secondary</option></term>
1456
              <listitem>
1457
                <simpara>will start all instances whose secondary node
1458
                is in the list of nodes passed as arguments (at least
1459
                one node required)</simpara>
1460
              </listitem>
1461
            </varlistentry>
1462
            <varlistentry>
1463
              <term>--all</term>
1464
              <listitem>
1465
                <simpara>will start all instances in the cluster (no
1466
                arguments accepted)</simpara>
1467
              </listitem>
1468
            </varlistentry>
1469
          </variablelist>
1470
        </para>
1471

    
1472
        <para>
1473
          Note that although you can pass more than one selection
1474
          option, the last one wins, so in order to guarantee the
1475
          desired result, don't pass more than one such option.
1476
        </para>
1477

    
1478
        <para>
1479
          Use <option>--force</option> to start even if secondary disks are
1480
          failing.
1481
        </para>
1482

    
1483
        <para>
1484
          The <option>--force-multiple</option> will skip the
1485
          interactive confirmation in the case the more than one
1486
          instance will be affected.
1487
        </para>
1488

    
1489
        <para>
1490
          The <option>-H</option> and <option>-B</option> options
1491
          specify extra, temporary hypervisor and backend parameters
1492
          that can be used to start an instance with modified
1493
          parameters. They can be useful for quick testing without
1494
          having to modify an instance back and forth, e.g.:
1495
          <screen>
1496
# gnt-instance start -H root_args="single" instance1
1497
# gnt-instance start -B memory=2048 instance2
1498
          </screen>
1499
          The first form will start the instance
1500
          <userinput>instance1</userinput> in single-user mode, and
1501
          the instance <userinput>instance2</userinput> with 2GB of
1502
          RAM (this time only, unless that is the actual instance
1503
          memory size already).
1504
        </para>
1505

    
1506
        <para>
1507
          The <option>--submit</option> option is used to send the job to
1508
          the master daemon but not wait for its completion. The job
1509
          ID will be shown so that it can be examined via
1510
          <command>gnt-job info</command>.
1511
        </para>
1512

    
1513
        <para>
1514
          Example:
1515
          <screen>
1516
# gnt-instance start instance1.example.com
1517
# gnt-instance start --node node1.example.com node2.example.com
1518
# gnt-instance start --all
1519
          </screen>
1520
        </para>
1521
      </refsect3>
1522

    
1523
      <refsect3>
1524
        <title>SHUTDOWN</title>
1525

    
1526
        <cmdsynopsis>
1527
          <command>shutdown</command>
1528
          <sbr>
1529
          <arg>--force-multiple</arg>
1530
          <sbr>
1531
          <group choice="opt">
1532
            <arg>--instance</arg>
1533
            <arg>--node</arg>
1534
            <arg>--primary</arg>
1535
            <arg>--secondary</arg>
1536
            <arg>--all</arg>
1537
          </group>
1538
          <sbr>
1539
          <arg>--submit</arg>
1540
          <sbr>
1541
          <arg choice="opt"
1542
          rep="repeat"><replaceable>name</replaceable></arg>
1543
        </cmdsynopsis>
1544

    
1545
        <para>
1546
          Stops one or more instances. If the instance cannot be
1547
          cleanly stopped during a hardcoded interval (currently 2
1548
          minutes), it will forcibly stop the instance (equivalent to
1549
          switching off the power on a physical machine).
1550
        </para>
1551

    
1552
        <para>
1553
          The <option>--instance</option>, <option>--node</option>,
1554
          <option>--primary</option>, <option>--secondary</option> and
1555
          <option>--all</option> options are similar as for the
1556
          <command>startup</command> command and they influence the
1557
          actual instances being shutdown.
1558
        </para>
1559

    
1560
        <para>
1561
          The <option>--submit</option> option is used to send the job to
1562
          the master daemon but not wait for its completion. The job
1563
          ID will be shown so that it can be examined via
1564
          <command>gnt-job info</command>.
1565
        </para>
1566

    
1567

    
1568
        <para>
1569
          Example:
1570
          <screen>
1571
# gnt-instance shutdown instance1.example.com
1572
# gnt-instance shutdown --all
1573
          </screen>
1574
        </para>
1575
      </refsect3>
1576

    
1577
      <refsect3>
1578
        <title>REBOOT</title>
1579

    
1580
        <cmdsynopsis>
1581
          <command>reboot</command>
1582
          <sbr>
1583
          <arg>--type=<replaceable>REBOOT-TYPE</replaceable></arg>
1584
          <sbr>
1585
          <arg>--ignore-secondaries</arg>
1586
          <sbr>
1587
          <arg>--force-multiple</arg>
1588
          <sbr>
1589
          <group choice="opt">
1590
            <arg>--instance</arg>
1591
            <arg>--node</arg>
1592
            <arg>--primary</arg>
1593
            <arg>--secondary</arg>
1594
            <arg>--all</arg>
1595
          </group>
1596
          <sbr>
1597
          <arg>--submit</arg>
1598
          <sbr>
1599
          <arg choice="opt"
1600
          rep="repeat"><replaceable>name</replaceable></arg>
1601
        </cmdsynopsis>
1602

    
1603
        <para>
1604
          Reboots one or more instances. The type of reboot depends on
1605
          the value of <option>--type</option>. A soft reboot does a
1606
          hypervisor reboot, a hard reboot does a instance stop,
1607
          recreates the hypervisor config for the instance and
1608
          starts the instance. A full reboot does the equivalent
1609
          of <command>gnt-instance shutdown &amp;&amp; gnt-instance
1610
          startup</command>. The default is hard reboot.
1611
        </para>
1612

    
1613
        <para>
1614
          For the hard reboot the option
1615
          <option>--ignore-secondaries</option> ignores errors for the
1616
          secondary node while re-assembling the instance disks.
1617
        </para>
1618

    
1619
        <para>
1620
          The <option>--instance</option>, <option>--node</option>,
1621
          <option>--primary</option>, <option>--secondary</option> and
1622
          <option>--all</option> options are similar as for the
1623
          <command>startup</command> command and they influence the
1624
          actual instances being rebooted.
1625
        </para>
1626

    
1627
        <para>
1628
          The <option>--force-multiple</option> will skip the
1629
          interactive confirmation in the case the more than one
1630
          instance will be affected.
1631
        </para>
1632

    
1633
        <para>
1634
          Example:
1635
          <screen>
1636
# gnt-instance reboot instance1.example.com
1637
# gnt-instance reboot --type=full instance1.example.com
1638
          </screen>
1639
        </para>
1640
      </refsect3>
1641

    
1642
      <refsect3>
1643
        <title>CONSOLE</title>
1644
        <cmdsynopsis>
1645
          <command>console</command>
1646
          <arg choice="opt">--show-cmd</arg>
1647
          <arg choice="req"><replaceable>instance</replaceable></arg>
1648
        </cmdsynopsis>
1649

    
1650
        <para>
1651
          Connects to the console of the given instance. If the
1652
          instance is not up, an error is returned. Use the
1653
          <option>--show-cmd</option> option to display the command
1654
          instead of executing it.
1655
        </para>
1656

    
1657
        <para>
1658
          For HVM instances, this will attempt to connect to the
1659
          serial console of the instance. To connect to the
1660
          virtualized "physical" console of a HVM instance, use a VNC
1661
          client with the connection info from the
1662
          <command>info</command> command.
1663
        </para>
1664

    
1665
        <para>
1666
          Example:
1667
          <screen>
1668
# gnt-instance console instance1.example.com
1669
          </screen>
1670
        </para>
1671
      </refsect3>
1672

    
1673
    </refsect2>
1674

    
1675
    <refsect2>
1676
      <title>Disk management</title>
1677

    
1678
      <refsect3>
1679
        <title>REPLACE-DISKS</title>
1680

    
1681
        <cmdsynopsis>
1682
          <command>replace-disks</command>
1683
          <arg>--submit</arg>
1684
          <arg choice="req">-p</arg>
1685
          <arg>--disks <replaceable>idx</replaceable></arg>
1686
          <arg choice="req"><replaceable>instance</replaceable></arg>
1687
        </cmdsynopsis>
1688

    
1689
        <cmdsynopsis>
1690
          <command>replace-disks</command>
1691
          <arg>--submit</arg>
1692
          <arg choice="req">-s</arg>
1693
          <arg>--disks <replaceable>idx</replaceable></arg>
1694
          <arg choice="req"><replaceable>instance</replaceable></arg>
1695
        </cmdsynopsis>
1696

    
1697
        <cmdsynopsis>
1698
          <command>replace-disks</command>
1699
          <arg>--submit</arg>
1700
          <group choice="req">
1701
            <arg>--iallocator <replaceable>name</replaceable></arg>
1702
            <arg>--new-secondary <replaceable>NODE</replaceable></arg>
1703
          </group>
1704

    
1705
          <arg choice="req"><replaceable>instance</replaceable></arg>
1706
        </cmdsynopsis>
1707

    
1708
        <cmdsynopsis>
1709
          <command>replace-disks</command>
1710
          <arg>--submit</arg>
1711
          <arg choice="req">--auto</arg>
1712
          <arg choice="req"><replaceable>instance</replaceable></arg>
1713
        </cmdsynopsis>
1714

    
1715
        <para>
1716
          This command is a generalized form for replacing disks. It
1717
          is currently only valid for the mirrored (DRBD) disk
1718
          template.
1719
        </para>
1720

    
1721
        <para>
1722
          The first form (when passing the <option>-p</option> option)
1723
          will replace the disks on the primary, while the second form
1724
          (when passing the <option>-s</option> option will replace
1725
          the disks on the secondary node. For these two cases (as the
1726
          node doesn't change), it is possible to only run the replace
1727
          for a subset of the disks, using the option
1728
          <option>--disks</option> which takes a list of
1729
          comma-delimited disk indices (zero-based),
1730
          e.g. <userinput>0,2</userinput> to replace only the first
1731
          and third disks.
1732
        </para>
1733

    
1734
        <para>
1735
          The third form (when passing either the
1736
          <option>--iallocator</option> or the
1737
          <option>--new-secondary</option> option) is designed to
1738
          change secondary node of the instance.  Specifying
1739
          <option>--iallocator</option> makes the new secondary be
1740
          selected automatically by the specified allocator plugin,
1741
          otherwise the new secondary node will be the one chosen
1742
          manually via the <option>--new-secondary</option> option.
1743
        </para>
1744

    
1745
        <para>
1746
          The fourth form (when using <option>--auto</option>) will
1747
          automatically determine which disks of an instance are faulty and
1748
          replace them within the same node. The <option>--auto</option>
1749
          option works only when an instance has only faulty disks on
1750
          either the primary or secondary node; it doesn't work when
1751
          both sides have faulty disks.
1752
        </para>
1753

    
1754
        <para>
1755
          The <option>--submit</option> option is used to send the job to
1756
          the master daemon but not wait for its completion. The job
1757
          ID will be shown so that it can be examined via
1758
          <command>gnt-job info</command>.
1759
        </para>
1760

    
1761
        <para>
1762
          Note that it is not possible to select an offline or drained
1763
          node as a new secondary.
1764
        </para>
1765

    
1766
      </refsect3>
1767

    
1768
      <refsect3>
1769
        <title>ACTIVATE-DISKS</title>
1770

    
1771
        <cmdsynopsis>
1772
          <command>activate-disks</command>
1773
          <arg>--submit</arg>
1774
          <arg>--ignore-size</arg>
1775
          <arg choice="req"><replaceable>instance</replaceable></arg>
1776
        </cmdsynopsis>
1777
        <para>
1778
          Activates the block devices of the given instance. If
1779
          successful, the command will show the location and name of
1780
          the block devices:
1781
          <screen>
1782
node1.example.com:disk/0:/dev/drbd0
1783
node1.example.com:disk/1:/dev/drbd1
1784
          </screen>
1785

    
1786
          In this example, <emphasis>node1.example.com</emphasis> is
1787
          the name of the node on which the devices have been
1788
          activated. The <emphasis>disk/0</emphasis> and
1789
          <emphasis>disk/1</emphasis> are the Ganeti-names of the
1790
          instance disks; how they are visible inside the instance is
1791
          hypervisor-specific. <emphasis>/dev/drbd0</emphasis> and
1792
          <emphasis>/dev/drbd1</emphasis> are the actual block devices
1793
          as visible on the node.
1794
        </para>
1795

    
1796
        <para>
1797
          The <option>--submit</option> option is used to send the job to
1798
          the master daemon but not wait for its completion. The job
1799
          ID will be shown so that it can be examined via
1800
          <command>gnt-job info</command>.
1801
        </para>
1802

    
1803
        <para>
1804
          The <option>--ignore-size</option> option can be used to
1805
          activate disks ignoring the currently configured size in
1806
          Ganeti. This can be used in cases where the configuration
1807
          has gotten out of sync with the real-world (e.g. after a
1808
          partially-failed grow-disk operation or due to rounding in
1809
          LVM devices). This should not be used in normal cases, but
1810
          only when activate-disks fails without it.
1811
        </para>
1812

    
1813
        <para>
1814
          Note that it is safe to run this command while the instance
1815
          is already running.
1816
        </para>
1817
      </refsect3>
1818

    
1819
      <refsect3>
1820
        <title>DEACTIVATE-DISKS</title>
1821

    
1822
        <cmdsynopsis>
1823
          <command>deactivate-disks</command>
1824
          <arg>--submit</arg>
1825
          <arg choice="req"><replaceable>instance</replaceable></arg>
1826
        </cmdsynopsis>
1827
        <para>
1828
          De-activates the block devices of the given instance. Note
1829
          that if you run this command for an instance with a drbd
1830
          disk template, while it is running, it will not be able to
1831
          shutdown the block devices on the primary node, but it will
1832
          shutdown the block devices on the secondary nodes, thus
1833
          breaking the replication.
1834
        </para>
1835

    
1836
        <para>
1837
          The <option>--submit</option> option is used to send the job to
1838
          the master daemon but not wait for its completion. The job
1839
          ID will be shown so that it can be examined via
1840
          <command>gnt-job info</command>.
1841
        </para>
1842

    
1843
      </refsect3>
1844

    
1845
      <refsect3>
1846
        <title>GROW-DISK</title>
1847
        <cmdsynopsis>
1848
          <command>grow-disk</command>
1849
          <arg>--no-wait-for-sync</arg>
1850
          <arg>--submit</arg>
1851
          <arg choice="req"><replaceable>instance</replaceable></arg>
1852
          <arg choice="req"><replaceable>disk</replaceable></arg>
1853
          <arg choice="req"><replaceable>amount</replaceable></arg>
1854
        </cmdsynopsis>
1855

    
1856
        <para>
1857
          Grows an instance's disk. This is only possible for
1858
          instances having a <literal>plain</literal> or
1859
          <literal>drbd</literal> disk template.
1860
        </para>
1861

    
1862
        <para>
1863
          Note that this command only change the block device size; it
1864
          will not grow the actual filesystems, partitions, etc. that
1865
          live on that disk. Usually, you will need to:
1866
          <orderedlist>
1867
            <listitem>
1868
              <simpara>use <command>gnt-instance grow-disk</command></simpara>
1869
            </listitem>
1870
            <listitem>
1871
              <simpara>reboot the instance (later, at a convenient
1872
              time)</simpara>
1873
            </listitem>
1874
            <listitem>
1875
              <simpara>use a filesystem resizer, such as
1876
              <citerefentry> <refentrytitle>ext2online</refentrytitle>
1877
              <manvolnum>8</manvolnum> </citerefentry> or
1878
              <citerefentry> <refentrytitle>xfs_growfs</refentrytitle>
1879
              <manvolnum>8</manvolnum> </citerefentry> to resize the
1880
              filesystem, or use <citerefentry>
1881
              <refentrytitle>fdisk</refentrytitle>
1882
              <manvolnum>8</manvolnum> </citerefentry> to change the
1883
              partition table on the disk
1884
              </simpara>
1885
            </listitem>
1886
          </orderedlist>
1887
        </para>
1888

    
1889

    
1890
        <para>
1891
          The <replaceable>disk</replaceable> argument is the index of
1892
          the instance disk to grow. The
1893
          <replaceable>amount</replaceable> argument is given either
1894
          as a number (and it represents the amount to increase the
1895
          disk with in mebibytes) or can be given similar to the
1896
          arguments in the create instance operation, with a suffix
1897
          denoting the unit.
1898
        </para>
1899

    
1900
        <para>
1901
          Note that the disk grow operation might complete on one node
1902
          but fail on the other; this will leave the instance with
1903
          different-sized LVs on the two nodes, but this will not
1904
          create problems (except for unused space).
1905
        </para>
1906

    
1907
        <para>
1908
          If you do not want gnt-instance to wait for the new disk
1909
          region to be synced, use the
1910
          <option>--no-wait-for-sync</option> option.
1911
        </para>
1912

    
1913
        <para>
1914
          The <option>--submit</option> option is used to send the job to
1915
          the master daemon but not wait for its completion. The job
1916
          ID will be shown so that it can be examined via
1917
          <command>gnt-job info</command>.
1918
        </para>
1919

    
1920

    
1921
        <para>Example (increase the first disk for instance1 by 16GiB):
1922
          <screen>
1923
# gnt-instance grow-disk instance1.example.com 0 16g
1924
          </screen>
1925
        </para>
1926

    
1927
        <para>
1928
          Also note that disk shrinking is not supported; use
1929
          <command>gnt-backup export</command> and then
1930
          <command>gnt-backup import</command> to reduce the disk size
1931
          of an instance.
1932
        </para>
1933
      </refsect3>
1934

    
1935
      <refsect3>
1936
        <title>RECREATE-DISKS</title>
1937

    
1938
        <cmdsynopsis>
1939
          <command>recreate-disks</command>
1940
          <arg>--submit</arg>
1941
          <arg>--disks=<option>indices</option></arg>
1942
          <arg choice="req"><replaceable>instance</replaceable></arg>
1943
        </cmdsynopsis>
1944
        <para>
1945
          Recreates the disks of the given instance, or only a subset
1946
          of the disks (if the option <option>disks</option> is
1947
          passed, which must be a comma-separated list of disk
1948
          indices, starting from zero).
1949
        </para>
1950

    
1951
        <para>
1952
          The <option>--submit</option> option is used to send the job to
1953
          the master daemon but not wait for its completion. The job
1954
          ID will be shown so that it can be examined via
1955
          <command>gnt-job info</command>.
1956
        </para>
1957

    
1958
      </refsect3>
1959

    
1960
    </refsect2>
1961

    
1962
    <refsect2>
1963
      <title>Recovery</title>
1964

    
1965
      <refsect3>
1966
        <title>FAILOVER</title>
1967

    
1968
        <cmdsynopsis>
1969
          <command>failover</command>
1970
          <arg>-f</arg>
1971
          <arg>--ignore-consistency</arg>
1972
          <arg>--submit</arg>
1973
          <arg choice="req"><replaceable>instance</replaceable></arg>
1974
        </cmdsynopsis>
1975

    
1976
        <para>
1977
          Failover will fail the instance over its secondary
1978
          node. This works only for instances having a drbd disk
1979
          template.
1980
        </para>
1981

    
1982
        <para>
1983
          Normally the failover will check the consistency of the
1984
          disks before failing over the instance. If you are trying to
1985
          migrate instances off a dead node, this will fail. Use the
1986
          <option>--ignore-consistency</option> option for this
1987
          purpose. Note that this option can be dangerous as errors in
1988
          shutting down the instance will be ignored, resulting in
1989
          possibly having the instance running on two machines in
1990
          parallel (on disconnected DRBD drives).
1991
        </para>
1992

    
1993
        <para>
1994
          The <option>--submit</option> option is used to send the job to
1995
          the master daemon but not wait for its completion. The job
1996
          ID will be shown so that it can be examined via
1997
          <command>gnt-job info</command>.
1998
        </para>
1999

    
2000
        <para>
2001
          Example:
2002
          <screen>
2003
# gnt-instance failover instance1.example.com
2004
          </screen>
2005
        </para>
2006
      </refsect3>
2007

    
2008
      <refsect3>
2009
        <title>MIGRATE</title>
2010

    
2011
        <cmdsynopsis>
2012
          <command>migrate</command>
2013
          <arg>-f</arg>
2014
          <arg choice="req">--cleanup</arg>
2015
          <arg choice="req"><replaceable>instance</replaceable></arg>
2016
        </cmdsynopsis>
2017

    
2018
        <cmdsynopsis>
2019
          <command>migrate</command>
2020
          <arg>-f</arg>
2021
          <arg>--non-live</arg>
2022
          <arg choice="req"><replaceable>instance</replaceable></arg>
2023
        </cmdsynopsis>
2024

    
2025
        <para>
2026
          Migrate will move the instance to its secondary node without
2027
          shutdown. It only works for instances having the drbd8 disk
2028
          template type.
2029
        </para>
2030

    
2031
        <para>
2032
          The migration command needs a perfectly healthy instance, as
2033
          we rely on the dual-master capability of drbd8 and the disks
2034
          of the instance are not allowed to be degraded.
2035
        </para>
2036

    
2037
        <para>
2038
          The <option>--non-live</option> option will switch (for the
2039
          hypervisors that support it) between a "fully live"
2040
          (i.e. the interruption is as minimal as possible) migration
2041
          and one in which the instance is frozen, its state saved and
2042
          transported to the remote node, and then resumed there. This
2043
          all depends on the hypervisor support for two different
2044
          methods. In any case, it is not an error to pass this
2045
          parameter (it will just be ignored if the hypervisor doesn't
2046
          support it).
2047
        </para>
2048

    
2049
        <para>
2050
          If the <option>--cleanup</option> option is passed, the
2051
          operation changes from migration to attempting recovery from
2052
          a failed previous migration. In this mode, ganeti checks if
2053
          the instance runs on the correct node (and updates its
2054
          configuration if not) and ensures the instances's disks are
2055
          configured correctly. In this mode, the
2056
          <option>--non-live</option> option is ignored.
2057
        </para>
2058

    
2059
        <para>
2060
          The option <option>-f</option> will skip the prompting for
2061
          confirmation.
2062
        </para>
2063
        <para>
2064
          Example (and expected output):
2065
          <screen>
2066
# gnt-instance migrate instance1
2067
Migrate will happen to the instance instance1. Note that migration is
2068
**experimental** in this version. This might impact the instance if
2069
anything goes wrong. Continue?
2070
y/[n]/?: y
2071
* checking disk consistency between source and target
2072
* ensuring the target is in secondary mode
2073
* changing disks into dual-master mode
2074
 - INFO: Waiting for instance instance1 to sync disks.
2075
 - INFO: Instance instance1's disks are in sync.
2076
* migrating instance to node2.example.com
2077
* changing the instance's disks on source node to secondary
2078
 - INFO: Waiting for instance instance1 to sync disks.
2079
 - INFO: Instance instance1's disks are in sync.
2080
* changing the instance's disks to single-master
2081
#
2082
          </screen>
2083
        </para>
2084
      </refsect3>
2085

    
2086
      <refsect3>
2087
        <title>MOVE</title>
2088

    
2089
        <cmdsynopsis>
2090
          <command>move</command>
2091
          <arg>-f</arg>
2092
          <arg>-n <replaceable>node</replaceable></arg>
2093
          <arg>--submit</arg>
2094
          <arg choice="req"><replaceable>instance</replaceable></arg>
2095
        </cmdsynopsis>
2096

    
2097
        <para>
2098
          Move will move the instance to an arbitrary node in the
2099
          cluster. This works only for instances having a plain or
2100
          file disk template.
2101
        </para>
2102

    
2103
        <para>
2104
          Note that since this operation is done via data copy, it
2105
          will take a long time for big disks (similar to
2106
          replace-disks for a drbd instance).
2107
        </para>
2108

    
2109
        <para>
2110
          The <option>--submit</option> option is used to send the job to
2111
          the master daemon but not wait for its completion. The job
2112
          ID will be shown so that it can be examined via
2113
          <command>gnt-job info</command>.
2114
        </para>
2115

    
2116
        <para>
2117
          Example:
2118
          <screen>
2119
# gnt-instance move -n node3.example.com instance1.example.com
2120
          </screen>
2121
        </para>
2122
      </refsect3>
2123

    
2124
    </refsect2>
2125

    
2126
    <refsect2>
2127
      <title>TAGS</title>
2128

    
2129
    <refsect3>
2130
        <title>ADD-TAGS</title>
2131

    
2132
        <cmdsynopsis>
2133
          <command>add-tags</command>
2134
          <arg choice="opt">--from <replaceable>file</replaceable></arg>
2135
          <arg choice="req"><replaceable>instancename</replaceable></arg>
2136
          <arg choice="req"
2137
            rep="repeat"><replaceable>tag</replaceable></arg>
2138
        </cmdsynopsis>
2139

    
2140
        <para>
2141
          Add tags to the given instance. If any of the tags contains
2142
          invalid characters, the entire operation will abort.
2143
        </para>
2144
        <para>
2145
          If the <option>--from</option> option is given, the list of
2146
          tags will be extended with the contents of that file (each
2147
          line becomes a tag). In this case, there is not need to pass
2148
          tags on the command line (if you do, both sources will be
2149
          used). A file name of - will be interpreted as stdin.
2150
        </para>
2151
      </refsect3>
2152

    
2153
      <refsect3>
2154
        <title>LIST-TAGS</title>
2155

    
2156
        <cmdsynopsis>
2157
          <command>list-tags</command>
2158
          <arg choice="req"><replaceable>instancename</replaceable></arg>
2159
        </cmdsynopsis>
2160

    
2161
        <para>List the tags of the given instance.</para>
2162
      </refsect3>
2163

    
2164
      <refsect3>
2165
        <title>REMOVE-TAGS</title>
2166
        <cmdsynopsis>
2167
          <command>remove-tags</command>
2168
          <arg choice="opt">--from <replaceable>file</replaceable></arg>
2169
          <arg choice="req"><replaceable>instancename</replaceable></arg>
2170
          <arg choice="req"
2171
            rep="repeat"><replaceable>tag</replaceable></arg>
2172
        </cmdsynopsis>
2173

    
2174
        <para>
2175
          Remove tags from the given instance. If any of the tags are
2176
          not existing on the node, the entire operation will abort.
2177
        </para>
2178

    
2179
        <para>
2180
          If the <option>--from</option> option is given, the list of
2181
          tags will be extended with the contents of that file (each
2182
          line becomes a tag). In this case, there is not need to pass
2183
          tags on the command line (if you do, both sources will be
2184
          used). A file name of - will be interpreted as stdin.
2185
        </para>
2186
      </refsect3>
2187

    
2188
    </refsect2>
2189

    
2190
  </refsect1>
2191

    
2192
  &footer;
2193

    
2194
</refentry>
2195

    
2196
<!-- Keep this comment at the end of the file
2197
Local variables:
2198
mode: sgml
2199
sgml-omittag:t
2200
sgml-shorttag:t
2201
sgml-minimize-attributes:nil
2202
sgml-always-quote-attributes:t
2203
sgml-indent-step:2
2204
sgml-indent-data:t
2205
sgml-parent-document:nil
2206
sgml-default-dtd-file:nil
2207
sgml-exposed-tags:nil
2208
sgml-local-catalogs:nil
2209
sgml-local-ecat-files:nil
2210
End:
2211
-->