root / man / gnt-instance.sgml @ ca9c49d5
History | View | Annotate | Download (40 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>May 16, 2007</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 |
<holder>Google Inc.</holder> |
24 |
</copyright> |
25 |
&dhdate; |
26 |
</refentryinfo> |
27 |
<refmeta> |
28 |
&dhucpackage; |
29 |
|
30 |
&dhsection; |
31 |
<refmiscinfo>ganeti 1.2</refmiscinfo> |
32 |
</refmeta> |
33 |
<refnamediv> |
34 |
<refname>&dhpackage;</refname> |
35 |
|
36 |
<refpurpose>ganeti instance administration</refpurpose> |
37 |
</refnamediv> |
38 |
<refsynopsisdiv> |
39 |
<cmdsynopsis> |
40 |
<command>&dhpackage; </command> |
41 |
|
42 |
<arg choice="req">command</arg> |
43 |
<arg>arguments...</arg> |
44 |
</cmdsynopsis> |
45 |
</refsynopsisdiv> |
46 |
<refsect1> |
47 |
<title>DESCRIPTION</title> |
48 |
|
49 |
<para> |
50 |
The <command>&dhpackage;</command> is used for instance |
51 |
administration in the ganeti system. |
52 |
</para> |
53 |
|
54 |
</refsect1> |
55 |
<refsect1> |
56 |
<title>COMMANDS</title> |
57 |
|
58 |
<refsect2> |
59 |
<title>Creation/removal/querying</title> |
60 |
|
61 |
<refsect3> |
62 |
<title>ADD</title> |
63 |
<cmdsynopsis> |
64 |
<command>add</command> |
65 |
<arg>-s <replaceable>disksize</replaceable></arg> |
66 |
<arg>--swap-size <replaceable>disksize</replaceable></arg> |
67 |
<arg>-m <replaceable>memsize</replaceable></arg> |
68 |
<sbr> |
69 |
|
70 |
<arg>-b <replaceable>bridge</replaceable></arg> |
71 |
<arg>--mac <replaceable>MAC-address</replaceable></arg> |
72 |
<sbr> |
73 |
|
74 |
<arg>--hvm-boot-order <replaceable>boot-order</replaceable></arg> |
75 |
<arg>--hvm-acpi <replaceable>ACPI-support</replaceable></arg> |
76 |
<arg>--hvm-pae <replaceable>PAE-support</replaceable></arg> |
77 |
<arg>--hvm-cdrom-image-path |
78 |
<replaceable>cdrom-image-path</replaceable></arg> |
79 |
<arg>--vnc-bind-address |
80 |
<replaceable>vnc-bind-address</replaceable></arg> |
81 |
|
82 |
<sbr> |
83 |
|
84 |
<arg>--kernel<group choice="req"> |
85 |
<arg>default</arg> |
86 |
<arg><replaceable>kernel_path</replaceable></arg> |
87 |
</group></arg> |
88 |
<sbr> |
89 |
|
90 |
<arg>--initrd<group choice="req"> |
91 |
<arg>default</arg> |
92 |
<arg>none</arg> |
93 |
<arg><replaceable>initrd_path</replaceable></arg> |
94 |
</group></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 |
<arg choice="req">-t<group choice="req"> |
105 |
<arg>diskless</arg> |
106 |
<arg>file</arg> |
107 |
<arg>plain</arg> |
108 |
<arg>drbd</arg> |
109 |
</group></arg> |
110 |
<sbr> |
111 |
|
112 |
<arg choice="req">-n <replaceable>node<optional>:secondary-node</optional></replaceable></arg> |
113 |
<arg choice="req">-o <replaceable>os-type</replaceable></arg> |
114 |
<sbr> |
115 |
|
116 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
117 |
</cmdsynopsis> |
118 |
|
119 |
<para> |
120 |
Creates a new instance on the specified |
121 |
host. <replaceable>instance</replaceable> must be in DNS and |
122 |
resolve to a IP in the same network as the nodes in the |
123 |
cluster. |
124 |
</para> |
125 |
|
126 |
<para> |
127 |
The <option>-s</option> option specifies the disk size for |
128 |
the instance, in mebibytes (defaults to |
129 |
<constant>20480MiB</constant> = |
130 |
<constant>20GiB</constant>). You can also use one of the |
131 |
suffixes <literal>m</literal>, <literal>g</literal> or |
132 |
<literal>t</literal> to specificy the exact the units used; |
133 |
these suffixes map to mebibytes, gibibytes and tebibytes. |
134 |
</para> |
135 |
|
136 |
<para> |
137 |
The <option>--swap-size</option> option specifies the swap |
138 |
disk size (in mebibytes) for the instance (the one presented |
139 |
as <filename class="devicefile">/dev/sdb</filename>). The |
140 |
default is <constant>4096MiB</constant>. As for the disk |
141 |
size, you can specify other suffixes. |
142 |
</para> |
143 |
|
144 |
<para> |
145 |
The <option>-m</option> option specifies the memory size for |
146 |
the instance, in mebibytes (defaults to 128 MiB). Again, you |
147 |
can use other suffixes (e.g. <userinput>2g</userinput>). |
148 |
</para> |
149 |
|
150 |
<para> |
151 |
The <option>-o</option> options specifies the operating |
152 |
system to be installed. The available operating systems can |
153 |
be listed with <command>gnt-os list</command>. |
154 |
</para> |
155 |
|
156 |
<para> |
157 |
The <option>-b</option> option specifies the bridge to which the |
158 |
instance will be connected. (defaults to the cluster-wide default |
159 |
bridge specified at cluster initialization time). |
160 |
</para> |
161 |
|
162 |
<para> |
163 |
The <option>--mac</option> option specifies the MAC address |
164 |
of the ethernet interface for the instance. If this option |
165 |
is not specified, a new MAC address is generated randomly with |
166 |
the configured MAC prefix. The randomly generated MAC |
167 |
address is guaranteed to be unique among the instances of |
168 |
this cluster. |
169 |
</para> |
170 |
|
171 |
<para> |
172 |
The <option>--hvm-boot-order</option> option specifies the |
173 |
boot device order for Xen HVM instances. The boot order is a |
174 |
string of letters listing the boot devices, with valid |
175 |
device letters being: |
176 |
</para> |
177 |
|
178 |
<para> |
179 |
<variablelist> |
180 |
<varlistentry> |
181 |
<term>a</term> |
182 |
<listitem> |
183 |
<para> |
184 |
floppy drive |
185 |
</para> |
186 |
</listitem> |
187 |
</varlistentry> |
188 |
<varlistentry> |
189 |
<term>c</term> |
190 |
<listitem> |
191 |
<para> |
192 |
hard disk |
193 |
</para> |
194 |
</listitem> |
195 |
</varlistentry> |
196 |
<varlistentry> |
197 |
<term>d</term> |
198 |
<listitem> |
199 |
<para> |
200 |
CDROM drive |
201 |
</para> |
202 |
</listitem> |
203 |
</varlistentry> |
204 |
<varlistentry> |
205 |
<term>n</term> |
206 |
<listitem> |
207 |
<para> |
208 |
network boot (PXE) |
209 |
</para> |
210 |
</listitem> |
211 |
</varlistentry> |
212 |
</variablelist> |
213 |
</para> |
214 |
|
215 |
<para> |
216 |
The option is only relevant for Xen HVM instances and |
217 |
ignored by all other instances types. |
218 |
</para> |
219 |
|
220 |
<para> |
221 |
The <option>--hvm-acpi</option> option specifies if Xen |
222 |
should enable ACPI support for this HVM instance. Valid |
223 |
values are true or false. |
224 |
</para> |
225 |
|
226 |
<para> |
227 |
The <option>--hvm-pae</option> option specifies if Xen |
228 |
should enabled PAE support for this HVM instance. Valid |
229 |
values are true or false. |
230 |
</para> |
231 |
|
232 |
<para> |
233 |
The <option>--hvm-cdrom-image-path</option> specifies the |
234 |
path to the file xen uses to emulate a virtual CDROM drive |
235 |
for this HVM instance. Valid values are either an |
236 |
absolute path to an existing file or None, which disables |
237 |
virtual CDROM support for this instance. |
238 |
</para> |
239 |
|
240 |
<para> |
241 |
The <option>--vnc-bind-address</option> specifies the |
242 |
address that the VNC listener for this instance should bind |
243 |
to. Valid values are IPv4 addresses. Use the address 0.0.0.0 |
244 |
to bind to all available interfaces. |
245 |
</para> |
246 |
|
247 |
<para> |
248 |
The <option>--kernel</option> options allows the instance to |
249 |
use a custom kernel (if a filename is passed) or to use the |
250 |
default kernel (<filename>@CUSTOM_XEN_KERNEL@</filename>), if the |
251 |
string <constant>default</constant> is passed. |
252 |
</para> |
253 |
|
254 |
<para> |
255 |
The <option>--initrd</option> option is similar: it allows |
256 |
the instance to use a custom initrd (if a filename is |
257 |
passed) or to use the default initrd |
258 |
(<filename>@CUSTOM_XEN_INITRD@</filename>), if the string |
259 |
<constant>default</constant> is passed, or to disable the |
260 |
use of an initrd, if the string <constant>none</constant> is |
261 |
passed. Note that in the case the instance is set to use the |
262 |
default initrd and it doesn't exist, it will be silently |
263 |
ignored; if the instance is set to use a custom initrd and |
264 |
it doesn't exist, this will be treated as an error and will |
265 |
prevent the startup of the instance. |
266 |
</para> |
267 |
|
268 |
<para> |
269 |
The <option>-t</option> options specifies the disk layout type for |
270 |
the instance. The available choices are: |
271 |
<variablelist> |
272 |
<varlistentry> |
273 |
<term>diskless</term> |
274 |
<listitem> |
275 |
<para> |
276 |
This creates an instance with no disks. Its useful for |
277 |
testing only (or other special cases). |
278 |
</para> |
279 |
</listitem> |
280 |
</varlistentry> |
281 |
<varlistentry> |
282 |
<term>file</term> |
283 |
<listitem> |
284 |
<para>Disk devices will be regular files.</para> |
285 |
</listitem> |
286 |
</varlistentry> |
287 |
<varlistentry> |
288 |
<term>plain</term> |
289 |
<listitem> |
290 |
<para>Disk devices will be logical volumes.</para> |
291 |
</listitem> |
292 |
</varlistentry> |
293 |
<varlistentry> |
294 |
<term>drbd</term> |
295 |
<listitem> |
296 |
<para> |
297 |
Disk devices will be drbd (version 8.x) on top of |
298 |
lvm volumes. |
299 |
</para> |
300 |
</listitem> |
301 |
</varlistentry> |
302 |
</variablelist> |
303 |
</para> |
304 |
|
305 |
<para> |
306 |
The optional second value of the <option>--node</option> is used for |
307 |
the drbd template type and specifies the remote node. |
308 |
</para> |
309 |
|
310 |
<para> |
311 |
If you do not want gnt-instance to wait for the disk mirror |
312 |
to be synced, use the <option>--no-wait-for-sync</option> |
313 |
option. |
314 |
</para> |
315 |
|
316 |
<para> |
317 |
The <option>--file-storage-dir</option> specifies the relative path |
318 |
under the cluster-wide file storage directory to store file-based |
319 |
disks. It is useful for having different subdirectories for |
320 |
different instances. The full path of the directory where the disk |
321 |
files are stored will consist of cluster-wide file storage directory |
322 |
+ optional subdirectory + instance name. Example: |
323 |
/srv/ganeti/file-storage/mysubdir/instance1.example.com. This option |
324 |
is only relevant for instances using the file storage backend. |
325 |
</para> |
326 |
|
327 |
<para> |
328 |
The <option>--file-driver</option> specifies the driver to use for |
329 |
file-based disks. Note that currently these drivers work with the |
330 |
xen hypervisor only. This option is only relevant for instances using |
331 |
the file storage backend. The available choices are: |
332 |
<variablelist> |
333 |
<varlistentry> |
334 |
<term>loop</term> |
335 |
<listitem> |
336 |
<para>Kernel loopback driver.</para> |
337 |
</listitem> |
338 |
</varlistentry> |
339 |
<varlistentry> |
340 |
<term>blktap</term> |
341 |
<listitem> |
342 |
<para>blktap driver.</para> |
343 |
</listitem> |
344 |
</varlistentry> |
345 |
<variablelist> |
346 |
</para> |
347 |
|
348 |
<para> |
349 |
The loop driver uses loopback devices to access the filesystem |
350 |
within the file. However, running I/O intensive applications |
351 |
in your instance using the loop driver might result in slowdowns. |
352 |
Furthermore, if you use the loopback driver consider increasing |
353 |
the maximum amount of loopback devices (on most systems it's 8) |
354 |
using the max_loop param. |
355 |
</para> |
356 |
|
357 |
<para> |
358 |
In order to be able to use the blktap driver you should check |
359 |
if the 'blktapctrl' user space disk agent is running (usually |
360 |
automatically started via xend). This user-level disk I/O |
361 |
interface has the advantage of better performance. Especially |
362 |
if you use a network file system (e.g. NFS) to store your instances |
363 |
this is the recommended choice. |
364 |
</para> |
365 |
|
366 |
<para> |
367 |
Example: |
368 |
<screen> |
369 |
# gnt-instance add -t file -s 30g -m 512 -o debian-etch \ |
370 |
-n node1.example.com --file-storage-dir=mysubdir instance1.example.com |
371 |
# gnt-instance add -t plain -s 30g -m 512 -o debian-etch \ |
372 |
-n node1.example.com instance1.example.com |
373 |
# gnt-instance add -t drbd -s 30g -m 512 -o debian-etch \ |
374 |
-n node1.example.com:node2.example.com instance2.example.com |
375 |
</screen> |
376 |
</para> |
377 |
</refsect3> |
378 |
|
379 |
<refsect3> |
380 |
<title>REMOVE</title> |
381 |
|
382 |
<cmdsynopsis> |
383 |
<command>remove</command> |
384 |
<arg>--ignore-failures</arg> |
385 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
386 |
</cmdsynopsis> |
387 |
|
388 |
<para> |
389 |
Remove an instance. This will remove all data from the |
390 |
instance and there is <emphasis>no way back</emphasis>. If |
391 |
you are not sure if you use an instance again, use |
392 |
<command>shutdown</command> first and leave it in the |
393 |
shutdown state for a while. |
394 |
|
395 |
</para> |
396 |
|
397 |
<para> |
398 |
The <option>--ignore-failures</option> option will cause the |
399 |
removal to proceed even in the presence of errors during the |
400 |
removal of the instance (e.g. during the shutdown or the |
401 |
disk removal). If this option is not given, the command will |
402 |
stop at the first error. |
403 |
</para> |
404 |
|
405 |
<para> |
406 |
Example: |
407 |
<screen> |
408 |
# gnt-instance remove instance1.example.com |
409 |
</screen> |
410 |
</para> |
411 |
</refsect3> |
412 |
|
413 |
<refsect3> |
414 |
<title>LIST</title> |
415 |
|
416 |
<cmdsynopsis> |
417 |
<command>list</command> |
418 |
<arg>--no-headers</arg> |
419 |
<arg>--separator=<replaceable>SEPARATOR</replaceable></arg> |
420 |
<arg>-o <replaceable>[+]FIELD,...</replaceable></arg> |
421 |
</cmdsynopsis> |
422 |
|
423 |
<para> |
424 |
Shows the currently configured instances with memory usage, |
425 |
disk usage, the node they are running on, and the CPU time, |
426 |
counted in seconds, used by each instance since its latest |
427 |
restart. |
428 |
</para> |
429 |
|
430 |
<para> |
431 |
The <option>--no-headers</option> option will skip the |
432 |
initial header line. The <option>--separator</option> option |
433 |
takes an argument which denotes what will be used between |
434 |
the output fields. Both these options are to help scripting. |
435 |
</para> |
436 |
|
437 |
<para> |
438 |
The <option>-o</option> option takes a comma-separated list |
439 |
of output fields. The available fields and their meaning |
440 |
are: |
441 |
<variablelist> |
442 |
<varlistentry> |
443 |
<term>name</term> |
444 |
<listitem> |
445 |
<simpara>the instance name</simpara> |
446 |
</listitem> |
447 |
</varlistentry> |
448 |
<varlistentry> |
449 |
<term>os</term> |
450 |
<listitem> |
451 |
<simpara>the OS of the instance</simpara> |
452 |
</listitem> |
453 |
</varlistentry> |
454 |
<varlistentry> |
455 |
<term>pnode</term> |
456 |
<listitem> |
457 |
<simpara>the primary node of the instance</simpara> |
458 |
</listitem> |
459 |
</varlistentry> |
460 |
<varlistentry> |
461 |
<term>snodes</term> |
462 |
<listitem> |
463 |
<simpara>comma-separated list of secondary nodes for the |
464 |
instance; usually this will be just one node</simpara> |
465 |
</listitem> |
466 |
</varlistentry> |
467 |
<varlistentry> |
468 |
<term>admin_state</term> |
469 |
<listitem> |
470 |
<simpara>the desired state of the instance (either "yes" |
471 |
or "no" denoting the instance should run or |
472 |
not)</simpara> |
473 |
</listitem> |
474 |
</varlistentry> |
475 |
<varlistentry> |
476 |
<term>admin_ram</term> |
477 |
<listitem> |
478 |
<simpara>the desired memory for the instance</simpara> |
479 |
</listitem> |
480 |
</varlistentry> |
481 |
<varlistentry> |
482 |
<term>disk_template</term> |
483 |
<listitem> |
484 |
<simpara>the disk template of the instance</simpara> |
485 |
</listitem> |
486 |
</varlistentry> |
487 |
<varlistentry> |
488 |
<term>oper_state</term> |
489 |
<listitem> |
490 |
<simpara>the actual state of the instance; can be |
491 |
one of the values "running", "stopped", "(node |
492 |
down)"</simpara> |
493 |
</listitem> |
494 |
</varlistentry> |
495 |
<varlistentry> |
496 |
<term>status</term> |
497 |
<listitem> |
498 |
<simpara>combined form of admin_state and oper_stat; |
499 |
this can be one of: |
500 |
<computeroutput>ERROR_nodedown</computeroutput> if the |
501 |
node of the instance is down, |
502 |
<computeroutput>ERROR_down</computeroutput> if the |
503 |
instance should run but is down, |
504 |
<computeroutput>ERROR_up</computeroutput> if the |
505 |
instance should be stopped but is actually running, |
506 |
<computeroutput>ADMIN_down</computeroutput> if the |
507 |
instance has been stopped (and is stopped) and |
508 |
<computeroutput>running</computeroutput> if the |
509 |
instance is set to be running (and is |
510 |
running)</simpara> |
511 |
</listitem> |
512 |
</varlistentry> |
513 |
<varlistentry> |
514 |
<term>oper_ram</term> |
515 |
<listitem> |
516 |
<simpara>the actual memory usage of the instance as seen |
517 |
by the hypervisor</simpara> |
518 |
</listitem> |
519 |
</varlistentry> |
520 |
<varlistentry> |
521 |
<term>ip</term> |
522 |
<listitem> |
523 |
<simpara>the ip address ganeti recognizes as associated with |
524 |
the instance interface</simpara> |
525 |
</listitem> |
526 |
</varlistentry> |
527 |
<varlistentry> |
528 |
<term>mac</term> |
529 |
<listitem> |
530 |
<simpara>the instance interface MAC address</simpara> |
531 |
</listitem> |
532 |
</varlistentry> |
533 |
<varlistentry> |
534 |
<term>bridge</term> |
535 |
<listitem> |
536 |
<simpara>bridge the instance is connected to |
537 |
</simpara> |
538 |
</listitem> |
539 |
</varlistentry> |
540 |
<varlistentry> |
541 |
<term>sda_size</term> |
542 |
<listitem> |
543 |
<simpara>the size of the instance's first disk</simpara> |
544 |
</listitem> |
545 |
</varlistentry> |
546 |
<varlistentry> |
547 |
<term>sdb_size</term> |
548 |
<listitem> |
549 |
<simpara>the size of the instance's second disk</simpara> |
550 |
</listitem> |
551 |
</varlistentry> |
552 |
<varlistentry> |
553 |
<term>vcpus</term> |
554 |
<listitem> |
555 |
<simpara>the number of VCPUs allocated to the |
556 |
instance</simpara> |
557 |
</listitem> |
558 |
</varlistentry> |
559 |
</variablelist> |
560 |
</para> |
561 |
|
562 |
<para> |
563 |
If the value of the option starts with the character |
564 |
<constant>+</constant>, the new fields will be added to the |
565 |
default list. This allows to quickly see the default list |
566 |
plus a few other fields, instead of retyping the entire list |
567 |
of fields. |
568 |
</para> |
569 |
|
570 |
<para> |
571 |
There is a subtle grouping about the available output |
572 |
fields: all fields except for <option>oper_state</option>, |
573 |
<option>oper_ram</option> and <option>status</option> are |
574 |
configuration value and not run-time values. So if you don't |
575 |
select any of the these fields, the query will be satisfied |
576 |
instantly from the cluster configuration, without having to |
577 |
ask the remote nodes for the data. This can be helpful for |
578 |
big clusters when you only want some data and it makes sense |
579 |
to specify a reduced set of output fields. |
580 |
</para> |
581 |
|
582 |
<para>The default output field list is: |
583 |
<simplelist type="inline"> |
584 |
<member>name</member> |
585 |
<member>os</member> |
586 |
<member>pnode</member> |
587 |
<member>admin_state</member> |
588 |
<member>oper_state</member> |
589 |
<member>oper_ram</member> |
590 |
</simplelist>. |
591 |
</para> |
592 |
</refsect3> |
593 |
|
594 |
<refsect3> |
595 |
<title>INFO</title> |
596 |
|
597 |
<cmdsynopsis> |
598 |
<command>info</command> |
599 |
<arg rep="repeat"><replaceable>instance</replaceable></arg> |
600 |
</cmdsynopsis> |
601 |
|
602 |
<para> |
603 |
Show detailed information about the (given) instances. This |
604 |
is different from <command>list</command> as it shows |
605 |
detailed data about the instance's disks (especially useful |
606 |
for drbd disk template). |
607 |
</para> |
608 |
</refsect3> |
609 |
|
610 |
<refsect3> |
611 |
<title>MODIFY</title> |
612 |
|
613 |
<cmdsynopsis> |
614 |
<command>modify</command> |
615 |
<arg choice="opt">-m <replaceable>memsize</replaceable></arg> |
616 |
<arg choice="opt">-p <replaceable>vcpus</replaceable></arg> |
617 |
<arg choice="opt">-i <replaceable>ip</replaceable></arg> |
618 |
<arg choice="opt">-b <replaceable>bridge</replaceable></arg> |
619 |
<arg choice="opt">--mac <replaceable>MAC-address</replaceable></arg> |
620 |
<arg>--hvm-boot-order <replaceable>boot-order</replaceable></arg> |
621 |
<arg>--hvm-acpi <replaceable>ACPI-support</replaceable></arg> |
622 |
<arg>--hvm-pae <replaceable>PAE-support</replaceable></arg> |
623 |
<arg>--hvm-cdrom-image-path |
624 |
<replaceable>cdrom-image-path</replaceable></arg> |
625 |
<arg>--vnc-bind-address |
626 |
<replaceable>vnc-bind-address</replaceable></arg> |
627 |
|
628 |
<sbr> |
629 |
<arg>--kernel <group choice="req"> |
630 |
<arg>default</arg> |
631 |
<arg><replaceable>kernel_path</replaceable></arg> |
632 |
</group></arg> |
633 |
<sbr> |
634 |
<arg>--initrd <group choice="req"> |
635 |
<arg>default</arg> |
636 |
<arg>none</arg> |
637 |
<arg><replaceable>initrd_path</replaceable></arg> |
638 |
</group> </arg> |
639 |
<sbr> |
640 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
641 |
</cmdsynopsis> |
642 |
|
643 |
<para> |
644 |
Modify the memory size, number of vcpus, ip address, MAC |
645 |
address and/or bridge for an instance. |
646 |
</para> |
647 |
|
648 |
<para> |
649 |
The memory size is given in MiB. Note that you need to give |
650 |
at least one of the arguments, otherwise the command |
651 |
complains. |
652 |
</para> |
653 |
|
654 |
<para> |
655 |
The <option>--kernel</option>, <option>--initrd</option> |
656 |
and <option>--hvm-boot-order</option> |
657 |
options are described in the <command>add</command> command. |
658 |
</para> |
659 |
|
660 |
<para> |
661 |
Additionally, the HVM boot order can be reset to the default |
662 |
values by using <option>--hvm-boot-order=default</option>. |
663 |
</para> |
664 |
|
665 |
<para> |
666 |
The <option>--hvm-acpi</option> option specifies if Xen |
667 |
should enable ACPI support for this HVM instance. Valid |
668 |
values are true or false. |
669 |
</para> |
670 |
|
671 |
<para> |
672 |
The <option>--hvm-pae</option> option specifies if Xen |
673 |
should enabled PAE support for this HVM instance. Valid |
674 |
values are true or false. |
675 |
</para> |
676 |
|
677 |
<para> |
678 |
The <option>--hvm-cdrom-image-path</option> specifies the |
679 |
path to the file xen uses to emulate a virtual CDROM drive |
680 |
for this HVM instance. Valid values are either an |
681 |
absolute path to an existing file or None, which disables |
682 |
virtual CDROM support for this instance. |
683 |
</para> |
684 |
|
685 |
<para> |
686 |
The <option>--vnc-bind-address</option> specifies the |
687 |
address that the VNC listener for this instance should bind |
688 |
to. Valid values are IPv4 addresses. Use the address 0.0.0.0 |
689 |
to bind to all available interfaces. |
690 |
</para> |
691 |
|
692 |
<para> |
693 |
All the changes take effect at the next restart. If the |
694 |
instance is running, there is no effect on the instance. |
695 |
</para> |
696 |
</refsect3> |
697 |
|
698 |
<refsect3> |
699 |
<title>REINSTALL</title> |
700 |
|
701 |
<cmdsynopsis> |
702 |
<command>reinstall</command> |
703 |
<arg choice="opt">-o <replaceable>os-type</replaceable></arg> |
704 |
<arg choice="opt">-f <replaceable>force</replaceable></arg> |
705 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
706 |
</cmdsynopsis> |
707 |
|
708 |
<para> |
709 |
Reinstalls the operating system on the given instance. The instance |
710 |
must be stopped when running this command. If the |
711 |
<option>--os-type</option> is specified, the operating system is |
712 |
changed. |
713 |
</para> |
714 |
</refsect3> |
715 |
|
716 |
<refsect3> |
717 |
<title>RENAME</title> |
718 |
|
719 |
<cmdsynopsis> |
720 |
<command>rename</command> |
721 |
<arg>--no-ip-check</arg> |
722 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
723 |
<arg choice="req"><replaceable>new_name</replaceable></arg> |
724 |
</cmdsynopsis> |
725 |
|
726 |
<para> |
727 |
Renames the given instance. The instance must be stopped |
728 |
when running this command. The requirements for the new name |
729 |
are the same as for adding an instance: the new name must be |
730 |
resolvable and the IP it resolves to must not be reachable |
731 |
(in order to prevent duplicate IPs the next time the |
732 |
instance is started). The IP test can be skipped if the |
733 |
<option>--no-ip-check</option> option is passed. |
734 |
</para> |
735 |
</refsect3> |
736 |
|
737 |
</refsect2> |
738 |
|
739 |
<refsect2> |
740 |
<title>Starting/stopping/connecting to console</title> |
741 |
|
742 |
<refsect3> |
743 |
<title>STARTUP</title> |
744 |
|
745 |
<cmdsynopsis> |
746 |
<command>startup</command> |
747 |
<arg>--extra=<replaceable>PARAMS</replaceable></arg> |
748 |
<arg>--force</arg> |
749 |
<sbr> |
750 |
<group choice="opt"> |
751 |
<arg>--instance</arg> |
752 |
<arg>--node</arg> |
753 |
<arg>--primary</arg> |
754 |
<arg>--secondary</arg> |
755 |
<arg>--all</arg> |
756 |
</group> |
757 |
<sbr> |
758 |
<arg choice="opt" |
759 |
rep="repeat"><replaceable>name</replaceable></arg> |
760 |
</cmdsynopsis> |
761 |
|
762 |
<para> |
763 |
Starts one or more instances, depending on the following |
764 |
options. The four available modes are: |
765 |
<variablelist> |
766 |
<varlistentry> |
767 |
<term><option>--instance</option></term> |
768 |
<listitem> |
769 |
<simpara>will start the instances given as arguments |
770 |
(at least one argument required); this is the default |
771 |
selection</simpara> |
772 |
</listitem> |
773 |
</varlistentry> |
774 |
<varlistentry> |
775 |
<term>--node</term> |
776 |
<listitem> |
777 |
<simpara>will start the instances who have the given |
778 |
node as either primary or secondary</simpara> |
779 |
</listitem> |
780 |
</varlistentry> |
781 |
<varlistentry> |
782 |
<term><option>--primary</option></term> |
783 |
<listitem> |
784 |
<simpara>will start all instances whose primary node |
785 |
is in the list of nodes passed as arguments (at least |
786 |
one node required)</simpara> |
787 |
</listitem> |
788 |
</varlistentry> |
789 |
<varlistentry> |
790 |
<term><option>--secondary</option></term> |
791 |
<listitem> |
792 |
<simpara>will start all instances whose secondary node |
793 |
is in the list of nodes passed as arguments (at least |
794 |
one node required)</simpara> |
795 |
</listitem> |
796 |
</varlistentry> |
797 |
<varlistentry> |
798 |
<term>--all</term> |
799 |
<listitem> |
800 |
<simpara>will start all instances in the cluster (no |
801 |
arguments accepted)</simpara> |
802 |
</listitem> |
803 |
</varlistentry> |
804 |
</variablelist> |
805 |
</para> |
806 |
|
807 |
<para> |
808 |
Note that although you can pass more than one selection |
809 |
option, the last one wins, so in order to guarantee the |
810 |
desired result, don't pass more than one such option. |
811 |
</para> |
812 |
|
813 |
<para> |
814 |
The <option>--extra</option> option is used to pass |
815 |
additional argument to the instance's kernel for this start |
816 |
only. Currently there is no way to specify a persistent set |
817 |
of arguments (beside the one hardcoded). Note that this may |
818 |
not apply to all virtualization types. |
819 |
</para> |
820 |
|
821 |
<para> |
822 |
Use <option>--force</option> to start even if secondary disks are |
823 |
failing. |
824 |
</para> |
825 |
|
826 |
<para> |
827 |
Example: |
828 |
<screen> |
829 |
# gnt-instance start instance1.example.com |
830 |
# gnt-instance start --extra single test1.example.com |
831 |
# gnt-instance start --node node1.example.com node2.example.com |
832 |
# gnt-instance start --all |
833 |
</screen> |
834 |
</para> |
835 |
</refsect3> |
836 |
|
837 |
<refsect3> |
838 |
<title>SHUTDOWN</title> |
839 |
|
840 |
<cmdsynopsis> |
841 |
<command>shutdown</command> |
842 |
<sbr> |
843 |
<group choice="opt"> |
844 |
<arg>--instance</arg> |
845 |
<arg>--node</arg> |
846 |
<arg>--primary</arg> |
847 |
<arg>--secondary</arg> |
848 |
<arg>--all</arg> |
849 |
</group> |
850 |
<sbr> |
851 |
|
852 |
<arg choice="opt" |
853 |
rep="repeat"><replaceable>name</replaceable></arg> |
854 |
</cmdsynopsis> |
855 |
|
856 |
<para> |
857 |
Stops one or more instances. If the instance cannot be |
858 |
cleanly stopped during a hardcoded interval (currently 2 |
859 |
minutes), it will forcibly stop the instance (equivalent to |
860 |
switching off the power on a physical machine). |
861 |
</para> |
862 |
|
863 |
<para> |
864 |
The <option>--instance</option>, <option>--node</option>, |
865 |
<option>--primary</option>, <option>--secondary</option> and |
866 |
<option>--all</option> options are similar as for the |
867 |
<command>startup</command> command and they influence the |
868 |
actual instances being shutdown. |
869 |
</para> |
870 |
|
871 |
<para> |
872 |
Example: |
873 |
<screen> |
874 |
# gnt-instance shutdown instance1.example.com |
875 |
# gnt-instance shutdown --all |
876 |
</screen> |
877 |
</para> |
878 |
</refsect3> |
879 |
|
880 |
<refsect3> |
881 |
<title>REBOOT</title> |
882 |
|
883 |
<cmdsynopsis> |
884 |
<command>reboot</command> |
885 |
<sbr> |
886 |
<arg>--extra=<replaceable>PARAMS</replaceable></arg> |
887 |
<sbr> |
888 |
<arg>--type=<replaceable>REBOOT-TYPE</replaceable></arg> |
889 |
<sbr> |
890 |
<arg>--ignore-secondaries</arg> |
891 |
<sbr> |
892 |
<arg>--force-multiple</arg> |
893 |
<sbr> |
894 |
<group choice="opt"> |
895 |
<arg>--instance</arg> |
896 |
<arg>--node</arg> |
897 |
<arg>--primary</arg> |
898 |
<arg>--secondary</arg> |
899 |
<arg>--all</arg> |
900 |
</group> |
901 |
<sbr> |
902 |
|
903 |
<arg choice="opt" |
904 |
rep="repeat"><replaceable>name</replaceable></arg> |
905 |
</cmdsynopsis> |
906 |
|
907 |
<para> |
908 |
Reboots one or more instances. The type of reboot depends on |
909 |
the value of <option>--type</option>. A soft reboot does a |
910 |
hypervisor reboot, a hard reboot does a instance stop, |
911 |
recreates the hypervisor config for the instance and |
912 |
starts the instance. A full reboot does the equivalent |
913 |
of <command>gnt-instance shutdown && gnt-instance |
914 |
startup</command>. The default is soft reboot. |
915 |
</para> |
916 |
|
917 |
<para> |
918 |
For the hard reboot the option |
919 |
<option>--ignore-secondaries</option> ignores errors for the |
920 |
secondary node while re-assembling the instance disks. |
921 |
</para> |
922 |
|
923 |
<para> |
924 |
The <option>--instance</option>, <option>--node</option>, |
925 |
<option>--primary</option>, <option>--secondary</option> and |
926 |
<option>--all</option> options are similar as for the |
927 |
<command>startup</command> command and they influence the |
928 |
actual instances being rebooted. |
929 |
</para> |
930 |
|
931 |
<para> |
932 |
Use the <option>--force-multiple</option> option to keep |
933 |
gnt-instance from asking for confirmation when more than one |
934 |
instance is affected. |
935 |
</para> |
936 |
|
937 |
<para> |
938 |
Example: |
939 |
<screen> |
940 |
# gnt-instance reboot instance1.example.com |
941 |
# gnt-instance reboot --type=full instance1.example.com |
942 |
</screen> |
943 |
</para> |
944 |
</refsect3> |
945 |
|
946 |
<refsect3> |
947 |
<title>CONSOLE</title> |
948 |
<cmdsynopsis> |
949 |
<command>console</command> |
950 |
<arg choice="opt">--show-cmd</arg> |
951 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
952 |
</cmdsynopsis> |
953 |
|
954 |
<para> |
955 |
Connects to the console of the given instance. If the instance |
956 |
is not up, an error is returned. Use the <option>--show-cmd</option> |
957 |
option to display the command instead of executing it. |
958 |
</para> |
959 |
|
960 |
<para> |
961 |
Example: |
962 |
<screen> |
963 |
# gnt-instance console instance1.example.com |
964 |
</screen> |
965 |
</para> |
966 |
</refsect3> |
967 |
|
968 |
</refsect2> |
969 |
|
970 |
<refsect2> |
971 |
<title>Disk management</title> |
972 |
|
973 |
<refsect3> |
974 |
<title>REPLACE-DISKS</title> |
975 |
|
976 |
<cmdsynopsis> |
977 |
<command>replace-disks</command> |
978 |
<arg choice="opt">-s</arg> |
979 |
<arg choice="req">--new-secondary <replaceable>NODE</replaceable></arg> |
980 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
981 |
</cmdsynopsis> |
982 |
|
983 |
<cmdsynopsis> |
984 |
<command>replace-disks</command> |
985 |
<group> |
986 |
<arg choice="req">-s</arg> |
987 |
<arg choice="req">-p</arg> |
988 |
</group> |
989 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
990 |
</cmdsynopsis> |
991 |
|
992 |
<para> |
993 |
This command is a generalized form for adding and replacing |
994 |
disks. It is currently only valid for the mirrored (DRBD) |
995 |
disk template. |
996 |
</para> |
997 |
|
998 |
<para> |
999 |
The first form will do a secondary node change, while the |
1000 |
second form will replace the disks on either the primary |
1001 |
(<option>-p</option>) or the secondary (<option>-s</option>) |
1002 |
node of the instance only, without changing the node. |
1003 |
</para> |
1004 |
|
1005 |
</refsect3> |
1006 |
|
1007 |
<refsect3> |
1008 |
<title>ACTIVATE-DISKS</title> |
1009 |
|
1010 |
<cmdsynopsis> |
1011 |
<command>activate-disks</command> |
1012 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
1013 |
</cmdsynopsis> |
1014 |
<para> |
1015 |
Activates the block devices of the given instance. If |
1016 |
successful, the command will show the location and name of |
1017 |
the block devices: |
1018 |
<screen> |
1019 |
node1.example.com:sda:/dev/drbd0 |
1020 |
node1.example.com:sdb:/dev/drbd1 |
1021 |
</screen> |
1022 |
|
1023 |
In this example, <emphasis>node1.example.com</emphasis> is |
1024 |
the name of the node on which the devices have been |
1025 |
activated. The <emphasis>sda</emphasis> and |
1026 |
<emphasis>sdb</emphasis> are the names of the block devices |
1027 |
inside the instance. <emphasis>/dev/drbd0</emphasis> and |
1028 |
<emphasis>/dev/drbd1</emphasis> are the names of the block |
1029 |
devices as visible on the node. |
1030 |
</para> |
1031 |
|
1032 |
<para> |
1033 |
Note that it is safe to run this command while the instance |
1034 |
is already running. |
1035 |
</para> |
1036 |
</refsect3> |
1037 |
|
1038 |
<refsect3> |
1039 |
<title>DEACTIVATE-DISKS</title> |
1040 |
|
1041 |
<cmdsynopsis> |
1042 |
<command>deactivate-disks</command> |
1043 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
1044 |
</cmdsynopsis> |
1045 |
<para> |
1046 |
De-activates the block devices of the given instance. Note |
1047 |
that if you run this command for an instance with a drbd |
1048 |
disk template, while it is running, it will not be able to |
1049 |
shutdown the block devices on the primary node, but it will |
1050 |
shutdown the block devices on the secondary nodes, thus |
1051 |
breaking the replication. |
1052 |
</para> |
1053 |
|
1054 |
</refsect3> |
1055 |
|
1056 |
</refsect2> |
1057 |
|
1058 |
<refsect2> |
1059 |
<title>Recovery</title> |
1060 |
|
1061 |
<refsect3> |
1062 |
<title>FAILOVER</title> |
1063 |
|
1064 |
<cmdsynopsis> |
1065 |
<command>failover</command> |
1066 |
<arg>-f</arg> |
1067 |
<arg>--ignore-consistency</arg> |
1068 |
<arg choice="req"><replaceable>instance</replaceable></arg> |
1069 |
</cmdsynopsis> |
1070 |
|
1071 |
<para> |
1072 |
Failover will fail the instance over its secondary |
1073 |
node. This works only for instances having a drbd disk |
1074 |
template. |
1075 |
</para> |
1076 |
|
1077 |
<para> |
1078 |
Normally the failover will check the consistency of the |
1079 |
disks before failing over the instance. If you are trying to |
1080 |
migrate instances off a dead node, this will fail. Use the |
1081 |
<option>--ignore-consistency</option> option for this |
1082 |
purpose. Note that this option can be dangerous as errors in |
1083 |
shutting down the instance will be ignored, resulting in |
1084 |
possibly having the instance running on two machines in |
1085 |
parallel (on disconnected DRBD drives). |
1086 |
</para> |
1087 |
|
1088 |
<para> |
1089 |
Example: |
1090 |
<screen> |
1091 |
# gnt-instance failover instance1.example.com |
1092 |
</screen> |
1093 |
</para> |
1094 |
</refsect3> |
1095 |
|
1096 |
</refsect2> |
1097 |
|
1098 |
<refsect2> |
1099 |
<title>TAGS</title> |
1100 |
|
1101 |
<refsect3> |
1102 |
<title>ADD-TAGS</title> |
1103 |
|
1104 |
<cmdsynopsis> |
1105 |
<command>add-tags</command> |
1106 |
<arg choice="opt">--from <replaceable>file</replaceable></arg> |
1107 |
<arg choice="req"><replaceable>instancename</replaceable></arg> |
1108 |
<arg choice="req" |
1109 |
rep="repeat"><replaceable>tag</replaceable></arg> |
1110 |
</cmdsynopsis> |
1111 |
|
1112 |
<para> |
1113 |
Add tags to the given instance. If any of the tags contains |
1114 |
invalid characters, the entire operation will abort. |
1115 |
</para> |
1116 |
<para> |
1117 |
If the <option>--from</option> option is given, the list of |
1118 |
tags will be extended with the contents of that file (each |
1119 |
line becomes a tag). In this case, there is not need to pass |
1120 |
tags on the command line (if you do, both sources will be |
1121 |
used). A file name of - will be interpreted as stdin. |
1122 |
</para> |
1123 |
</refsect3> |
1124 |
|
1125 |
<refsect3> |
1126 |
<title>LIST-TAGS</title> |
1127 |
|
1128 |
<cmdsynopsis> |
1129 |
<command>list-tags</command> |
1130 |
<arg choice="req"><replaceable>instancename</replaceable></arg> |
1131 |
</cmdsynopsis> |
1132 |
|
1133 |
<para>List the tags of the given instance.</para> |
1134 |
</refsect3> |
1135 |
|
1136 |
<refsect3> |
1137 |
<title>REMOVE-TAGS</title> |
1138 |
<cmdsynopsis> |
1139 |
<command>remove-tags</command> |
1140 |
<arg choice="opt">--from <replaceable>file</replaceable></arg> |
1141 |
<arg choice="req"><replaceable>instancename</replaceable></arg> |
1142 |
<arg choice="req" |
1143 |
rep="repeat"><replaceable>tag</replaceable></arg> |
1144 |
</cmdsynopsis> |
1145 |
|
1146 |
<para> |
1147 |
Remove tags from the given instance. If any of the tags are |
1148 |
not existing on the node, the entire operation will abort. |
1149 |
</para> |
1150 |
|
1151 |
<para> |
1152 |
If the <option>--from</option> option is given, the list of |
1153 |
tags will be extended with the contents of that file (each |
1154 |
line becomes a tag). In this case, there is not need to pass |
1155 |
tags on the command line (if you do, both sources will be |
1156 |
used). A file name of - will be interpreted as stdin. |
1157 |
</para> |
1158 |
</refsect3> |
1159 |
|
1160 |
</refsect2> |
1161 |
|
1162 |
</refsect1> |
1163 |
|
1164 |
&footer; |
1165 |
|
1166 |
</refentry> |
1167 |
|
1168 |
<!-- Keep this comment at the end of the file |
1169 |
Local variables: |
1170 |
mode: sgml |
1171 |
sgml-omittag:t |
1172 |
sgml-shorttag:t |
1173 |
sgml-minimize-attributes:nil |
1174 |
sgml-always-quote-attributes:t |
1175 |
sgml-indent-step:2 |
1176 |
sgml-indent-data:t |
1177 |
sgml-parent-document:nil |
1178 |
sgml-default-dtd-file:nil |
1179 |
sgml-exposed-tags:nil |
1180 |
sgml-local-catalogs:nil |
1181 |
sgml-local-ecat-files:nil |
1182 |
End: |
1183 |
--> |