root / man / gnt-instance.rst @ 81dd9bd1
History | View | Annotate | Download (51.2 kB)
1 | 1b7f2c85 | Iustin Pop | gnt-instance(8) Ganeti | Version @GANETI_VERSION@ |
---|---|---|---|
2 | 1b7f2c85 | Iustin Pop | ================================================= |
3 | 1b7f2c85 | Iustin Pop | |
4 | 1b7f2c85 | Iustin Pop | Name |
5 | 1b7f2c85 | Iustin Pop | ---- |
6 | 1b7f2c85 | Iustin Pop | |
7 | 1b7f2c85 | Iustin Pop | gnt-instance - Ganeti instance administration |
8 | 1b7f2c85 | Iustin Pop | |
9 | 1b7f2c85 | Iustin Pop | Synopsis |
10 | 1b7f2c85 | Iustin Pop | -------- |
11 | 1b7f2c85 | Iustin Pop | |
12 | 1b7f2c85 | Iustin Pop | **gnt-instance** {command} [arguments...] |
13 | 1b7f2c85 | Iustin Pop | |
14 | 1b7f2c85 | Iustin Pop | DESCRIPTION |
15 | 1b7f2c85 | Iustin Pop | ----------- |
16 | 1b7f2c85 | Iustin Pop | |
17 | 1b7f2c85 | Iustin Pop | The **gnt-instance** command is used for instance administration in |
18 | 1b7f2c85 | Iustin Pop | the Ganeti system. |
19 | 1b7f2c85 | Iustin Pop | |
20 | 1b7f2c85 | Iustin Pop | COMMANDS |
21 | 1b7f2c85 | Iustin Pop | -------- |
22 | 1b7f2c85 | Iustin Pop | |
23 | 1b7f2c85 | Iustin Pop | Creation/removal/querying |
24 | 1b7f2c85 | Iustin Pop | ~~~~~~~~~~~~~~~~~~~~~~~~~ |
25 | 1b7f2c85 | Iustin Pop | |
26 | 1b7f2c85 | Iustin Pop | ADD |
27 | 1b7f2c85 | Iustin Pop | ^^^ |
28 | 1b7f2c85 | Iustin Pop | |
29 | 1b7f2c85 | Iustin Pop | | **add** |
30 | 1b7f2c85 | Iustin Pop | | {-t {diskless | file \| plain \| drbd}} |
31 | 87001920 | Iustin Pop | | {--disk=*N*: {size=*VAL* \| adopt=*LV*}[,vg=*VG*][,metavg=*VG*][,mode=*ro\|rw*] |
32 | 7af3534e | Dmitry Chernyak | | \| -s *SIZE*} |
33 | 1b7f2c85 | Iustin Pop | | [--no-ip-check] [--no-name-check] [--no-start] [--no-install] |
34 | 1b7f2c85 | Iustin Pop | | [--net=*N* [:options...] \| --no-nics] |
35 | 1b7f2c85 | Iustin Pop | | [-B *BEPARAMS*] |
36 | 1b7f2c85 | Iustin Pop | | [-H *HYPERVISOR* [: option=*value*... ]] |
37 | a53cd1f4 | Iustin Pop | | [-O, --os-parameters *param*=*value*... ] |
38 | 1b7f2c85 | Iustin Pop | | [--file-storage-dir *dir\_path*] [--file-driver {loop \| blktap}] |
39 | 1b7f2c85 | Iustin Pop | | {-n *node[:secondary-node]* \| --iallocator *name*} |
40 | 1b7f2c85 | Iustin Pop | | {-o *os-type*} |
41 | 1b7f2c85 | Iustin Pop | | [--submit] |
42 | 1b7f2c85 | Iustin Pop | | {*instance*} |
43 | 1b7f2c85 | Iustin Pop | |
44 | 1b7f2c85 | Iustin Pop | Creates a new instance on the specified host. The *instance* argument |
45 | 1b7f2c85 | Iustin Pop | must be in DNS, but depending on the bridge/routing setup, need not be |
46 | 1b7f2c85 | Iustin Pop | in the same network as the nodes in the cluster. |
47 | 1b7f2c85 | Iustin Pop | |
48 | 1b7f2c85 | Iustin Pop | The ``disk`` option specifies the parameters for the disks of the |
49 | 1b7f2c85 | Iustin Pop | instance. The numbering of disks starts at zero, and at least one disk |
50 | 1b7f2c85 | Iustin Pop | needs to be passed. For each disk, either the size or the adoption |
51 | 1b7f2c85 | Iustin Pop | source needs to be given, and optionally the access mode (read-only or |
52 | 87001920 | Iustin Pop | the default of read-write) and the LVM volume group can also be |
53 | 87001920 | Iustin Pop | specified (via the ``vg`` key). For DRBD devices, a different VG can |
54 | 87001920 | Iustin Pop | be specified for the metadata device using the ``metavg`` key. The |
55 | 87001920 | Iustin Pop | size is interpreted (when no unit is given) in mebibytes. You can also |
56 | 87001920 | Iustin Pop | use one of the suffixes *m*, *g* or *t* to specify the exact the units |
57 | 87001920 | Iustin Pop | used; these suffixes map to mebibytes, gibibytes and tebibytes. |
58 | 1b7f2c85 | Iustin Pop | |
59 | 1b7f2c85 | Iustin Pop | When using the ``adopt`` key in the disk definition, Ganeti will |
60 | 1b7f2c85 | Iustin Pop | reuse those volumes (instead of creating new ones) as the |
61 | 1b7f2c85 | Iustin Pop | instance's disks. Ganeti will rename these volumes to the standard |
62 | 1b7f2c85 | Iustin Pop | format, and (without installing the OS) will use them as-is for the |
63 | 1b7f2c85 | Iustin Pop | instance. This allows migrating instances from non-managed mode |
64 | 1b7f2c85 | Iustin Pop | (e.q. plain KVM with LVM) to being managed via Ganeti. Note that |
65 | 1b7f2c85 | Iustin Pop | this works only for the \`plain' disk template (see below for |
66 | 1b7f2c85 | Iustin Pop | template details). |
67 | 1b7f2c85 | Iustin Pop | |
68 | 1b7f2c85 | Iustin Pop | Alternatively, a single-disk instance can be created via the ``-s`` |
69 | 1b7f2c85 | Iustin Pop | option which takes a single argument, the size of the disk. This is |
70 | 1b7f2c85 | Iustin Pop | similar to the Ganeti 1.2 version (but will only create one disk). |
71 | 1b7f2c85 | Iustin Pop | |
72 | 1b7f2c85 | Iustin Pop | The minimum disk specification is therefore ``--disk 0:size=20G`` (or |
73 | 1b7f2c85 | Iustin Pop | ``-s 20G`` when using the ``-s`` option), and a three-disk instance |
74 | 1b7f2c85 | Iustin Pop | can be specified as ``--disk 0:size=20G --disk 1:size=4G --disk |
75 | 1b7f2c85 | Iustin Pop | 2:size=100G``. |
76 | 1b7f2c85 | Iustin Pop | |
77 | 1b7f2c85 | Iustin Pop | The ``--no-ip-check`` skips the checks that are done to see if the |
78 | 1b7f2c85 | Iustin Pop | instance's IP is not already alive (i.e. reachable from the master |
79 | 1b7f2c85 | Iustin Pop | node). |
80 | 1b7f2c85 | Iustin Pop | |
81 | 1b7f2c85 | Iustin Pop | The ``--no-name-check`` skips the check for the instance name via |
82 | 1b7f2c85 | Iustin Pop | the resolver (e.g. in DNS or /etc/hosts, depending on your setup). |
83 | 1b7f2c85 | Iustin Pop | Since the name check is used to compute the IP address, if you pass |
84 | 1b7f2c85 | Iustin Pop | this option you must also pass the ``--no-ip-check`` option. |
85 | 1b7f2c85 | Iustin Pop | |
86 | 1b7f2c85 | Iustin Pop | If you don't wat the instance to automatically start after |
87 | 1b7f2c85 | Iustin Pop | creation, this is possible via the ``--no-start`` option. This will |
88 | 1b7f2c85 | Iustin Pop | leave the instance down until a subsequent **gnt-instance start** |
89 | 1b7f2c85 | Iustin Pop | command. |
90 | 1b7f2c85 | Iustin Pop | |
91 | 1b7f2c85 | Iustin Pop | The NICs of the instances can be specified via the ``--net`` |
92 | 1b7f2c85 | Iustin Pop | option. By default, one NIC is created for the instance, with a |
93 | 1b7f2c85 | Iustin Pop | random MAC, and set up according the the cluster level nic |
94 | 1b7f2c85 | Iustin Pop | parameters. Each NIC can take these parameters (all optional): |
95 | 1b7f2c85 | Iustin Pop | |
96 | 1b7f2c85 | Iustin Pop | |
97 | 1b7f2c85 | Iustin Pop | |
98 | 1b7f2c85 | Iustin Pop | mac |
99 | 1b7f2c85 | Iustin Pop | either a value or 'generate' to generate a new unique MAC |
100 | 1b7f2c85 | Iustin Pop | |
101 | 1b7f2c85 | Iustin Pop | ip |
102 | 1b7f2c85 | Iustin Pop | specifies the IP address assigned to the instance from the Ganeti |
103 | 1b7f2c85 | Iustin Pop | side (this is not necessarily what the instance will use, but what |
104 | 1b7f2c85 | Iustin Pop | the node expects the instance to use) |
105 | 1b7f2c85 | Iustin Pop | |
106 | 1b7f2c85 | Iustin Pop | mode |
107 | 1b7f2c85 | Iustin Pop | specifies the connection mode for this nic: routed or bridged. |
108 | 1b7f2c85 | Iustin Pop | |
109 | 1b7f2c85 | Iustin Pop | link |
110 | 1b7f2c85 | Iustin Pop | in bridged mode specifies the bridge to attach this NIC to, in |
111 | 1b7f2c85 | Iustin Pop | routed mode it's intended to differentiate between different |
112 | 1b7f2c85 | Iustin Pop | routing tables/instance groups (but the meaning is dependent on the |
113 | 1b7f2c85 | Iustin Pop | network script, see gnt-cluster(8) for more details) |
114 | 1b7f2c85 | Iustin Pop | |
115 | 1b7f2c85 | Iustin Pop | |
116 | 1b7f2c85 | Iustin Pop | Of these "mode" and "link" are nic parameters, and inherit their |
117 | 1b7f2c85 | Iustin Pop | default at cluster level. |
118 | 1b7f2c85 | Iustin Pop | Alternatively, if no network is desired for the instance, you can |
119 | 1b7f2c85 | Iustin Pop | prevent the default of one NIC with the ``--no-nics`` option. |
120 | 1b7f2c85 | Iustin Pop | |
121 | 1b7f2c85 | Iustin Pop | The ``-o`` options specifies the operating system to be installed. |
122 | 1b7f2c85 | Iustin Pop | The available operating systems can be listed with **gnt-os list**. |
123 | 1b7f2c85 | Iustin Pop | Passing ``--no-install`` will however skip the OS installation, |
124 | 1b7f2c85 | Iustin Pop | allowing a manual import if so desired. Note that the |
125 | 1b7f2c85 | Iustin Pop | no-installation mode will automatically disable the start-up of the |
126 | 1b7f2c85 | Iustin Pop | instance (without an OS, it most likely won't be able to start-up |
127 | 1b7f2c85 | Iustin Pop | successfully). |
128 | 1b7f2c85 | Iustin Pop | |
129 | 1b7f2c85 | Iustin Pop | The ``-B`` option specifies the backend parameters for the |
130 | 1b7f2c85 | Iustin Pop | instance. If no such parameters are specified, the values are |
131 | 1b7f2c85 | Iustin Pop | inherited from the cluster. Possible parameters are: |
132 | 1b7f2c85 | Iustin Pop | |
133 | 1b7f2c85 | Iustin Pop | memory |
134 | 1b7f2c85 | Iustin Pop | the memory size of the instance; as usual, suffixes can be used to |
135 | 1b7f2c85 | Iustin Pop | denote the unit, otherwise the value is taken in mebibites |
136 | 1b7f2c85 | Iustin Pop | |
137 | 1b7f2c85 | Iustin Pop | vcpus |
138 | 1b7f2c85 | Iustin Pop | the number of VCPUs to assign to the instance (if this value makes |
139 | 1b7f2c85 | Iustin Pop | sense for the hypervisor) |
140 | 1b7f2c85 | Iustin Pop | |
141 | 1b7f2c85 | Iustin Pop | auto\_balance |
142 | 1b7f2c85 | Iustin Pop | whether the instance is considered in the N+1 cluster checks |
143 | 1b7f2c85 | Iustin Pop | (enough redundancy in the cluster to survive a node failure) |
144 | 1b7f2c85 | Iustin Pop | |
145 | 1b7f2c85 | Iustin Pop | |
146 | 1b7f2c85 | Iustin Pop | The ``-H`` option specified the hypervisor to use for the instance |
147 | 1b7f2c85 | Iustin Pop | (must be one of the enabled hypervisors on the cluster) and |
148 | 1b7f2c85 | Iustin Pop | optionally custom parameters for this instance. If not other |
149 | 1b7f2c85 | Iustin Pop | options are used (i.e. the invocation is just -H *NAME*) the |
150 | 1b7f2c85 | Iustin Pop | instance will inherit the cluster options. The defaults below show |
151 | 1b7f2c85 | Iustin Pop | the cluster defaults at cluster creation time. |
152 | 1b7f2c85 | Iustin Pop | |
153 | 1b7f2c85 | Iustin Pop | The possible hypervisor options are as follows: |
154 | 1b7f2c85 | Iustin Pop | |
155 | 1b7f2c85 | Iustin Pop | boot\_order |
156 | 1b7f2c85 | Iustin Pop | Valid for the Xen HVM and KVM hypervisors. |
157 | 1b7f2c85 | Iustin Pop | |
158 | 1b7f2c85 | Iustin Pop | A string value denoting the boot order. This has different meaning |
159 | 1b7f2c85 | Iustin Pop | for the Xen HVM hypervisor and for the KVM one. |
160 | 1b7f2c85 | Iustin Pop | |
161 | 1b7f2c85 | Iustin Pop | For Xen HVM, The boot order is a string of letters listing the boot |
162 | 1b7f2c85 | Iustin Pop | devices, with valid device letters being: |
163 | 1b7f2c85 | Iustin Pop | |
164 | 1b7f2c85 | Iustin Pop | |
165 | 1b7f2c85 | Iustin Pop | |
166 | 1b7f2c85 | Iustin Pop | a |
167 | 1b7f2c85 | Iustin Pop | floppy drive |
168 | 1b7f2c85 | Iustin Pop | |
169 | 1b7f2c85 | Iustin Pop | c |
170 | 1b7f2c85 | Iustin Pop | hard disk |
171 | 1b7f2c85 | Iustin Pop | |
172 | 1b7f2c85 | Iustin Pop | d |
173 | 1b7f2c85 | Iustin Pop | CDROM drive |
174 | 1b7f2c85 | Iustin Pop | |
175 | 1b7f2c85 | Iustin Pop | n |
176 | 1b7f2c85 | Iustin Pop | network boot (PXE) |
177 | 1b7f2c85 | Iustin Pop | |
178 | 1b7f2c85 | Iustin Pop | |
179 | 1b7f2c85 | Iustin Pop | The default is not to set an HVM boot order which is interpreted as |
180 | 1b7f2c85 | Iustin Pop | 'dc'. |
181 | 1b7f2c85 | Iustin Pop | |
182 | 81dd9bd1 | Marco Casavecchia | For KVM the boot order is either "floppy", "cdrom", "disk" or "network". |
183 | 1b7f2c85 | Iustin Pop | Please note that older versions of KVM couldn't netboot from virtio |
184 | 1b7f2c85 | Iustin Pop | interfaces. This has been fixed in more recent versions and is |
185 | 1b7f2c85 | Iustin Pop | confirmed to work at least with qemu-kvm 0.11.1. |
186 | 1b7f2c85 | Iustin Pop | |
187 | 525011bc | Maciej Bliziลski | blockdev\_prefix |
188 | 525011bc | Maciej Bliziลski | Valid for the Xen HVM and PVM hypervisors. |
189 | 525011bc | Maciej Bliziลski | |
190 | 525011bc | Maciej Bliziลski | Relevant to nonpvops guest kernels, in which the disk device names are |
191 | 525011bc | Maciej Bliziลski | given by the host. Allows to specify 'xvd', which helps run Red Hat based |
192 | 525011bc | Maciej Bliziลski | installers, driven by anaconda. |
193 | 525011bc | Maciej Bliziลski | |
194 | 81dd9bd1 | Marco Casavecchia | floppy\_image\_path |
195 | 81dd9bd1 | Marco Casavecchia | Valid for the KVM hypervisor. |
196 | 81dd9bd1 | Marco Casavecchia | |
197 | 81dd9bd1 | Marco Casavecchia | The path to a floppy disk image to attach to the instance. |
198 | 81dd9bd1 | Marco Casavecchia | This is useful to install Windows operating systems on Virt/IO disks because |
199 | 81dd9bd1 | Marco Casavecchia | you can specify here the floppy for the drivers at installation time. |
200 | 81dd9bd1 | Marco Casavecchia | |
201 | 1b7f2c85 | Iustin Pop | cdrom\_image\_path |
202 | 1b7f2c85 | Iustin Pop | Valid for the Xen HVM and KVM hypervisors. |
203 | 1b7f2c85 | Iustin Pop | |
204 | 1b7f2c85 | Iustin Pop | The path to a CDROM image to attach to the instance. |
205 | 1b7f2c85 | Iustin Pop | |
206 | 81dd9bd1 | Marco Casavecchia | cdrom2\_image\_path |
207 | 81dd9bd1 | Marco Casavecchia | Valid for the KVM hypervisor. |
208 | 81dd9bd1 | Marco Casavecchia | |
209 | 81dd9bd1 | Marco Casavecchia | The path to a second CDROM image to attach to the instance. |
210 | 81dd9bd1 | Marco Casavecchia | **NOTE**: This image can't be used to boot the system. To do that |
211 | 81dd9bd1 | Marco Casavecchia | you have to use the 'cdrom\_image\_path' option. |
212 | 81dd9bd1 | Marco Casavecchia | |
213 | 1b7f2c85 | Iustin Pop | nic\_type |
214 | 1b7f2c85 | Iustin Pop | Valid for the Xen HVM and KVM hypervisors. |
215 | 1b7f2c85 | Iustin Pop | |
216 | 1b7f2c85 | Iustin Pop | This parameter determines the way the network cards are presented |
217 | 1b7f2c85 | Iustin Pop | to the instance. The possible options are: |
218 | 1b7f2c85 | Iustin Pop | |
219 | 1b7f2c85 | Iustin Pop | |
220 | 1b7f2c85 | Iustin Pop | |
221 | 1b7f2c85 | Iustin Pop | rtl8139 (default for Xen HVM) (HVM & KVM) |
222 | 1b7f2c85 | Iustin Pop | ne2k\_isa (HVM & KVM) |
223 | 1b7f2c85 | Iustin Pop | ne2k\_pci (HVM & KVM) |
224 | 1b7f2c85 | Iustin Pop | i82551 (KVM) |
225 | 1b7f2c85 | Iustin Pop | i82557b (KVM) |
226 | 1b7f2c85 | Iustin Pop | i82559er (KVM) |
227 | 1b7f2c85 | Iustin Pop | pcnet (KVM) |
228 | 1b7f2c85 | Iustin Pop | e1000 (KVM) |
229 | 1b7f2c85 | Iustin Pop | paravirtual (default for KVM) (HVM & KVM) |
230 | 1b7f2c85 | Iustin Pop | |
231 | 1b7f2c85 | Iustin Pop | |
232 | 1b7f2c85 | Iustin Pop | disk\_type |
233 | 1b7f2c85 | Iustin Pop | Valid for the Xen HVM and KVM hypervisors. |
234 | 1b7f2c85 | Iustin Pop | |
235 | 1b7f2c85 | Iustin Pop | This parameter determines the way the disks are presented to the |
236 | 1b7f2c85 | Iustin Pop | instance. The possible options are: |
237 | 1b7f2c85 | Iustin Pop | |
238 | 1b7f2c85 | Iustin Pop | |
239 | 1b7f2c85 | Iustin Pop | |
240 | 1b7f2c85 | Iustin Pop | ioemu (default for HVM & KVM) (HVM & KVM) |
241 | 1b7f2c85 | Iustin Pop | ide (HVM & KVM) |
242 | 1b7f2c85 | Iustin Pop | scsi (KVM) |
243 | 1b7f2c85 | Iustin Pop | sd (KVM) |
244 | 1b7f2c85 | Iustin Pop | mtd (KVM) |
245 | 1b7f2c85 | Iustin Pop | pflash (KVM) |
246 | 1b7f2c85 | Iustin Pop | |
247 | 1b7f2c85 | Iustin Pop | |
248 | 81dd9bd1 | Marco Casavecchia | cdrom\_disk\_type |
249 | 81dd9bd1 | Marco Casavecchia | Valid for the KVM hypervisor. |
250 | 81dd9bd1 | Marco Casavecchia | |
251 | 81dd9bd1 | Marco Casavecchia | This parameter determines the way the cdroms disks are presented to the |
252 | 81dd9bd1 | Marco Casavecchia | instance. The default behavior is to get the same value of the eariler |
253 | 81dd9bd1 | Marco Casavecchia | parameter (disk_type). The possible options are: |
254 | 81dd9bd1 | Marco Casavecchia | |
255 | 81dd9bd1 | Marco Casavecchia | |
256 | 81dd9bd1 | Marco Casavecchia | |
257 | 81dd9bd1 | Marco Casavecchia | paravirtual |
258 | 81dd9bd1 | Marco Casavecchia | ide |
259 | 81dd9bd1 | Marco Casavecchia | scsi |
260 | 81dd9bd1 | Marco Casavecchia | sd |
261 | 81dd9bd1 | Marco Casavecchia | mtd |
262 | 81dd9bd1 | Marco Casavecchia | pflash |
263 | 81dd9bd1 | Marco Casavecchia | |
264 | 81dd9bd1 | Marco Casavecchia | |
265 | 1b7f2c85 | Iustin Pop | vnc\_bind\_address |
266 | 1b7f2c85 | Iustin Pop | Valid for the Xen HVM and KVM hypervisors. |
267 | 1b7f2c85 | Iustin Pop | |
268 | 1b7f2c85 | Iustin Pop | Specifies the address that the VNC listener for this instance |
269 | 1b7f2c85 | Iustin Pop | should bind to. Valid values are IPv4 addresses. Use the address |
270 | 1b7f2c85 | Iustin Pop | 0.0.0.0 to bind to all available interfaces (this is the default) |
271 | 1b7f2c85 | Iustin Pop | or specify the address of one of the interfaces on the node to |
272 | 1b7f2c85 | Iustin Pop | restrict listening to that interface. |
273 | 1b7f2c85 | Iustin Pop | |
274 | 1b7f2c85 | Iustin Pop | vnc\_tls |
275 | 1b7f2c85 | Iustin Pop | Valid for the KVM hypervisor. |
276 | 1b7f2c85 | Iustin Pop | |
277 | 1b7f2c85 | Iustin Pop | A boolean option that controls whether the VNC connection is |
278 | 1b7f2c85 | Iustin Pop | secured with TLS. |
279 | 1b7f2c85 | Iustin Pop | |
280 | 1b7f2c85 | Iustin Pop | vnc\_x509\_path |
281 | 1b7f2c85 | Iustin Pop | Valid for the KVM hypervisor. |
282 | 1b7f2c85 | Iustin Pop | |
283 | 1b7f2c85 | Iustin Pop | If ``vnc_tls`` is enabled, this options specifies the path to the |
284 | 1b7f2c85 | Iustin Pop | x509 certificate to use. |
285 | 1b7f2c85 | Iustin Pop | |
286 | 1b7f2c85 | Iustin Pop | vnc\_x509\_verify |
287 | 1b7f2c85 | Iustin Pop | Valid for the KVM hypervisor. |
288 | 1b7f2c85 | Iustin Pop | |
289 | 1b7f2c85 | Iustin Pop | acpi |
290 | 1b7f2c85 | Iustin Pop | Valid for the Xen HVM and KVM hypervisors. |
291 | 1b7f2c85 | Iustin Pop | |
292 | 1b7f2c85 | Iustin Pop | A boolean option that specifies if the hypervisor should enable |
293 | 1b7f2c85 | Iustin Pop | ACPI support for this instance. By default, ACPI is disabled. |
294 | 1b7f2c85 | Iustin Pop | |
295 | 1b7f2c85 | Iustin Pop | pae |
296 | 1b7f2c85 | Iustin Pop | Valid for the Xen HVM and KVM hypervisors. |
297 | 1b7f2c85 | Iustin Pop | |
298 | 1b7f2c85 | Iustin Pop | A boolean option that specifies if the hypervisor should enabled |
299 | 1b7f2c85 | Iustin Pop | PAE support for this instance. The default is false, disabling PAE |
300 | 1b7f2c85 | Iustin Pop | support. |
301 | 1b7f2c85 | Iustin Pop | |
302 | 1b7f2c85 | Iustin Pop | use\_localtime |
303 | 1b7f2c85 | Iustin Pop | Valid for the Xen HVM and KVM hypervisors. |
304 | 1b7f2c85 | Iustin Pop | |
305 | 1b7f2c85 | Iustin Pop | A boolean option that specifies if the instance should be started |
306 | 1b7f2c85 | Iustin Pop | with its clock set to the localtime of the machine (when true) or |
307 | 1b7f2c85 | Iustin Pop | to the UTC (When false). The default is false, which is useful for |
308 | 1b7f2c85 | Iustin Pop | Linux/Unix machines; for Windows OSes, it is recommended to enable |
309 | 1b7f2c85 | Iustin Pop | this parameter. |
310 | 1b7f2c85 | Iustin Pop | |
311 | 1b7f2c85 | Iustin Pop | kernel\_path |
312 | 1b7f2c85 | Iustin Pop | Valid for the Xen PVM and KVM hypervisors. |
313 | 1b7f2c85 | Iustin Pop | |
314 | 1b7f2c85 | Iustin Pop | This option specifies the path (on the node) to the kernel to boot |
315 | 1b7f2c85 | Iustin Pop | the instance with. Xen PVM instances always require this, while for |
316 | 1b7f2c85 | Iustin Pop | KVM if this option is empty, it will cause the machine to load the |
317 | 1b7f2c85 | Iustin Pop | kernel from its disks. |
318 | 1b7f2c85 | Iustin Pop | |
319 | 1b7f2c85 | Iustin Pop | kernel\_args |
320 | 1b7f2c85 | Iustin Pop | Valid for the Xen PVM and KVM hypervisors. |
321 | 1b7f2c85 | Iustin Pop | |
322 | 1b7f2c85 | Iustin Pop | This options specifies extra arguments to the kernel that will be |
323 | 1b7f2c85 | Iustin Pop | loaded. device. This is always used for Xen PVM, while for KVM it |
324 | 1b7f2c85 | Iustin Pop | is only used if the ``kernel_path`` option is also specified. |
325 | 1b7f2c85 | Iustin Pop | |
326 | 1b7f2c85 | Iustin Pop | The default setting for this value is simply ``"ro"``, which mounts |
327 | 1b7f2c85 | Iustin Pop | the root disk (initially) in read-only one. For example, setting |
328 | 1b7f2c85 | Iustin Pop | this to single will cause the instance to start in single-user |
329 | 1b7f2c85 | Iustin Pop | mode. |
330 | 1b7f2c85 | Iustin Pop | |
331 | 1b7f2c85 | Iustin Pop | initrd\_path |
332 | 1b7f2c85 | Iustin Pop | Valid for the Xen PVM and KVM hypervisors. |
333 | 1b7f2c85 | Iustin Pop | |
334 | 1b7f2c85 | Iustin Pop | This option specifies the path (on the node) to the initrd to boot |
335 | 1b7f2c85 | Iustin Pop | the instance with. Xen PVM instances can use this always, while for |
336 | 1b7f2c85 | Iustin Pop | KVM if this option is only used if the ``kernel_path`` option is |
337 | 1b7f2c85 | Iustin Pop | also specified. You can pass here either an absolute filename (the |
338 | 1b7f2c85 | Iustin Pop | path to the initrd) if you want to use an initrd, or use the format |
339 | 1b7f2c85 | Iustin Pop | no\_initrd\_path for no initrd. |
340 | 1b7f2c85 | Iustin Pop | |
341 | 1b7f2c85 | Iustin Pop | root\_path |
342 | 1b7f2c85 | Iustin Pop | Valid for the Xen PVM and KVM hypervisors. |
343 | 1b7f2c85 | Iustin Pop | |
344 | 1b7f2c85 | Iustin Pop | This options specifies the name of the root device. This is always |
345 | 1b7f2c85 | Iustin Pop | needed for Xen PVM, while for KVM it is only used if the |
346 | 1b7f2c85 | Iustin Pop | ``kernel_path`` option is also specified. |
347 | 1b7f2c85 | Iustin Pop | |
348 | 1b7f2c85 | Iustin Pop | serial\_console |
349 | 1b7f2c85 | Iustin Pop | Valid for the KVM hypervisor. |
350 | 1b7f2c85 | Iustin Pop | |
351 | 1b7f2c85 | Iustin Pop | This boolean option specifies whether to emulate a serial console |
352 | 1b7f2c85 | Iustin Pop | for the instance. |
353 | 1b7f2c85 | Iustin Pop | |
354 | 1b7f2c85 | Iustin Pop | disk\_cache |
355 | 1b7f2c85 | Iustin Pop | Valid for the KVM hypervisor. |
356 | 1b7f2c85 | Iustin Pop | |
357 | 1b7f2c85 | Iustin Pop | The disk cache mode. It can be either default to not pass any cache |
358 | 1b7f2c85 | Iustin Pop | option to KVM, or one of the KVM cache modes: none (for direct |
359 | 1b7f2c85 | Iustin Pop | I/O), writethrough (to use the host cache but report completion to |
360 | 1b7f2c85 | Iustin Pop | the guest only when the host has committed the changes to disk) or |
361 | 1b7f2c85 | Iustin Pop | writeback (to use the host cache and report completion as soon as |
362 | 1b7f2c85 | Iustin Pop | the data is in the host cache). Note that there are special |
363 | 1b7f2c85 | Iustin Pop | considerations for the cache mode depending on version of KVM used |
364 | 1b7f2c85 | Iustin Pop | and disk type (always raw file under Ganeti), please refer to the |
365 | 1b7f2c85 | Iustin Pop | KVM documentation for more details. |
366 | 1b7f2c85 | Iustin Pop | |
367 | 1b7f2c85 | Iustin Pop | security\_model |
368 | 1b7f2c85 | Iustin Pop | Valid for the KVM hypervisor. |
369 | 1b7f2c85 | Iustin Pop | |
370 | 1b7f2c85 | Iustin Pop | The security model for kvm. Currently one of "none", "user" or |
371 | 1b7f2c85 | Iustin Pop | "pool". Under "none", the default, nothing is done and instances |
372 | 1b7f2c85 | Iustin Pop | are run as the Ganeti daemon user (normally root). |
373 | 1b7f2c85 | Iustin Pop | |
374 | 1b7f2c85 | Iustin Pop | Under "user" kvm will drop privileges and become the user specified |
375 | 1b7f2c85 | Iustin Pop | by the security\_domain parameter. |
376 | 1b7f2c85 | Iustin Pop | |
377 | 1b7f2c85 | Iustin Pop | Under "pool" a global cluster pool of users will be used, making |
378 | 1b7f2c85 | Iustin Pop | sure no two instances share the same user on the same node. (this |
379 | 1b7f2c85 | Iustin Pop | mode is not implemented yet) |
380 | 1b7f2c85 | Iustin Pop | |
381 | 1b7f2c85 | Iustin Pop | security\_domain |
382 | 1b7f2c85 | Iustin Pop | Valid for the KVM hypervisor. |
383 | 1b7f2c85 | Iustin Pop | |
384 | 1b7f2c85 | Iustin Pop | Under security model "user" the username to run the instance under. |
385 | 1b7f2c85 | Iustin Pop | It must be a valid username existing on the host. |
386 | 1b7f2c85 | Iustin Pop | |
387 | 1b7f2c85 | Iustin Pop | Cannot be set under security model "none" or "pool". |
388 | 1b7f2c85 | Iustin Pop | |
389 | 1b7f2c85 | Iustin Pop | kvm\_flag |
390 | 1b7f2c85 | Iustin Pop | Valid for the KVM hypervisor. |
391 | 1b7f2c85 | Iustin Pop | |
392 | 1b7f2c85 | Iustin Pop | If "enabled" the -enable-kvm flag is passed to kvm. If "disabled" |
393 | 1b7f2c85 | Iustin Pop | -disable-kvm is passed. If unset no flag is passed, and the default |
394 | 1b7f2c85 | Iustin Pop | running mode for your kvm binary will be used. |
395 | 1b7f2c85 | Iustin Pop | |
396 | 1b7f2c85 | Iustin Pop | mem\_path |
397 | 1b7f2c85 | Iustin Pop | Valid for the KVM hypervisor. |
398 | 1b7f2c85 | Iustin Pop | |
399 | 1b7f2c85 | Iustin Pop | This option passes the -mem-path argument to kvm with the path (on |
400 | 1b7f2c85 | Iustin Pop | the node) to the mount point of the hugetlbfs file system, along |
401 | 1b7f2c85 | Iustin Pop | with the -mem-prealloc argument too. |
402 | 1b7f2c85 | Iustin Pop | |
403 | 1b7f2c85 | Iustin Pop | use\_chroot |
404 | 1b7f2c85 | Iustin Pop | Valid for the KVM hypervisor. |
405 | 1b7f2c85 | Iustin Pop | |
406 | 1b7f2c85 | Iustin Pop | This boolean option determines wether to run the KVM instance in a |
407 | 1b7f2c85 | Iustin Pop | chroot directory. |
408 | 1b7f2c85 | Iustin Pop | |
409 | 1b7f2c85 | Iustin Pop | If it is set to ``true``, an empty directory is created before |
410 | 1b7f2c85 | Iustin Pop | starting the instance and its path is passed via the -chroot flag |
411 | 1b7f2c85 | Iustin Pop | to kvm. The directory is removed when the instance is stopped. |
412 | 1b7f2c85 | Iustin Pop | |
413 | 1b7f2c85 | Iustin Pop | It is set to ``false`` by default. |
414 | 1b7f2c85 | Iustin Pop | |
415 | 1b7f2c85 | Iustin Pop | migration\_downtime |
416 | 1b7f2c85 | Iustin Pop | Valid for the KVM hypervisor. |
417 | 1b7f2c85 | Iustin Pop | |
418 | 1b7f2c85 | Iustin Pop | The maximum amount of time (in ms) a KVM instance is allowed to be |
419 | 1b7f2c85 | Iustin Pop | frozen during a live migration, in order to copy dirty memory |
420 | 1b7f2c85 | Iustin Pop | pages. Default value is 30ms, but you may need to increase this |
421 | 1b7f2c85 | Iustin Pop | value for busy instances. |
422 | 1b7f2c85 | Iustin Pop | |
423 | 1b7f2c85 | Iustin Pop | This option is only effective with kvm versions >= 87 and qemu-kvm |
424 | 1b7f2c85 | Iustin Pop | versions >= 0.11.0. |
425 | 1b7f2c85 | Iustin Pop | |
426 | 1b7f2c85 | Iustin Pop | cpu\_mask |
427 | 1b7f2c85 | Iustin Pop | Valid for the LXC hypervisor. |
428 | 1b7f2c85 | Iustin Pop | |
429 | 1b7f2c85 | Iustin Pop | The processes belonging to the given instance are only scheduled on |
430 | 1b7f2c85 | Iustin Pop | the specified CPUs. |
431 | 1b7f2c85 | Iustin Pop | |
432 | 1b7f2c85 | Iustin Pop | The parameter format is a comma-separated list of CPU IDs or CPU ID |
433 | 1b7f2c85 | Iustin Pop | ranges. The ranges are defined by a lower and higher boundary, |
434 | 1b7f2c85 | Iustin Pop | separated by a dash. The boundaries are inclusive. |
435 | 1b7f2c85 | Iustin Pop | |
436 | 1b7f2c85 | Iustin Pop | usb\_mouse |
437 | 1b7f2c85 | Iustin Pop | Valid for the KVM hypervisor. |
438 | 1b7f2c85 | Iustin Pop | |
439 | 1b7f2c85 | Iustin Pop | This option specifies the usb mouse type to be used. It can be |
440 | 1b7f2c85 | Iustin Pop | "mouse" or "tablet". When using VNC it's recommended to set it to |
441 | 1b7f2c85 | Iustin Pop | "tablet". |
442 | 1b7f2c85 | Iustin Pop | |
443 | 1b7f2c85 | Iustin Pop | |
444 | a53cd1f4 | Iustin Pop | The ``-O`` (``--os-parameters``) option allows customisation of the OS |
445 | a53cd1f4 | Iustin Pop | parameters. The actual parameter names and values depends on the OS |
446 | a53cd1f4 | Iustin Pop | being used, but the syntax is the same key=value. For example, setting |
447 | a53cd1f4 | Iustin Pop | a hypothetical ``dhcp`` parameter to yes can be achieved by:: |
448 | a53cd1f4 | Iustin Pop | |
449 | a53cd1f4 | Iustin Pop | gnt-instance add -O dhcp=yes ... |
450 | a53cd1f4 | Iustin Pop | |
451 | a53cd1f4 | Iustin Pop | |
452 | 1b7f2c85 | Iustin Pop | The ``--iallocator`` option specifies the instance allocator plugin |
453 | 1b7f2c85 | Iustin Pop | to use. If you pass in this option the allocator will select nodes |
454 | 1b7f2c85 | Iustin Pop | for this instance automatically, so you don't need to pass them |
455 | 1b7f2c85 | Iustin Pop | with the ``-n`` option. For more information please refer to the |
456 | 1b7f2c85 | Iustin Pop | instance allocator documentation. |
457 | 1b7f2c85 | Iustin Pop | |
458 | 1b7f2c85 | Iustin Pop | The ``-t`` options specifies the disk layout type for the instance. |
459 | 1b7f2c85 | Iustin Pop | The available choices are: |
460 | 1b7f2c85 | Iustin Pop | |
461 | 1b7f2c85 | Iustin Pop | |
462 | 1b7f2c85 | Iustin Pop | |
463 | 1b7f2c85 | Iustin Pop | diskless |
464 | 1b7f2c85 | Iustin Pop | This creates an instance with no disks. Its useful for testing only |
465 | 1b7f2c85 | Iustin Pop | (or other special cases). |
466 | 1b7f2c85 | Iustin Pop | |
467 | 1b7f2c85 | Iustin Pop | file |
468 | 1b7f2c85 | Iustin Pop | Disk devices will be regular files. |
469 | 1b7f2c85 | Iustin Pop | |
470 | 1b7f2c85 | Iustin Pop | plain |
471 | 1b7f2c85 | Iustin Pop | Disk devices will be logical volumes. |
472 | 1b7f2c85 | Iustin Pop | |
473 | 1b7f2c85 | Iustin Pop | drbd |
474 | 1b7f2c85 | Iustin Pop | Disk devices will be drbd (version 8.x) on top of lvm volumes. |
475 | 1b7f2c85 | Iustin Pop | |
476 | 1b7f2c85 | Iustin Pop | |
477 | 1b7f2c85 | Iustin Pop | The optional second value of the ``--node`` is used for the drbd |
478 | 1b7f2c85 | Iustin Pop | template type and specifies the remote node. |
479 | 1b7f2c85 | Iustin Pop | |
480 | 1b7f2c85 | Iustin Pop | If you do not want gnt-instance to wait for the disk mirror to be |
481 | 1b7f2c85 | Iustin Pop | synced, use the ``--no-wait-for-sync`` option. |
482 | 1b7f2c85 | Iustin Pop | |
483 | 1b7f2c85 | Iustin Pop | The ``--file-storage-dir`` specifies the relative path under the |
484 | 56956bcb | Iustin Pop | cluster-wide file storage directory to store file-based disks. It is |
485 | 56956bcb | Iustin Pop | useful for having different subdirectories for different |
486 | 1b7f2c85 | Iustin Pop | instances. The full path of the directory where the disk files are |
487 | 56956bcb | Iustin Pop | stored will consist of cluster-wide file storage directory + optional |
488 | 56956bcb | Iustin Pop | subdirectory + instance name. Example: |
489 | 56956bcb | Iustin Pop | ``@RPL_FILE_STORAGE_DIR@``*/mysubdir/instance1.example.com*. This |
490 | 56956bcb | Iustin Pop | option is only relevant for instances using the file storage backend. |
491 | 1b7f2c85 | Iustin Pop | |
492 | 1b7f2c85 | Iustin Pop | The ``--file-driver`` specifies the driver to use for file-based |
493 | 1b7f2c85 | Iustin Pop | disks. Note that currently these drivers work with the xen |
494 | 1b7f2c85 | Iustin Pop | hypervisor only. This option is only relevant for instances using |
495 | 1b7f2c85 | Iustin Pop | the file storage backend. The available choices are: |
496 | 1b7f2c85 | Iustin Pop | |
497 | 1b7f2c85 | Iustin Pop | |
498 | 1b7f2c85 | Iustin Pop | |
499 | 1b7f2c85 | Iustin Pop | loop |
500 | 1b7f2c85 | Iustin Pop | Kernel loopback driver. This driver uses loopback devices to access |
501 | 1b7f2c85 | Iustin Pop | the filesystem within the file. However, running I/O intensive |
502 | 1b7f2c85 | Iustin Pop | applications in your instance using the loop driver might result in |
503 | 1b7f2c85 | Iustin Pop | slowdowns. Furthermore, if you use the loopback driver consider |
504 | 1b7f2c85 | Iustin Pop | increasing the maximum amount of loopback devices (on most systems |
505 | 1b7f2c85 | Iustin Pop | it's 8) using the max\_loop param. |
506 | 1b7f2c85 | Iustin Pop | |
507 | 1b7f2c85 | Iustin Pop | blktap |
508 | 1b7f2c85 | Iustin Pop | The blktap driver (for Xen hypervisors). In order to be able to use |
509 | 1b7f2c85 | Iustin Pop | the blktap driver you should check if the 'blktapctrl' user space |
510 | 1b7f2c85 | Iustin Pop | disk agent is running (usually automatically started via xend). |
511 | 1b7f2c85 | Iustin Pop | This user-level disk I/O interface has the advantage of better |
512 | 1b7f2c85 | Iustin Pop | performance. Especially if you use a network file system (e.g. NFS) |
513 | 1b7f2c85 | Iustin Pop | to store your instances this is the recommended choice. |
514 | 1b7f2c85 | Iustin Pop | |
515 | 1b7f2c85 | Iustin Pop | |
516 | 1b7f2c85 | Iustin Pop | The ``--submit`` option is used to send the job to the master |
517 | 1b7f2c85 | Iustin Pop | daemon but not wait for its completion. The job ID will be shown so |
518 | 1b7f2c85 | Iustin Pop | that it can be examined via **gnt-job info**. |
519 | 1b7f2c85 | Iustin Pop | |
520 | 1b7f2c85 | Iustin Pop | Example:: |
521 | 1b7f2c85 | Iustin Pop | |
522 | 1b7f2c85 | Iustin Pop | # gnt-instance add -t file --disk 0:size=30g -B memory=512 -o debian-etch \ |
523 | 1b7f2c85 | Iustin Pop | -n node1.example.com --file-storage-dir=mysubdir instance1.example.com |
524 | 1b7f2c85 | Iustin Pop | # gnt-instance add -t plain --disk 0:size=30g -B memory=512 -o debian-etch \ |
525 | 1b7f2c85 | Iustin Pop | -n node1.example.com instance1.example.com |
526 | 7af3534e | Dmitry Chernyak | # gnt-instance add -t plain --disk 0:size=30g --disk 1:size=100g,vg=san \ |
527 | 7af3534e | Dmitry Chernyak | -B memory=512 -o debian-etch -n node1.example.com instance1.example.com |
528 | 1b7f2c85 | Iustin Pop | # gnt-instance add -t drbd --disk 0:size=30g -B memory=512 -o debian-etch \ |
529 | 1b7f2c85 | Iustin Pop | -n node1.example.com:node2.example.com instance2.example.com |
530 | 1b7f2c85 | Iustin Pop | |
531 | 1b7f2c85 | Iustin Pop | |
532 | 1b7f2c85 | Iustin Pop | BATCH-CREATE |
533 | 1b7f2c85 | Iustin Pop | ^^^^^^^^^^^^ |
534 | 1b7f2c85 | Iustin Pop | |
535 | 1b7f2c85 | Iustin Pop | **batch-create** {instances\_file.json} |
536 | 1b7f2c85 | Iustin Pop | |
537 | 1b7f2c85 | Iustin Pop | This command (similar to the Ganeti 1.2 **batcher** tool) submits |
538 | 1b7f2c85 | Iustin Pop | multiple instance creation jobs based on a definition file. The |
539 | 1b7f2c85 | Iustin Pop | instance configurations do not encompass all the possible options |
540 | 1b7f2c85 | Iustin Pop | for the **add** command, but only a subset. |
541 | 1b7f2c85 | Iustin Pop | |
542 | 1b7f2c85 | Iustin Pop | The instance file should be a valid-formed JSON file, containing a |
543 | 1b7f2c85 | Iustin Pop | dictionary with instance name and instance parameters. The accepted |
544 | 1b7f2c85 | Iustin Pop | parameters are: |
545 | 1b7f2c85 | Iustin Pop | |
546 | 1b7f2c85 | Iustin Pop | |
547 | 1b7f2c85 | Iustin Pop | |
548 | 1b7f2c85 | Iustin Pop | disk\_size |
549 | 1b7f2c85 | Iustin Pop | The size of the disks of the instance. |
550 | 1b7f2c85 | Iustin Pop | |
551 | 1b7f2c85 | Iustin Pop | disk\_template |
552 | 1b7f2c85 | Iustin Pop | The disk template to use for the instance, the same as in the |
553 | 1b7f2c85 | Iustin Pop | **add** command. |
554 | 1b7f2c85 | Iustin Pop | |
555 | 1b7f2c85 | Iustin Pop | backend |
556 | 1b7f2c85 | Iustin Pop | A dictionary of backend parameters. |
557 | 1b7f2c85 | Iustin Pop | |
558 | 1b7f2c85 | Iustin Pop | hypervisor |
559 | 1b7f2c85 | Iustin Pop | A dictionary with a single key (the hypervisor name), and as value |
560 | 1b7f2c85 | Iustin Pop | the hypervisor options. If not passed, the default hypervisor and |
561 | 1b7f2c85 | Iustin Pop | hypervisor options will be inherited. |
562 | 1b7f2c85 | Iustin Pop | |
563 | 1b7f2c85 | Iustin Pop | mac, ip, mode, link |
564 | 1b7f2c85 | Iustin Pop | Specifications for the one NIC that will be created for the |
565 | 1b7f2c85 | Iustin Pop | instance. 'bridge' is also accepted as a backwards compatibile |
566 | 1b7f2c85 | Iustin Pop | key. |
567 | 1b7f2c85 | Iustin Pop | |
568 | 1b7f2c85 | Iustin Pop | nics |
569 | 1b7f2c85 | Iustin Pop | List of nics that will be created for the instance. Each entry |
570 | 1b7f2c85 | Iustin Pop | should be a dict, with mac, ip, mode and link as possible keys. |
571 | 1b7f2c85 | Iustin Pop | Please don't provide the "mac, ip, mode, link" parent keys if you |
572 | 1b7f2c85 | Iustin Pop | use this method for specifying nics. |
573 | 1b7f2c85 | Iustin Pop | |
574 | 1b7f2c85 | Iustin Pop | primary\_node, secondary\_node |
575 | 1b7f2c85 | Iustin Pop | The primary and optionally the secondary node to use for the |
576 | 1b7f2c85 | Iustin Pop | instance (in case an iallocator script is not used). |
577 | 1b7f2c85 | Iustin Pop | |
578 | 1b7f2c85 | Iustin Pop | iallocator |
579 | 1b7f2c85 | Iustin Pop | Instead of specifying the nodes, an iallocator script can be used |
580 | 1b7f2c85 | Iustin Pop | to automatically compute them. |
581 | 1b7f2c85 | Iustin Pop | |
582 | 1b7f2c85 | Iustin Pop | start |
583 | 1b7f2c85 | Iustin Pop | whether to start the instance |
584 | 1b7f2c85 | Iustin Pop | |
585 | 1b7f2c85 | Iustin Pop | ip\_check |
586 | 1b7f2c85 | Iustin Pop | Skip the check for already-in-use instance; see the description in |
587 | 1b7f2c85 | Iustin Pop | the **add** command for details. |
588 | 1b7f2c85 | Iustin Pop | |
589 | 1b7f2c85 | Iustin Pop | name\_check |
590 | 1b7f2c85 | Iustin Pop | Skip the name check for instances; see the description in the |
591 | 1b7f2c85 | Iustin Pop | **add** command for details. |
592 | 1b7f2c85 | Iustin Pop | |
593 | 1b7f2c85 | Iustin Pop | file\_storage\_dir, file\_driver |
594 | 1b7f2c85 | Iustin Pop | Configuration for the file disk type, see the **add** command for |
595 | 1b7f2c85 | Iustin Pop | details. |
596 | 1b7f2c85 | Iustin Pop | |
597 | 1b7f2c85 | Iustin Pop | |
598 | 1b7f2c85 | Iustin Pop | A simple definition for one instance can be (with most of the |
599 | 1b7f2c85 | Iustin Pop | parameters taken from the cluster defaults):: |
600 | 1b7f2c85 | Iustin Pop | |
601 | 1b7f2c85 | Iustin Pop | { |
602 | 1b7f2c85 | Iustin Pop | "instance3": { |
603 | 1b7f2c85 | Iustin Pop | "template": "drbd", |
604 | 1b7f2c85 | Iustin Pop | "os": "debootstrap", |
605 | 1b7f2c85 | Iustin Pop | "disk_size": ["25G"], |
606 | 1b7f2c85 | Iustin Pop | "iallocator": "dumb" |
607 | 1b7f2c85 | Iustin Pop | }, |
608 | 1b7f2c85 | Iustin Pop | "instance5": { |
609 | 1b7f2c85 | Iustin Pop | "template": "drbd", |
610 | 1b7f2c85 | Iustin Pop | "os": "debootstrap", |
611 | 1b7f2c85 | Iustin Pop | "disk_size": ["25G"], |
612 | 1b7f2c85 | Iustin Pop | "iallocator": "dumb", |
613 | 1b7f2c85 | Iustin Pop | "hypervisor": "xen-hvm", |
614 | 1b7f2c85 | Iustin Pop | "hvparams": {"acpi": true}, |
615 | 1b7f2c85 | Iustin Pop | "backend": {"memory": 512} |
616 | 1b7f2c85 | Iustin Pop | } |
617 | 1b7f2c85 | Iustin Pop | } |
618 | 1b7f2c85 | Iustin Pop | |
619 | 1b7f2c85 | Iustin Pop | The command will display the job id for each submitted instance, as |
620 | 1b7f2c85 | Iustin Pop | follows:: |
621 | 1b7f2c85 | Iustin Pop | |
622 | 1b7f2c85 | Iustin Pop | # gnt-instance batch-create instances.json |
623 | 1b7f2c85 | Iustin Pop | instance3: 11224 |
624 | 1b7f2c85 | Iustin Pop | instance5: 11225 |
625 | 1b7f2c85 | Iustin Pop | |
626 | 1b7f2c85 | Iustin Pop | REMOVE |
627 | 1b7f2c85 | Iustin Pop | ^^^^^^ |
628 | 1b7f2c85 | Iustin Pop | |
629 | 1b7f2c85 | Iustin Pop | **remove** [--ignore-failures] [--shutdown-timeout=*N*] [--submit] |
630 | 1b7f2c85 | Iustin Pop | {*instance*} |
631 | 1b7f2c85 | Iustin Pop | |
632 | 1b7f2c85 | Iustin Pop | Remove an instance. This will remove all data from the instance and |
633 | 1b7f2c85 | Iustin Pop | there is *no way back*. If you are not sure if you use an instance |
634 | 1b7f2c85 | Iustin Pop | again, use **shutdown** first and leave it in the shutdown state |
635 | 1b7f2c85 | Iustin Pop | for a while. |
636 | 1b7f2c85 | Iustin Pop | |
637 | 1b7f2c85 | Iustin Pop | The ``--ignore-failures`` option will cause the removal to proceed |
638 | 1b7f2c85 | Iustin Pop | even in the presence of errors during the removal of the instance |
639 | 1b7f2c85 | Iustin Pop | (e.g. during the shutdown or the disk removal). If this option is |
640 | 1b7f2c85 | Iustin Pop | not given, the command will stop at the first error. |
641 | 1b7f2c85 | Iustin Pop | |
642 | 1b7f2c85 | Iustin Pop | The ``--shutdown-timeout`` is used to specify how much time to wait |
643 | 1b7f2c85 | Iustin Pop | before forcing the shutdown (e.g. ``xm destroy`` in Xen, killing the |
644 | 1b7f2c85 | Iustin Pop | kvm process for KVM, etc.). By default two minutes are given to each |
645 | 1b7f2c85 | Iustin Pop | instance to stop. |
646 | 1b7f2c85 | Iustin Pop | |
647 | 1b7f2c85 | Iustin Pop | The ``--submit`` option is used to send the job to the master |
648 | 1b7f2c85 | Iustin Pop | daemon but not wait for its completion. The job ID will be shown so |
649 | 1b7f2c85 | Iustin Pop | that it can be examined via **gnt-job info**. |
650 | 1b7f2c85 | Iustin Pop | |
651 | 1b7f2c85 | Iustin Pop | Example:: |
652 | 1b7f2c85 | Iustin Pop | |
653 | 1b7f2c85 | Iustin Pop | # gnt-instance remove instance1.example.com |
654 | 1b7f2c85 | Iustin Pop | |
655 | 1b7f2c85 | Iustin Pop | |
656 | 1b7f2c85 | Iustin Pop | LIST |
657 | 1b7f2c85 | Iustin Pop | ^^^^ |
658 | 1b7f2c85 | Iustin Pop | |
659 | 1b7f2c85 | Iustin Pop | | **list** |
660 | f0b1bafe | Iustin Pop | | [--no-headers] [--separator=*SEPARATOR*] [--units=*UNITS*] [-v] |
661 | b82c5ff5 | Michael Hanselmann | | [-o *[+]FIELD,...*] [instance...] |
662 | 1b7f2c85 | Iustin Pop | |
663 | 1b7f2c85 | Iustin Pop | Shows the currently configured instances with memory usage, disk |
664 | 1b7f2c85 | Iustin Pop | usage, the node they are running on, and their run status. |
665 | 1b7f2c85 | Iustin Pop | |
666 | 1b7f2c85 | Iustin Pop | The ``--no-headers`` option will skip the initial header line. The |
667 | 1b7f2c85 | Iustin Pop | ``--separator`` option takes an argument which denotes what will be |
668 | 1b7f2c85 | Iustin Pop | used between the output fields. Both these options are to help |
669 | 1b7f2c85 | Iustin Pop | scripting. |
670 | 1b7f2c85 | Iustin Pop | |
671 | 1b7f2c85 | Iustin Pop | The units used to display the numeric values in the output varies, |
672 | 1b7f2c85 | Iustin Pop | depending on the options given. By default, the values will be |
673 | 1b7f2c85 | Iustin Pop | formatted in the most appropriate unit. If the ``--separator`` |
674 | 1b7f2c85 | Iustin Pop | option is given, then the values are shown in mebibytes to allow |
675 | 1b7f2c85 | Iustin Pop | parsing by scripts. In both cases, the ``--units`` option can be |
676 | 1b7f2c85 | Iustin Pop | used to enforce a given output unit. |
677 | 1b7f2c85 | Iustin Pop | |
678 | f0b1bafe | Iustin Pop | The ``-v`` option activates verbose mode, which changes the display of |
679 | f0b1bafe | Iustin Pop | special field states (see **ganeti(7)**). |
680 | f0b1bafe | Iustin Pop | |
681 | 1b7f2c85 | Iustin Pop | The ``-o`` option takes a comma-separated list of output fields. |
682 | 1b7f2c85 | Iustin Pop | The available fields and their meaning are: |
683 | 1b7f2c85 | Iustin Pop | |
684 | 1b7f2c85 | Iustin Pop | |
685 | 1b7f2c85 | Iustin Pop | name |
686 | 1b7f2c85 | Iustin Pop | the instance name |
687 | 1b7f2c85 | Iustin Pop | |
688 | 1b7f2c85 | Iustin Pop | os |
689 | 1b7f2c85 | Iustin Pop | the OS of the instance |
690 | 1b7f2c85 | Iustin Pop | |
691 | 1b7f2c85 | Iustin Pop | pnode |
692 | 1b7f2c85 | Iustin Pop | the primary node of the instance |
693 | 1b7f2c85 | Iustin Pop | |
694 | 1b7f2c85 | Iustin Pop | snodes |
695 | 1b7f2c85 | Iustin Pop | comma-separated list of secondary nodes for the instance; usually |
696 | 1b7f2c85 | Iustin Pop | this will be just one node |
697 | 1b7f2c85 | Iustin Pop | |
698 | 1b7f2c85 | Iustin Pop | admin\_state |
699 | 1b7f2c85 | Iustin Pop | the desired state of the instance (either "yes" or "no" denoting |
700 | 1b7f2c85 | Iustin Pop | the instance should run or not) |
701 | 1b7f2c85 | Iustin Pop | |
702 | 1b7f2c85 | Iustin Pop | disk\_template |
703 | 1b7f2c85 | Iustin Pop | the disk template of the instance |
704 | 1b7f2c85 | Iustin Pop | |
705 | 1b7f2c85 | Iustin Pop | oper\_state |
706 | 1b7f2c85 | Iustin Pop | the actual state of the instance; can be one of the values |
707 | 1b7f2c85 | Iustin Pop | "running", "stopped", "(node down)" |
708 | 1b7f2c85 | Iustin Pop | |
709 | 1b7f2c85 | Iustin Pop | status |
710 | e431074f | Renรฉ Nussbaumer | combined form of ``admin_state`` and ``oper_stat``; this can be one of: |
711 | e431074f | Renรฉ Nussbaumer | ``ERROR_nodedown`` if the node of the instance is down, ``ERROR_down`` if |
712 | e431074f | Renรฉ Nussbaumer | the instance should run but is down, ``ERROR_up`` if the instance should be |
713 | e431074f | Renรฉ Nussbaumer | stopped but is actually running, ``ERROR_wrongnode`` if the instance is |
714 | e431074f | Renรฉ Nussbaumer | running but not on the primary, ``ADMIN_down`` if the instance has been |
715 | e431074f | Renรฉ Nussbaumer | stopped (and is stopped) and ``running`` if the instance is set to be |
716 | e431074f | Renรฉ Nussbaumer | running (and is running) |
717 | 1b7f2c85 | Iustin Pop | |
718 | 1b7f2c85 | Iustin Pop | oper\_ram |
719 | 1b7f2c85 | Iustin Pop | the actual memory usage of the instance as seen by the hypervisor |
720 | 1b7f2c85 | Iustin Pop | |
721 | 1b7f2c85 | Iustin Pop | oper\_vcpus |
722 | 1b7f2c85 | Iustin Pop | the actual number of VCPUs the instance is using as seen by the |
723 | 1b7f2c85 | Iustin Pop | hypervisor |
724 | 1b7f2c85 | Iustin Pop | |
725 | 1b7f2c85 | Iustin Pop | ip |
726 | 1b7f2c85 | Iustin Pop | the ip address Ganeti recognizes as associated with the first |
727 | 1b7f2c85 | Iustin Pop | instance interface |
728 | 1b7f2c85 | Iustin Pop | |
729 | 1b7f2c85 | Iustin Pop | mac |
730 | 1b7f2c85 | Iustin Pop | the first instance interface MAC address |
731 | 1b7f2c85 | Iustin Pop | |
732 | 1b7f2c85 | Iustin Pop | nic\_mode |
733 | 1b7f2c85 | Iustin Pop | the mode of the first instance NIC (routed or bridged) |
734 | 1b7f2c85 | Iustin Pop | |
735 | 1b7f2c85 | Iustin Pop | nic\_link |
736 | 1b7f2c85 | Iustin Pop | the link of the first instance NIC |
737 | 1b7f2c85 | Iustin Pop | |
738 | 1b7f2c85 | Iustin Pop | sda\_size |
739 | 1b7f2c85 | Iustin Pop | the size of the instance's first disk |
740 | 1b7f2c85 | Iustin Pop | |
741 | 1b7f2c85 | Iustin Pop | sdb\_size |
742 | 1b7f2c85 | Iustin Pop | the size of the instance's second disk, if any |
743 | 1b7f2c85 | Iustin Pop | |
744 | 1b7f2c85 | Iustin Pop | vcpus |
745 | 1b7f2c85 | Iustin Pop | the number of VCPUs allocated to the instance |
746 | 1b7f2c85 | Iustin Pop | |
747 | 1b7f2c85 | Iustin Pop | tags |
748 | 1b7f2c85 | Iustin Pop | comma-separated list of the instances's tags |
749 | 1b7f2c85 | Iustin Pop | |
750 | 1b7f2c85 | Iustin Pop | serial\_no |
751 | 1b7f2c85 | Iustin Pop | the so called 'serial number' of the instance; this is a numeric |
752 | 1b7f2c85 | Iustin Pop | field that is incremented each time the instance is modified, and |
753 | 1b7f2c85 | Iustin Pop | it can be used to track modifications |
754 | 1b7f2c85 | Iustin Pop | |
755 | 1b7f2c85 | Iustin Pop | ctime |
756 | 1b7f2c85 | Iustin Pop | the creation time of the instance; note that this field contains |
757 | 1b7f2c85 | Iustin Pop | spaces and as such it's harder to parse |
758 | 1b7f2c85 | Iustin Pop | |
759 | 1b7f2c85 | Iustin Pop | if this attribute is not present (e.g. when upgrading from older |
760 | 1b7f2c85 | Iustin Pop | versions), then "N/A" will be shown instead |
761 | 1b7f2c85 | Iustin Pop | |
762 | 1b7f2c85 | Iustin Pop | mtime |
763 | 1b7f2c85 | Iustin Pop | the last modification time of the instance; note that this field |
764 | 1b7f2c85 | Iustin Pop | contains spaces and as such it's harder to parse |
765 | 1b7f2c85 | Iustin Pop | |
766 | 1b7f2c85 | Iustin Pop | if this attribute is not present (e.g. when upgrading from older |
767 | 1b7f2c85 | Iustin Pop | versions), then "N/A" will be shown instead |
768 | 1b7f2c85 | Iustin Pop | |
769 | 1b7f2c85 | Iustin Pop | uuid |
770 | 1b7f2c85 | Iustin Pop | Show the UUID of the instance (generated automatically by Ganeti) |
771 | 1b7f2c85 | Iustin Pop | |
772 | 1b7f2c85 | Iustin Pop | network\_port |
773 | 1b7f2c85 | Iustin Pop | If the instance has a network port assigned to it (e.g. for VNC |
774 | 1b7f2c85 | Iustin Pop | connections), this will be shown, otherwise - will be displayed. |
775 | 1b7f2c85 | Iustin Pop | |
776 | 1b7f2c85 | Iustin Pop | beparams |
777 | 1b7f2c85 | Iustin Pop | A text format of the entire beparams for the instance. It's more |
778 | 1b7f2c85 | Iustin Pop | useful to select individual fields from this dictionary, see |
779 | 1b7f2c85 | Iustin Pop | below. |
780 | 1b7f2c85 | Iustin Pop | |
781 | 1b7f2c85 | Iustin Pop | disk.count |
782 | 1b7f2c85 | Iustin Pop | The number of instance disks. |
783 | 1b7f2c85 | Iustin Pop | |
784 | 1b7f2c85 | Iustin Pop | disk.size/N |
785 | 1b7f2c85 | Iustin Pop | The size of the instance's Nth disk. This is a more generic form of |
786 | 1b7f2c85 | Iustin Pop | the sda\_size and sdb\_size fields. |
787 | 1b7f2c85 | Iustin Pop | |
788 | 1b7f2c85 | Iustin Pop | disk.sizes |
789 | 1b7f2c85 | Iustin Pop | A comma-separated list of the disk sizes for this instance. |
790 | 1b7f2c85 | Iustin Pop | |
791 | 1b7f2c85 | Iustin Pop | disk\_usage |
792 | 1b7f2c85 | Iustin Pop | The total disk space used by this instance on each of its nodes. |
793 | 1b7f2c85 | Iustin Pop | This is not the instance-visible disk size, but the actual disk |
794 | 1b7f2c85 | Iustin Pop | "cost" of the instance. |
795 | 1b7f2c85 | Iustin Pop | |
796 | 1b7f2c85 | Iustin Pop | nic.mac/N |
797 | 1b7f2c85 | Iustin Pop | The MAC of the Nth instance NIC. |
798 | 1b7f2c85 | Iustin Pop | |
799 | 1b7f2c85 | Iustin Pop | nic.ip/N |
800 | 1b7f2c85 | Iustin Pop | The IP address of the Nth instance NIC. |
801 | 1b7f2c85 | Iustin Pop | |
802 | 1b7f2c85 | Iustin Pop | nic.mode/N |
803 | 1b7f2c85 | Iustin Pop | The mode of the Nth instance NIC |
804 | 1b7f2c85 | Iustin Pop | |
805 | 1b7f2c85 | Iustin Pop | nic.link/N |
806 | 1b7f2c85 | Iustin Pop | The link of the Nth instance NIC |
807 | 1b7f2c85 | Iustin Pop | |
808 | 1b7f2c85 | Iustin Pop | nic.macs |
809 | 1b7f2c85 | Iustin Pop | A comma-separated list of all the MACs of the instance's NICs. |
810 | 1b7f2c85 | Iustin Pop | |
811 | 1b7f2c85 | Iustin Pop | nic.ips |
812 | 1b7f2c85 | Iustin Pop | A comma-separated list of all the IP addresses of the instance's |
813 | 1b7f2c85 | Iustin Pop | NICs. |
814 | 1b7f2c85 | Iustin Pop | |
815 | 1b7f2c85 | Iustin Pop | nic.modes |
816 | 1b7f2c85 | Iustin Pop | A comma-separated list of all the modes of the instance's NICs. |
817 | 1b7f2c85 | Iustin Pop | |
818 | 1b7f2c85 | Iustin Pop | nic.links |
819 | 1b7f2c85 | Iustin Pop | A comma-separated list of all the link parameters of the instance's |
820 | 1b7f2c85 | Iustin Pop | NICs. |
821 | 1b7f2c85 | Iustin Pop | |
822 | 1b7f2c85 | Iustin Pop | nic.count |
823 | 1b7f2c85 | Iustin Pop | The number of instance nics. |
824 | 1b7f2c85 | Iustin Pop | |
825 | 1b7f2c85 | Iustin Pop | hv/*NAME* |
826 | 1b7f2c85 | Iustin Pop | The value of the hypervisor parameter called *NAME*. For details of |
827 | 1b7f2c85 | Iustin Pop | what hypervisor parameters exist and their meaning, see the **add** |
828 | 1b7f2c85 | Iustin Pop | command. |
829 | 1b7f2c85 | Iustin Pop | |
830 | 1b7f2c85 | Iustin Pop | be/memory |
831 | 1b7f2c85 | Iustin Pop | The configured memory for the instance. |
832 | 1b7f2c85 | Iustin Pop | |
833 | 1b7f2c85 | Iustin Pop | be/vcpus |
834 | 1b7f2c85 | Iustin Pop | The configured number of VCPUs for the instance. |
835 | 1b7f2c85 | Iustin Pop | |
836 | 1b7f2c85 | Iustin Pop | be/auto\_balance |
837 | 1b7f2c85 | Iustin Pop | Whether the instance is considered in N+1 checks. |
838 | 1b7f2c85 | Iustin Pop | |
839 | 1b7f2c85 | Iustin Pop | |
840 | 1b7f2c85 | Iustin Pop | If the value of the option starts with the character ``+``, the new |
841 | 1b7f2c85 | Iustin Pop | field(s) will be added to the default list. This allows to quickly |
842 | 1b7f2c85 | Iustin Pop | see the default list plus a few other fields, instead of retyping |
843 | 1b7f2c85 | Iustin Pop | the entire list of fields. |
844 | 1b7f2c85 | Iustin Pop | |
845 | 1b7f2c85 | Iustin Pop | There is a subtle grouping about the available output fields: all |
846 | 1b7f2c85 | Iustin Pop | fields except for ``oper_state``, ``oper_ram``, ``oper_vcpus`` and |
847 | 1b7f2c85 | Iustin Pop | ``status`` are configuration value and not run-time values. So if |
848 | 1b7f2c85 | Iustin Pop | you don't select any of the these fields, the query will be |
849 | 1b7f2c85 | Iustin Pop | satisfied instantly from the cluster configuration, without having |
850 | 1b7f2c85 | Iustin Pop | to ask the remote nodes for the data. This can be helpful for big |
851 | 1b7f2c85 | Iustin Pop | clusters when you only want some data and it makes sense to specify |
852 | 1b7f2c85 | Iustin Pop | a reduced set of output fields. |
853 | 1b7f2c85 | Iustin Pop | |
854 | 1b7f2c85 | Iustin Pop | The default output field list is: name, os, pnode, admin\_state, |
855 | 1b7f2c85 | Iustin Pop | oper\_state, oper\_ram. |
856 | 1b7f2c85 | Iustin Pop | |
857 | b82c5ff5 | Michael Hanselmann | |
858 | b82c5ff5 | Michael Hanselmann | LIST-FIELDS |
859 | 69d1b79d | Michael Hanselmann | ~~~~~~~~~~~ |
860 | b82c5ff5 | Michael Hanselmann | |
861 | b82c5ff5 | Michael Hanselmann | **list-fields** [field...] |
862 | b82c5ff5 | Michael Hanselmann | |
863 | b82c5ff5 | Michael Hanselmann | Lists available fields for instances. |
864 | b82c5ff5 | Michael Hanselmann | |
865 | b82c5ff5 | Michael Hanselmann | |
866 | 1b7f2c85 | Iustin Pop | INFO |
867 | 1b7f2c85 | Iustin Pop | ^^^^ |
868 | 1b7f2c85 | Iustin Pop | |
869 | 1b7f2c85 | Iustin Pop | **info** [-s \| --static] [--roman] {--all \| *instance*} |
870 | 1b7f2c85 | Iustin Pop | |
871 | 1b7f2c85 | Iustin Pop | Show detailed information about the given instance(s). This is |
872 | 1b7f2c85 | Iustin Pop | different from **list** as it shows detailed data about the |
873 | 1b7f2c85 | Iustin Pop | instance's disks (especially useful for the drbd disk template). |
874 | 1b7f2c85 | Iustin Pop | |
875 | 1b7f2c85 | Iustin Pop | If the option ``-s`` is used, only information available in the |
876 | 1b7f2c85 | Iustin Pop | configuration file is returned, without querying nodes, making the |
877 | 1b7f2c85 | Iustin Pop | operation faster. |
878 | 1b7f2c85 | Iustin Pop | |
879 | 1b7f2c85 | Iustin Pop | Use the ``--all`` to get info about all instances, rather than |
880 | 1b7f2c85 | Iustin Pop | explicitly passing the ones you're interested in. |
881 | 1b7f2c85 | Iustin Pop | |
882 | 1b7f2c85 | Iustin Pop | The ``--roman`` option can be used to cause envy among people who |
883 | 1b7f2c85 | Iustin Pop | like ancient cultures, but are stuck with non-latin-friendly |
884 | 1b7f2c85 | Iustin Pop | cluster virtualization technologies. |
885 | 1b7f2c85 | Iustin Pop | |
886 | 1b7f2c85 | Iustin Pop | MODIFY |
887 | 1b7f2c85 | Iustin Pop | ^^^^^^ |
888 | 1b7f2c85 | Iustin Pop | |
889 | 1b7f2c85 | Iustin Pop | | **modify** |
890 | 1b7f2c85 | Iustin Pop | | [-H *HYPERVISOR\_PARAMETERS*] |
891 | 1b7f2c85 | Iustin Pop | | [-B *BACKEND\_PARAMETERS*] |
892 | 1b7f2c85 | Iustin Pop | | [--net add*[:options]* \| --net remove \| --net *N:options*] |
893 | 87001920 | Iustin Pop | | [--disk add:size=*SIZE*[,vg=*VG*][,metavg=*VG*] \| --disk remove \| |
894 | 7af3534e | Dmitry Chernyak | | --disk *N*:mode=*MODE*] |
895 | 972a114f | Iustin Pop | | [-t plain | -t drbd -n *new_secondary*] |
896 | cee32223 | Michael Hanselmann | | [--os-type=*OS* [--force-variant]] |
897 | a53cd1f4 | Iustin Pop | | [-O, --os-parameters *param*=*value*... ] |
898 | 1b7f2c85 | Iustin Pop | | [--submit] |
899 | 1b7f2c85 | Iustin Pop | | {*instance*} |
900 | 1b7f2c85 | Iustin Pop | |
901 | 1b7f2c85 | Iustin Pop | Modifies the memory size, number of vcpus, ip address, MAC address |
902 | 1b7f2c85 | Iustin Pop | and/or nic parameters for an instance. It can also add and remove |
903 | 1b7f2c85 | Iustin Pop | disks and NICs to/from the instance. Note that you need to give at |
904 | 1b7f2c85 | Iustin Pop | least one of the arguments, otherwise the command complains. |
905 | 1b7f2c85 | Iustin Pop | |
906 | a53cd1f4 | Iustin Pop | The ``-H``, ``-B`` and ``-O`` options specifies hypervisor, backend |
907 | a53cd1f4 | Iustin Pop | and OS parameter options in the form of name=value[,...]. For details |
908 | a53cd1f4 | Iustin Pop | which options can be specified, see the **add** command. |
909 | 1b7f2c85 | Iustin Pop | |
910 | 1b7f2c85 | Iustin Pop | The ``-t`` option will change the disk template of the instance. |
911 | 972a114f | Iustin Pop | Currently only conversions between the plain and drbd disk templates |
912 | 972a114f | Iustin Pop | are supported, and the instance must be stopped before attempting the |
913 | 972a114f | Iustin Pop | conversion. When changing from the plain to the drbd disk template, a |
914 | 972a114f | Iustin Pop | new secondary node must be specified via the ``-n`` option. |
915 | 1b7f2c85 | Iustin Pop | |
916 | 1b7f2c85 | Iustin Pop | The ``--disk add:size=``*SIZE* option adds a disk to the instance. The |
917 | 87001920 | Iustin Pop | optional ``vg=``*VG* option specifies LVM volume group other than |
918 | 87001920 | Iustin Pop | default vg to create the disk on. For DRBD disks, the ``metavg=``*VG* |
919 | 87001920 | Iustin Pop | option specifies the volume group for the metadata device. The |
920 | 87001920 | Iustin Pop | ``--disk remove`` option will remove the last disk of the |
921 | 87001920 | Iustin Pop | instance. The ``--disk`` *N*``:mode=``*MODE* option will change the |
922 | 87001920 | Iustin Pop | mode of the Nth disk of the instance between read-only (``ro``) and |
923 | 1b7f2c85 | Iustin Pop | read-write (``rw``). |
924 | 1b7f2c85 | Iustin Pop | |
925 | 1b7f2c85 | Iustin Pop | The ``--net add:``*options* option will add a new NIC to the |
926 | 1b7f2c85 | Iustin Pop | instance. The available options are the same as in the **add** command |
927 | 1b7f2c85 | Iustin Pop | (mac, ip, link, mode). The ``--net remove`` will remove the last NIC |
928 | 1b7f2c85 | Iustin Pop | of the instance, while the ``--net`` *N*:*options* option will |
929 | 1b7f2c85 | Iustin Pop | change the parameters of the Nth instance NIC. |
930 | 1b7f2c85 | Iustin Pop | |
931 | cee32223 | Michael Hanselmann | The option ``--os-type`` will change the OS name for the instance |
932 | 1b7f2c85 | Iustin Pop | (without reinstallation). In case an OS variant is specified that |
933 | 1b7f2c85 | Iustin Pop | is not found, then by default the modification is refused, unless |
934 | 1b7f2c85 | Iustin Pop | ``--force-variant`` is passed. An invalid OS will also be refused, |
935 | 1b7f2c85 | Iustin Pop | unless the ``--force`` option is given. |
936 | 1b7f2c85 | Iustin Pop | |
937 | 1b7f2c85 | Iustin Pop | The ``--submit`` option is used to send the job to the master |
938 | 1b7f2c85 | Iustin Pop | daemon but not wait for its completion. The job ID will be shown so |
939 | 1b7f2c85 | Iustin Pop | that it can be examined via **gnt-job info**. |
940 | 1b7f2c85 | Iustin Pop | |
941 | 1b7f2c85 | Iustin Pop | All the changes take effect at the next restart. If the instance is |
942 | 1b7f2c85 | Iustin Pop | running, there is no effect on the instance. |
943 | 1b7f2c85 | Iustin Pop | |
944 | 1b7f2c85 | Iustin Pop | REINSTALL |
945 | 1b7f2c85 | Iustin Pop | ^^^^^^^^^ |
946 | 1b7f2c85 | Iustin Pop | |
947 | 1b7f2c85 | Iustin Pop | | **reinstall** [-o *os-type*] [--select-os] [-f *force*] |
948 | 1b7f2c85 | Iustin Pop | | [--force-multiple] |
949 | 1b7f2c85 | Iustin Pop | | [--instance \| --node \| --primary \| --secondary \| --all] |
950 | 1b7f2c85 | Iustin Pop | | [-O *OS\_PARAMETERS*] [--submit] {*instance*...} |
951 | 1b7f2c85 | Iustin Pop | |
952 | 1b7f2c85 | Iustin Pop | Reinstalls the operating system on the given instance(s). The |
953 | 1b7f2c85 | Iustin Pop | instance(s) must be stopped when running this command. If the |
954 | 1b7f2c85 | Iustin Pop | ``--os-type`` is specified, the operating system is changed. |
955 | 1b7f2c85 | Iustin Pop | |
956 | 1b7f2c85 | Iustin Pop | The ``--select-os`` option switches to an interactive OS reinstall. |
957 | 1b7f2c85 | Iustin Pop | The user is prompted to select the OS template from the list of |
958 | a53cd1f4 | Iustin Pop | available OS templates. OS parameters can be overridden using ``-O`` |
959 | a53cd1f4 | Iustin Pop | (more documentation for this option under the **add** command). |
960 | 1b7f2c85 | Iustin Pop | |
961 | 1b7f2c85 | Iustin Pop | Since this is a potentially dangerous command, the user will be |
962 | 1b7f2c85 | Iustin Pop | required to confirm this action, unless the ``-f`` flag is passed. |
963 | 1b7f2c85 | Iustin Pop | When multiple instances are selected (either by passing multiple |
964 | 1b7f2c85 | Iustin Pop | arguments or by using the ``--node``, ``--primary``, |
965 | 1b7f2c85 | Iustin Pop | ``--secondary`` or ``--all`` options), the user must pass the |
966 | 1b7f2c85 | Iustin Pop | ``--force-multiple`` options to skip the interactive confirmation. |
967 | 1b7f2c85 | Iustin Pop | |
968 | 1b7f2c85 | Iustin Pop | The ``--submit`` option is used to send the job to the master |
969 | 1b7f2c85 | Iustin Pop | daemon but not wait for its completion. The job ID will be shown so |
970 | 1b7f2c85 | Iustin Pop | that it can be examined via **gnt-job info**. |
971 | 1b7f2c85 | Iustin Pop | |
972 | 1b7f2c85 | Iustin Pop | RENAME |
973 | 1b7f2c85 | Iustin Pop | ^^^^^^ |
974 | 1b7f2c85 | Iustin Pop | |
975 | 1b7f2c85 | Iustin Pop | | **rename** [--no-ip-check] [--no-name-check] [--submit] |
976 | 1b7f2c85 | Iustin Pop | | {*instance*} {*new\_name*} |
977 | 1b7f2c85 | Iustin Pop | |
978 | 1b7f2c85 | Iustin Pop | Renames the given instance. The instance must be stopped when |
979 | 1b7f2c85 | Iustin Pop | running this command. The requirements for the new name are the |
980 | 1b7f2c85 | Iustin Pop | same as for adding an instance: the new name must be resolvable and |
981 | 1b7f2c85 | Iustin Pop | the IP it resolves to must not be reachable (in order to prevent |
982 | 1b7f2c85 | Iustin Pop | duplicate IPs the next time the instance is started). The IP test |
983 | 1b7f2c85 | Iustin Pop | can be skipped if the ``--no-ip-check`` option is passed. |
984 | 1b7f2c85 | Iustin Pop | |
985 | 1b7f2c85 | Iustin Pop | The ``--no-name-check`` skips the check for the new instance name |
986 | 1b7f2c85 | Iustin Pop | via the resolver (e.g. in DNS or /etc/hosts, depending on your |
987 | 1b7f2c85 | Iustin Pop | setup). Since the name check is used to compute the IP address, if |
988 | 1b7f2c85 | Iustin Pop | you pass this option you must also pass the ``--no-ip-check`` |
989 | 1b7f2c85 | Iustin Pop | option. |
990 | 1b7f2c85 | Iustin Pop | |
991 | 1b7f2c85 | Iustin Pop | The ``--submit`` option is used to send the job to the master |
992 | 1b7f2c85 | Iustin Pop | daemon but not wait for its completion. The job ID will be shown so |
993 | 1b7f2c85 | Iustin Pop | that it can be examined via **gnt-job info**. |
994 | 1b7f2c85 | Iustin Pop | |
995 | 1b7f2c85 | Iustin Pop | Starting/stopping/connecting to console |
996 | 1b7f2c85 | Iustin Pop | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
997 | 1b7f2c85 | Iustin Pop | |
998 | 1b7f2c85 | Iustin Pop | STARTUP |
999 | 1b7f2c85 | Iustin Pop | ^^^^^^^ |
1000 | 1b7f2c85 | Iustin Pop | |
1001 | 1b7f2c85 | Iustin Pop | | **startup** |
1002 | 1b7f2c85 | Iustin Pop | | [--force] [--ignore-offline] |
1003 | 1b7f2c85 | Iustin Pop | | [--force-multiple] |
1004 | 1b7f2c85 | Iustin Pop | | [--instance \| --node \| --primary \| --secondary \| --all \| |
1005 | 1b7f2c85 | Iustin Pop | | --tags \| --node-tags \| --pri-node-tags \| --sec-node-tags] |
1006 | 1b7f2c85 | Iustin Pop | | [-H ``key=value...``] [-B ``key=value...``] |
1007 | 1b7f2c85 | Iustin Pop | | [--submit] |
1008 | 1b7f2c85 | Iustin Pop | | {*name*...} |
1009 | 1b7f2c85 | Iustin Pop | |
1010 | 1b7f2c85 | Iustin Pop | Starts one or more instances, depending on the following options. |
1011 | 1b7f2c85 | Iustin Pop | The four available modes are: |
1012 | 1b7f2c85 | Iustin Pop | |
1013 | 1b7f2c85 | Iustin Pop | |
1014 | 1b7f2c85 | Iustin Pop | --instance |
1015 | 1b7f2c85 | Iustin Pop | will start the instances given as arguments (at least one argument |
1016 | 1b7f2c85 | Iustin Pop | required); this is the default selection |
1017 | 1b7f2c85 | Iustin Pop | |
1018 | 1b7f2c85 | Iustin Pop | --node |
1019 | 1b7f2c85 | Iustin Pop | will start the instances who have the given node as either primary |
1020 | 1b7f2c85 | Iustin Pop | or secondary |
1021 | 1b7f2c85 | Iustin Pop | |
1022 | 1b7f2c85 | Iustin Pop | --primary |
1023 | 1b7f2c85 | Iustin Pop | will start all instances whose primary node is in the list of nodes |
1024 | 1b7f2c85 | Iustin Pop | passed as arguments (at least one node required) |
1025 | 1b7f2c85 | Iustin Pop | |
1026 | 1b7f2c85 | Iustin Pop | --secondary |
1027 | 1b7f2c85 | Iustin Pop | will start all instances whose secondary node is in the list of |
1028 | 1b7f2c85 | Iustin Pop | nodes passed as arguments (at least one node required) |
1029 | 1b7f2c85 | Iustin Pop | |
1030 | 1b7f2c85 | Iustin Pop | --all |
1031 | 1b7f2c85 | Iustin Pop | will start all instances in the cluster (no arguments accepted) |
1032 | 1b7f2c85 | Iustin Pop | |
1033 | 1b7f2c85 | Iustin Pop | --tags |
1034 | 1b7f2c85 | Iustin Pop | will start all instances in the cluster with the tags given as |
1035 | 1b7f2c85 | Iustin Pop | arguments |
1036 | 1b7f2c85 | Iustin Pop | |
1037 | 1b7f2c85 | Iustin Pop | --node-tags |
1038 | 1b7f2c85 | Iustin Pop | will start all instances in the cluster on nodes with the tags |
1039 | 1b7f2c85 | Iustin Pop | given as arguments |
1040 | 1b7f2c85 | Iustin Pop | |
1041 | 1b7f2c85 | Iustin Pop | --pri-node-tags |
1042 | 1b7f2c85 | Iustin Pop | will start all instances in the cluster on primary nodes with the |
1043 | 1b7f2c85 | Iustin Pop | tags given as arguments |
1044 | 1b7f2c85 | Iustin Pop | |
1045 | 1b7f2c85 | Iustin Pop | --sec-node-tags |
1046 | 1b7f2c85 | Iustin Pop | will start all instances in the cluster on secondary nodes with the |
1047 | 1b7f2c85 | Iustin Pop | tags given as arguments |
1048 | 1b7f2c85 | Iustin Pop | |
1049 | 1b7f2c85 | Iustin Pop | |
1050 | 1b7f2c85 | Iustin Pop | Note that although you can pass more than one selection option, the |
1051 | 1b7f2c85 | Iustin Pop | last one wins, so in order to guarantee the desired result, don't |
1052 | 1b7f2c85 | Iustin Pop | pass more than one such option. |
1053 | 1b7f2c85 | Iustin Pop | |
1054 | 1b7f2c85 | Iustin Pop | Use ``--force`` to start even if secondary disks are failing. |
1055 | 1b7f2c85 | Iustin Pop | ``--ignore-offline`` can be used to ignore offline primary nodes |
1056 | 1b7f2c85 | Iustin Pop | and mark the instance as started even if the primary is not |
1057 | 1b7f2c85 | Iustin Pop | available. |
1058 | 1b7f2c85 | Iustin Pop | |
1059 | 1b7f2c85 | Iustin Pop | The ``--force-multiple`` will skip the interactive confirmation in |
1060 | 1b7f2c85 | Iustin Pop | the case the more than one instance will be affected. |
1061 | 1b7f2c85 | Iustin Pop | |
1062 | 1b7f2c85 | Iustin Pop | The ``-H`` and ``-B`` options specify temporary hypervisor and |
1063 | 1b7f2c85 | Iustin Pop | backend parameters that can be used to start an instance with |
1064 | 1b7f2c85 | Iustin Pop | modified parameters. They can be useful for quick testing without |
1065 | 1b7f2c85 | Iustin Pop | having to modify an instance back and forth, e.g.:: |
1066 | 1b7f2c85 | Iustin Pop | |
1067 | 1b7f2c85 | Iustin Pop | # gnt-instance start -H root_args="single" instance1 |
1068 | 1b7f2c85 | Iustin Pop | # gnt-instance start -B memory=2048 instance2 |
1069 | 1b7f2c85 | Iustin Pop | |
1070 | 1b7f2c85 | Iustin Pop | |
1071 | 1b7f2c85 | Iustin Pop | The first form will start the instance instance1 in single-user |
1072 | 1b7f2c85 | Iustin Pop | mode, and the instance instance2 with 2GB of RAM (this time only, |
1073 | 1b7f2c85 | Iustin Pop | unless that is the actual instance memory size already). Note that |
1074 | 1b7f2c85 | Iustin Pop | the values override the instance parameters (and not extend them): |
1075 | 1b7f2c85 | Iustin Pop | an instance with "root\_args=ro" when started with -H |
1076 | 1b7f2c85 | Iustin Pop | root\_args=single will result in "single", not "ro single". |
1077 | 1b7f2c85 | Iustin Pop | The ``--submit`` option is used to send the job to the master |
1078 | 1b7f2c85 | Iustin Pop | daemon but not wait for its completion. The job ID will be shown so |
1079 | 1b7f2c85 | Iustin Pop | that it can be examined via **gnt-job info**. |
1080 | 1b7f2c85 | Iustin Pop | |
1081 | 1b7f2c85 | Iustin Pop | Example:: |
1082 | 1b7f2c85 | Iustin Pop | |
1083 | 1b7f2c85 | Iustin Pop | # gnt-instance start instance1.example.com |
1084 | 1b7f2c85 | Iustin Pop | # gnt-instance start --node node1.example.com node2.example.com |
1085 | 1b7f2c85 | Iustin Pop | # gnt-instance start --all |
1086 | 1b7f2c85 | Iustin Pop | |
1087 | 1b7f2c85 | Iustin Pop | |
1088 | 1b7f2c85 | Iustin Pop | SHUTDOWN |
1089 | 1b7f2c85 | Iustin Pop | ^^^^^^^^ |
1090 | 1b7f2c85 | Iustin Pop | |
1091 | 1b7f2c85 | Iustin Pop | | **shutdown** |
1092 | 1b7f2c85 | Iustin Pop | | [--timeout=*N*] |
1093 | 1b7f2c85 | Iustin Pop | | [--force-multiple] [--ignore-offline] |
1094 | 1b7f2c85 | Iustin Pop | | [--instance \| --node \| --primary \| --secondary \| --all \| |
1095 | 1b7f2c85 | Iustin Pop | | --tags \| --node-tags \| --pri-node-tags \| --sec-node-tags] |
1096 | 1b7f2c85 | Iustin Pop | | [--submit] |
1097 | 1b7f2c85 | Iustin Pop | | {*name*...} |
1098 | 1b7f2c85 | Iustin Pop | |
1099 | 1b7f2c85 | Iustin Pop | Stops one or more instances. If the instance cannot be cleanly |
1100 | 1b7f2c85 | Iustin Pop | stopped during a hardcoded interval (currently 2 minutes), it will |
1101 | 1b7f2c85 | Iustin Pop | forcibly stop the instance (equivalent to switching off the power |
1102 | 1b7f2c85 | Iustin Pop | on a physical machine). |
1103 | 1b7f2c85 | Iustin Pop | |
1104 | 1b7f2c85 | Iustin Pop | The ``--timeout`` is used to specify how much time to wait before |
1105 | 1b7f2c85 | Iustin Pop | forcing the shutdown (e.g. ``xm destroy`` in Xen, killing the kvm |
1106 | 1b7f2c85 | Iustin Pop | process for KVM, etc.). By default two minutes are given to each |
1107 | 1b7f2c85 | Iustin Pop | instance to stop. |
1108 | 1b7f2c85 | Iustin Pop | |
1109 | 1b7f2c85 | Iustin Pop | The ``--instance``, ``--node``, ``--primary``, ``--secondary``, |
1110 | 1b7f2c85 | Iustin Pop | ``--all``, ``--tags``, ``--node-tags``, ``--pri-node-tags`` and |
1111 | 1b7f2c85 | Iustin Pop | ``--sec-node-tags`` options are similar as for the **startup** |
1112 | 1b7f2c85 | Iustin Pop | command and they influence the actual instances being shutdown. |
1113 | 1b7f2c85 | Iustin Pop | |
1114 | 1b7f2c85 | Iustin Pop | The ``--submit`` option is used to send the job to the master |
1115 | 1b7f2c85 | Iustin Pop | daemon but not wait for its completion. The job ID will be shown so |
1116 | 1b7f2c85 | Iustin Pop | that it can be examined via **gnt-job info**. |
1117 | 1b7f2c85 | Iustin Pop | |
1118 | 1b7f2c85 | Iustin Pop | ``--ignore-offline`` can be used to ignore offline primary nodes |
1119 | 1b7f2c85 | Iustin Pop | and force the instance to be marked as stopped. This option should |
1120 | 1b7f2c85 | Iustin Pop | be used with care as it can lead to an inconsistent cluster state. |
1121 | 1b7f2c85 | Iustin Pop | |
1122 | 1b7f2c85 | Iustin Pop | Example:: |
1123 | 1b7f2c85 | Iustin Pop | |
1124 | 1b7f2c85 | Iustin Pop | # gnt-instance shutdown instance1.example.com |
1125 | 1b7f2c85 | Iustin Pop | # gnt-instance shutdown --all |
1126 | 1b7f2c85 | Iustin Pop | |
1127 | 1b7f2c85 | Iustin Pop | |
1128 | 1b7f2c85 | Iustin Pop | REBOOT |
1129 | 1b7f2c85 | Iustin Pop | ^^^^^^ |
1130 | 1b7f2c85 | Iustin Pop | |
1131 | 1b7f2c85 | Iustin Pop | | **reboot** |
1132 | 1b7f2c85 | Iustin Pop | | [--type=*REBOOT-TYPE*] |
1133 | 1b7f2c85 | Iustin Pop | | [--ignore-secondaries] |
1134 | 1b7f2c85 | Iustin Pop | | [--shutdown-timeout=*N*] |
1135 | 1b7f2c85 | Iustin Pop | | [--force-multiple] |
1136 | 1b7f2c85 | Iustin Pop | | [--instance \| --node \| --primary \| --secondary \| --all \| |
1137 | 1b7f2c85 | Iustin Pop | | --tags \| --node-tags \| --pri-node-tags \| --sec-node-tags] |
1138 | 1b7f2c85 | Iustin Pop | | [--submit] |
1139 | 1b7f2c85 | Iustin Pop | | [*name*...] |
1140 | 1b7f2c85 | Iustin Pop | |
1141 | 1b7f2c85 | Iustin Pop | Reboots one or more instances. The type of reboot depends on the |
1142 | 1b7f2c85 | Iustin Pop | value of ``--type``. A soft reboot does a hypervisor reboot, a hard |
1143 | 1b7f2c85 | Iustin Pop | reboot does a instance stop, recreates the hypervisor config for |
1144 | 1b7f2c85 | Iustin Pop | the instance and starts the instance. A full reboot does the |
1145 | 1b7f2c85 | Iustin Pop | equivalent of **gnt-instance shutdown && gnt-instance startup**. |
1146 | 1b7f2c85 | Iustin Pop | The default is hard reboot. |
1147 | 1b7f2c85 | Iustin Pop | |
1148 | 1b7f2c85 | Iustin Pop | For the hard reboot the option ``--ignore-secondaries`` ignores |
1149 | 1b7f2c85 | Iustin Pop | errors for the secondary node while re-assembling the instance |
1150 | 1b7f2c85 | Iustin Pop | disks. |
1151 | 1b7f2c85 | Iustin Pop | |
1152 | 1b7f2c85 | Iustin Pop | The ``--instance``, ``--node``, ``--primary``, ``--secondary``, |
1153 | 1b7f2c85 | Iustin Pop | ``--all``, ``--tags``, ``--node-tags``, ``--pri-node-tags`` and |
1154 | 1b7f2c85 | Iustin Pop | ``--sec-node-tags`` options are similar as for the **startup** |
1155 | 1b7f2c85 | Iustin Pop | command and they influence the actual instances being rebooted. |
1156 | 1b7f2c85 | Iustin Pop | |
1157 | 1b7f2c85 | Iustin Pop | The ``--shutdown-timeout`` is used to specify how much time to wait |
1158 | 1b7f2c85 | Iustin Pop | before forcing the shutdown (xm destroy in xen, killing the kvm |
1159 | 1b7f2c85 | Iustin Pop | process, for kvm). By default two minutes are given to each |
1160 | 1b7f2c85 | Iustin Pop | instance to stop. |
1161 | 1b7f2c85 | Iustin Pop | |
1162 | 1b7f2c85 | Iustin Pop | The ``--force-multiple`` will skip the interactive confirmation in |
1163 | 1b7f2c85 | Iustin Pop | the case the more than one instance will be affected. |
1164 | 1b7f2c85 | Iustin Pop | |
1165 | 1b7f2c85 | Iustin Pop | Example:: |
1166 | 1b7f2c85 | Iustin Pop | |
1167 | 1b7f2c85 | Iustin Pop | # gnt-instance reboot instance1.example.com |
1168 | 1b7f2c85 | Iustin Pop | # gnt-instance reboot --type=full instance1.example.com |
1169 | 1b7f2c85 | Iustin Pop | |
1170 | 1b7f2c85 | Iustin Pop | |
1171 | 1b7f2c85 | Iustin Pop | CONSOLE |
1172 | 1b7f2c85 | Iustin Pop | ^^^^^^^ |
1173 | 1b7f2c85 | Iustin Pop | |
1174 | 1b7f2c85 | Iustin Pop | **console** [--show-cmd] {*instance*} |
1175 | 1b7f2c85 | Iustin Pop | |
1176 | 1b7f2c85 | Iustin Pop | Connects to the console of the given instance. If the instance is |
1177 | 1b7f2c85 | Iustin Pop | not up, an error is returned. Use the ``--show-cmd`` option to |
1178 | 1b7f2c85 | Iustin Pop | display the command instead of executing it. |
1179 | 1b7f2c85 | Iustin Pop | |
1180 | 1b7f2c85 | Iustin Pop | For HVM instances, this will attempt to connect to the serial |
1181 | 1b7f2c85 | Iustin Pop | console of the instance. To connect to the virtualized "physical" |
1182 | 1b7f2c85 | Iustin Pop | console of a HVM instance, use a VNC client with the connection |
1183 | 1b7f2c85 | Iustin Pop | info from the **info** command. |
1184 | 1b7f2c85 | Iustin Pop | |
1185 | 1b7f2c85 | Iustin Pop | Example:: |
1186 | 1b7f2c85 | Iustin Pop | |
1187 | 1b7f2c85 | Iustin Pop | # gnt-instance console instance1.example.com |
1188 | 1b7f2c85 | Iustin Pop | |
1189 | 1b7f2c85 | Iustin Pop | |
1190 | 1b7f2c85 | Iustin Pop | Disk management |
1191 | 1b7f2c85 | Iustin Pop | ~~~~~~~~~~~~~~~ |
1192 | 1b7f2c85 | Iustin Pop | |
1193 | 1b7f2c85 | Iustin Pop | REPLACE-DISKS |
1194 | 1b7f2c85 | Iustin Pop | ^^^^^^^^^^^^^ |
1195 | 1b7f2c85 | Iustin Pop | |
1196 | 1b7f2c85 | Iustin Pop | **replace-disks** [--submit] [--early-release] {-p} [--disks *idx*] |
1197 | 1b7f2c85 | Iustin Pop | {*instance*} |
1198 | 1b7f2c85 | Iustin Pop | |
1199 | 1b7f2c85 | Iustin Pop | **replace-disks** [--submit] [--early-release] {-s} [--disks *idx*] |
1200 | 1b7f2c85 | Iustin Pop | {*instance*} |
1201 | 1b7f2c85 | Iustin Pop | |
1202 | 1b7f2c85 | Iustin Pop | **replace-disks** [--submit] [--early-release] {--iallocator *name* |
1203 | 1b7f2c85 | Iustin Pop | \| --new-secondary *NODE*} {*instance*} |
1204 | 1b7f2c85 | Iustin Pop | |
1205 | 1b7f2c85 | Iustin Pop | **replace-disks** [--submit] [--early-release] {--auto} |
1206 | 1b7f2c85 | Iustin Pop | {*instance*} |
1207 | 1b7f2c85 | Iustin Pop | |
1208 | 1b7f2c85 | Iustin Pop | This command is a generalized form for replacing disks. It is |
1209 | 1b7f2c85 | Iustin Pop | currently only valid for the mirrored (DRBD) disk template. |
1210 | 1b7f2c85 | Iustin Pop | |
1211 | 1b7f2c85 | Iustin Pop | The first form (when passing the ``-p`` option) will replace the |
1212 | 1b7f2c85 | Iustin Pop | disks on the primary, while the second form (when passing the |
1213 | 1b7f2c85 | Iustin Pop | ``-s`` option will replace the disks on the secondary node. For |
1214 | 1b7f2c85 | Iustin Pop | these two cases (as the node doesn't change), it is possible to |
1215 | 1b7f2c85 | Iustin Pop | only run the replace for a subset of the disks, using the option |
1216 | 1b7f2c85 | Iustin Pop | ``--disks`` which takes a list of comma-delimited disk indices |
1217 | 1b7f2c85 | Iustin Pop | (zero-based), e.g. 0,2 to replace only the first and third disks. |
1218 | 1b7f2c85 | Iustin Pop | |
1219 | 1b7f2c85 | Iustin Pop | The third form (when passing either the ``--iallocator`` or the |
1220 | 1b7f2c85 | Iustin Pop | ``--new-secondary`` option) is designed to change secondary node of |
1221 | 1b7f2c85 | Iustin Pop | the instance. Specifying ``--iallocator`` makes the new secondary |
1222 | 1b7f2c85 | Iustin Pop | be selected automatically by the specified allocator plugin, |
1223 | 1b7f2c85 | Iustin Pop | otherwise the new secondary node will be the one chosen manually |
1224 | 1b7f2c85 | Iustin Pop | via the ``--new-secondary`` option. |
1225 | 1b7f2c85 | Iustin Pop | |
1226 | 1b7f2c85 | Iustin Pop | The fourth form (when using ``--auto``) will automatically |
1227 | 1b7f2c85 | Iustin Pop | determine which disks of an instance are faulty and replace them |
1228 | 1b7f2c85 | Iustin Pop | within the same node. The ``--auto`` option works only when an |
1229 | 1b7f2c85 | Iustin Pop | instance has only faulty disks on either the primary or secondary |
1230 | 1b7f2c85 | Iustin Pop | node; it doesn't work when both sides have faulty disks. |
1231 | 1b7f2c85 | Iustin Pop | |
1232 | 1b7f2c85 | Iustin Pop | The ``--submit`` option is used to send the job to the master |
1233 | 1b7f2c85 | Iustin Pop | daemon but not wait for its completion. The job ID will be shown so |
1234 | 1b7f2c85 | Iustin Pop | that it can be examined via **gnt-job info**. |
1235 | 1b7f2c85 | Iustin Pop | |
1236 | 1b7f2c85 | Iustin Pop | The ``--early-release`` changes the code so that the old storage on |
1237 | 1b7f2c85 | Iustin Pop | secondary node(s) is removed early (before the resync is completed) |
1238 | 1b7f2c85 | Iustin Pop | and the internal Ganeti locks for the current (and new, if any) |
1239 | 1b7f2c85 | Iustin Pop | secondary node are also released, thus allowing more parallelism in |
1240 | 1b7f2c85 | Iustin Pop | the cluster operation. This should be used only when recovering |
1241 | 1b7f2c85 | Iustin Pop | from a disk failure on the current secondary (thus the old storage |
1242 | 1b7f2c85 | Iustin Pop | is already broken) or when the storage on the primary node is known |
1243 | 1b7f2c85 | Iustin Pop | to be fine (thus we won't need the old storage for potential |
1244 | 1b7f2c85 | Iustin Pop | recovery). |
1245 | 1b7f2c85 | Iustin Pop | |
1246 | 1b7f2c85 | Iustin Pop | Note that it is not possible to select an offline or drained node |
1247 | 1b7f2c85 | Iustin Pop | as a new secondary. |
1248 | 1b7f2c85 | Iustin Pop | |
1249 | 1b7f2c85 | Iustin Pop | ACTIVATE-DISKS |
1250 | 1b7f2c85 | Iustin Pop | ^^^^^^^^^^^^^^ |
1251 | 1b7f2c85 | Iustin Pop | |
1252 | 1b7f2c85 | Iustin Pop | **activate-disks** [--submit] [--ignore-size] {*instance*} |
1253 | 1b7f2c85 | Iustin Pop | |
1254 | 1b7f2c85 | Iustin Pop | Activates the block devices of the given instance. If successful, |
1255 | 1b7f2c85 | Iustin Pop | the command will show the location and name of the block devices:: |
1256 | 1b7f2c85 | Iustin Pop | |
1257 | 1b7f2c85 | Iustin Pop | node1.example.com:disk/0:/dev/drbd0 |
1258 | 1b7f2c85 | Iustin Pop | node1.example.com:disk/1:/dev/drbd1 |
1259 | 1b7f2c85 | Iustin Pop | |
1260 | 1b7f2c85 | Iustin Pop | |
1261 | 1b7f2c85 | Iustin Pop | In this example, *node1.example.com* is the name of the node on |
1262 | 1b7f2c85 | Iustin Pop | which the devices have been activated. The *disk/0* and *disk/1* |
1263 | 1b7f2c85 | Iustin Pop | are the Ganeti-names of the instance disks; how they are visible |
1264 | 1b7f2c85 | Iustin Pop | inside the instance is hypervisor-specific. */dev/drbd0* and |
1265 | 1b7f2c85 | Iustin Pop | */dev/drbd1* are the actual block devices as visible on the node. |
1266 | 1b7f2c85 | Iustin Pop | The ``--submit`` option is used to send the job to the master |
1267 | 1b7f2c85 | Iustin Pop | daemon but not wait for its completion. The job ID will be shown so |
1268 | 1b7f2c85 | Iustin Pop | that it can be examined via **gnt-job info**. |
1269 | 1b7f2c85 | Iustin Pop | |
1270 | 1b7f2c85 | Iustin Pop | The ``--ignore-size`` option can be used to activate disks ignoring |
1271 | 1b7f2c85 | Iustin Pop | the currently configured size in Ganeti. This can be used in cases |
1272 | 1b7f2c85 | Iustin Pop | where the configuration has gotten out of sync with the real-world |
1273 | 1b7f2c85 | Iustin Pop | (e.g. after a partially-failed grow-disk operation or due to |
1274 | 1b7f2c85 | Iustin Pop | rounding in LVM devices). This should not be used in normal cases, |
1275 | 1b7f2c85 | Iustin Pop | but only when activate-disks fails without it. |
1276 | 1b7f2c85 | Iustin Pop | |
1277 | 1b7f2c85 | Iustin Pop | Note that it is safe to run this command while the instance is |
1278 | 1b7f2c85 | Iustin Pop | already running. |
1279 | 1b7f2c85 | Iustin Pop | |
1280 | 1b7f2c85 | Iustin Pop | DEACTIVATE-DISKS |
1281 | 1b7f2c85 | Iustin Pop | ^^^^^^^^^^^^^^^^ |
1282 | 1b7f2c85 | Iustin Pop | |
1283 | c9c41373 | Iustin Pop | **deactivate-disks** [-f] [--submit] {*instance*} |
1284 | 1b7f2c85 | Iustin Pop | |
1285 | 1b7f2c85 | Iustin Pop | De-activates the block devices of the given instance. Note that if |
1286 | 1b7f2c85 | Iustin Pop | you run this command for an instance with a drbd disk template, |
1287 | 1b7f2c85 | Iustin Pop | while it is running, it will not be able to shutdown the block |
1288 | 1b7f2c85 | Iustin Pop | devices on the primary node, but it will shutdown the block devices |
1289 | 1b7f2c85 | Iustin Pop | on the secondary nodes, thus breaking the replication. |
1290 | 1b7f2c85 | Iustin Pop | |
1291 | c9c41373 | Iustin Pop | The ``-f``/``--force`` option will skip checks that the instance is |
1292 | c9c41373 | Iustin Pop | down; in case the hypervisor is confused and we can't talk to it, |
1293 | c9c41373 | Iustin Pop | normally Ganeti will refuse to deactivate the disks, but with this |
1294 | c9c41373 | Iustin Pop | option passed it will skip this check and directly try to deactivate |
1295 | c9c41373 | Iustin Pop | the disks. This can still fail due to the instance actually running or |
1296 | c9c41373 | Iustin Pop | other issues. |
1297 | c9c41373 | Iustin Pop | |
1298 | 1b7f2c85 | Iustin Pop | The ``--submit`` option is used to send the job to the master |
1299 | 1b7f2c85 | Iustin Pop | daemon but not wait for its completion. The job ID will be shown so |
1300 | 1b7f2c85 | Iustin Pop | that it can be examined via **gnt-job info**. |
1301 | 1b7f2c85 | Iustin Pop | |
1302 | 1b7f2c85 | Iustin Pop | GROW-DISK |
1303 | 1b7f2c85 | Iustin Pop | ^^^^^^^^^ |
1304 | 1b7f2c85 | Iustin Pop | |
1305 | 1b7f2c85 | Iustin Pop | **grow-disk** [--no-wait-for-sync] [--submit] {*instance*} {*disk*} |
1306 | 1b7f2c85 | Iustin Pop | {*amount*} |
1307 | 1b7f2c85 | Iustin Pop | |
1308 | 1b7f2c85 | Iustin Pop | Grows an instance's disk. This is only possible for instances |
1309 | 1b7f2c85 | Iustin Pop | having a plain or drbd disk template. |
1310 | 1b7f2c85 | Iustin Pop | |
1311 | 1b7f2c85 | Iustin Pop | Note that this command only change the block device size; it will |
1312 | 1b7f2c85 | Iustin Pop | not grow the actual filesystems, partitions, etc. that live on that |
1313 | 1b7f2c85 | Iustin Pop | disk. Usually, you will need to: |
1314 | 1b7f2c85 | Iustin Pop | |
1315 | 1b7f2c85 | Iustin Pop | |
1316 | 1b7f2c85 | Iustin Pop | |
1317 | 1b7f2c85 | Iustin Pop | |
1318 | 1b7f2c85 | Iustin Pop | #. use **gnt-instance grow-disk** |
1319 | 1b7f2c85 | Iustin Pop | |
1320 | 1b7f2c85 | Iustin Pop | #. reboot the instance (later, at a convenient time) |
1321 | 1b7f2c85 | Iustin Pop | |
1322 | 1b7f2c85 | Iustin Pop | #. use a filesystem resizer, such as ext2online(8) or |
1323 | 1b7f2c85 | Iustin Pop | xfs\_growfs(8) to resize the filesystem, or use fdisk(8) to change |
1324 | 1b7f2c85 | Iustin Pop | the partition table on the disk |
1325 | 1b7f2c85 | Iustin Pop | |
1326 | 1b7f2c85 | Iustin Pop | |
1327 | 1b7f2c85 | Iustin Pop | The *disk* argument is the index of the instance disk to grow. The |
1328 | 1b7f2c85 | Iustin Pop | *amount* argument is given either as a number (and it represents |
1329 | 1b7f2c85 | Iustin Pop | the amount to increase the disk with in mebibytes) or can be given |
1330 | 1b7f2c85 | Iustin Pop | similar to the arguments in the create instance operation, with a |
1331 | 1b7f2c85 | Iustin Pop | suffix denoting the unit. |
1332 | 1b7f2c85 | Iustin Pop | |
1333 | 1b7f2c85 | Iustin Pop | Note that the disk grow operation might complete on one node but |
1334 | 1b7f2c85 | Iustin Pop | fail on the other; this will leave the instance with |
1335 | 1b7f2c85 | Iustin Pop | different-sized LVs on the two nodes, but this will not create |
1336 | 1b7f2c85 | Iustin Pop | problems (except for unused space). |
1337 | 1b7f2c85 | Iustin Pop | |
1338 | 1b7f2c85 | Iustin Pop | If you do not want gnt-instance to wait for the new disk region to |
1339 | 1b7f2c85 | Iustin Pop | be synced, use the ``--no-wait-for-sync`` option. |
1340 | 1b7f2c85 | Iustin Pop | |
1341 | 1b7f2c85 | Iustin Pop | The ``--submit`` option is used to send the job to the master |
1342 | 1b7f2c85 | Iustin Pop | daemon but not wait for its completion. The job ID will be shown so |
1343 | 1b7f2c85 | Iustin Pop | that it can be examined via **gnt-job info**. |
1344 | 1b7f2c85 | Iustin Pop | |
1345 | 1b7f2c85 | Iustin Pop | Example (increase the first disk for instance1 by 16GiB):: |
1346 | 1b7f2c85 | Iustin Pop | |
1347 | 1b7f2c85 | Iustin Pop | # gnt-instance grow-disk instance1.example.com 0 16g |
1348 | 1b7f2c85 | Iustin Pop | |
1349 | 1b7f2c85 | Iustin Pop | |
1350 | 1b7f2c85 | Iustin Pop | Also note that disk shrinking is not supported; use |
1351 | 1b7f2c85 | Iustin Pop | **gnt-backup export** and then **gnt-backup import** to reduce the |
1352 | 1b7f2c85 | Iustin Pop | disk size of an instance. |
1353 | 1b7f2c85 | Iustin Pop | |
1354 | 1b7f2c85 | Iustin Pop | RECREATE-DISKS |
1355 | 1b7f2c85 | Iustin Pop | ^^^^^^^^^^^^^^ |
1356 | 1b7f2c85 | Iustin Pop | |
1357 | 1b7f2c85 | Iustin Pop | **recreate-disks** [--submit] [--disks=``indices``] {*instance*} |
1358 | 1b7f2c85 | Iustin Pop | |
1359 | 1b7f2c85 | Iustin Pop | Recreates the disks of the given instance, or only a subset of the |
1360 | 1b7f2c85 | Iustin Pop | disks (if the option ``disks`` is passed, which must be a |
1361 | 1b7f2c85 | Iustin Pop | comma-separated list of disk indices, starting from zero). |
1362 | 1b7f2c85 | Iustin Pop | |
1363 | 1b7f2c85 | Iustin Pop | Note that this functionality should only be used for missing disks; |
1364 | 1b7f2c85 | Iustin Pop | if any of the given disks already exists, the operation will fail. |
1365 | 1b7f2c85 | Iustin Pop | While this is suboptimal, recreate-disks should hopefully not be |
1366 | 1b7f2c85 | Iustin Pop | needed in normal operation and as such the impact of this is low. |
1367 | 1b7f2c85 | Iustin Pop | |
1368 | 1b7f2c85 | Iustin Pop | The ``--submit`` option is used to send the job to the master |
1369 | 1b7f2c85 | Iustin Pop | daemon but not wait for its completion. The job ID will be shown so |
1370 | 1b7f2c85 | Iustin Pop | that it can be examined via **gnt-job info**. |
1371 | 1b7f2c85 | Iustin Pop | |
1372 | 1b7f2c85 | Iustin Pop | Recovery |
1373 | 1b7f2c85 | Iustin Pop | ~~~~~~~~ |
1374 | 1b7f2c85 | Iustin Pop | |
1375 | 1b7f2c85 | Iustin Pop | FAILOVER |
1376 | 1b7f2c85 | Iustin Pop | ^^^^^^^^ |
1377 | 1b7f2c85 | Iustin Pop | |
1378 | 1b7f2c85 | Iustin Pop | **failover** [-f] [--ignore-consistency] [--shutdown-timeout=*N*] |
1379 | 1b7f2c85 | Iustin Pop | [--submit] {*instance*} |
1380 | 1b7f2c85 | Iustin Pop | |
1381 | 1b7f2c85 | Iustin Pop | Failover will fail the instance over its secondary node. This works |
1382 | 1b7f2c85 | Iustin Pop | only for instances having a drbd disk template. |
1383 | 1b7f2c85 | Iustin Pop | |
1384 | 1b7f2c85 | Iustin Pop | Normally the failover will check the consistency of the disks |
1385 | 1b7f2c85 | Iustin Pop | before failing over the instance. If you are trying to migrate |
1386 | 1b7f2c85 | Iustin Pop | instances off a dead node, this will fail. Use the |
1387 | 1b7f2c85 | Iustin Pop | ``--ignore-consistency`` option for this purpose. Note that this |
1388 | 1b7f2c85 | Iustin Pop | option can be dangerous as errors in shutting down the instance |
1389 | 1b7f2c85 | Iustin Pop | will be ignored, resulting in possibly having the instance running |
1390 | 1b7f2c85 | Iustin Pop | on two machines in parallel (on disconnected DRBD drives). |
1391 | 1b7f2c85 | Iustin Pop | |
1392 | 1b7f2c85 | Iustin Pop | The ``--shutdown-timeout`` is used to specify how much time to wait |
1393 | 1b7f2c85 | Iustin Pop | before forcing the shutdown (xm destroy in xen, killing the kvm |
1394 | 1b7f2c85 | Iustin Pop | process, for kvm). By default two minutes are given to each |
1395 | 1b7f2c85 | Iustin Pop | instance to stop. |
1396 | 1b7f2c85 | Iustin Pop | |
1397 | 1b7f2c85 | Iustin Pop | The ``--submit`` option is used to send the job to the master |
1398 | 1b7f2c85 | Iustin Pop | daemon but not wait for its completion. The job ID will be shown so |
1399 | 1b7f2c85 | Iustin Pop | that it can be examined via **gnt-job info**. |
1400 | 1b7f2c85 | Iustin Pop | |
1401 | 1b7f2c85 | Iustin Pop | Example:: |
1402 | 1b7f2c85 | Iustin Pop | |
1403 | 1b7f2c85 | Iustin Pop | # gnt-instance failover instance1.example.com |
1404 | 1b7f2c85 | Iustin Pop | |
1405 | 1b7f2c85 | Iustin Pop | |
1406 | 1b7f2c85 | Iustin Pop | MIGRATE |
1407 | 1b7f2c85 | Iustin Pop | ^^^^^^^ |
1408 | 1b7f2c85 | Iustin Pop | |
1409 | 1b7f2c85 | Iustin Pop | **migrate** [-f] {--cleanup} {*instance*} |
1410 | 1b7f2c85 | Iustin Pop | |
1411 | 1b7f2c85 | Iustin Pop | **migrate** [-f] [--non-live] [--migration-mode=live\|non-live] |
1412 | 1b7f2c85 | Iustin Pop | {*instance*} |
1413 | 1b7f2c85 | Iustin Pop | |
1414 | 1b7f2c85 | Iustin Pop | Migrate will move the instance to its secondary node without |
1415 | 1b7f2c85 | Iustin Pop | shutdown. It only works for instances having the drbd8 disk |
1416 | 1b7f2c85 | Iustin Pop | template type. |
1417 | 1b7f2c85 | Iustin Pop | |
1418 | 1b7f2c85 | Iustin Pop | The migration command needs a perfectly healthy instance, as we |
1419 | 1b7f2c85 | Iustin Pop | rely on the dual-master capability of drbd8 and the disks of the |
1420 | 1b7f2c85 | Iustin Pop | instance are not allowed to be degraded. |
1421 | 1b7f2c85 | Iustin Pop | |
1422 | 1b7f2c85 | Iustin Pop | The ``--non-live`` and ``--migration-mode=non-live`` options will |
1423 | 1b7f2c85 | Iustin Pop | switch (for the hypervisors that support it) between a "fully live" |
1424 | 1b7f2c85 | Iustin Pop | (i.e. the interruption is as minimal as possible) migration and one |
1425 | 1b7f2c85 | Iustin Pop | in which the instance is frozen, its state saved and transported to |
1426 | 1b7f2c85 | Iustin Pop | the remote node, and then resumed there. This all depends on the |
1427 | 1b7f2c85 | Iustin Pop | hypervisor support for two different methods. In any case, it is |
1428 | 1b7f2c85 | Iustin Pop | not an error to pass this parameter (it will just be ignored if the |
1429 | 1b7f2c85 | Iustin Pop | hypervisor doesn't support it). The option |
1430 | 1b7f2c85 | Iustin Pop | ``--migration-mode=live`` option will request a fully-live |
1431 | 1b7f2c85 | Iustin Pop | migration. The default, when neither option is passed, depends on |
1432 | 1b7f2c85 | Iustin Pop | the hypervisor parameters (and can be viewed with the |
1433 | 1b7f2c85 | Iustin Pop | **gnt-cluster info** command). |
1434 | 1b7f2c85 | Iustin Pop | |
1435 | 1b7f2c85 | Iustin Pop | If the ``--cleanup`` option is passed, the operation changes from |
1436 | 1b7f2c85 | Iustin Pop | migration to attempting recovery from a failed previous migration. |
1437 | 1b7f2c85 | Iustin Pop | In this mode, Ganeti checks if the instance runs on the correct |
1438 | 1b7f2c85 | Iustin Pop | node (and updates its configuration if not) and ensures the |
1439 | 1b7f2c85 | Iustin Pop | instances's disks are configured correctly. In this mode, the |
1440 | 1b7f2c85 | Iustin Pop | ``--non-live`` option is ignored. |
1441 | 1b7f2c85 | Iustin Pop | |
1442 | 1b7f2c85 | Iustin Pop | The option ``-f`` will skip the prompting for confirmation. |
1443 | 1b7f2c85 | Iustin Pop | |
1444 | 1b7f2c85 | Iustin Pop | Example (and expected output):: |
1445 | 1b7f2c85 | Iustin Pop | |
1446 | 1b7f2c85 | Iustin Pop | # gnt-instance migrate instance1 |
1447 | 1b7f2c85 | Iustin Pop | Migrate will happen to the instance instance1. Note that migration is |
1448 | 1b7f2c85 | Iustin Pop | **experimental** in this version. This might impact the instance if |
1449 | 1b7f2c85 | Iustin Pop | anything goes wrong. Continue? |
1450 | 1b7f2c85 | Iustin Pop | y/[n]/?: y |
1451 | 1b7f2c85 | Iustin Pop | * checking disk consistency between source and target |
1452 | 1b7f2c85 | Iustin Pop | * ensuring the target is in secondary mode |
1453 | 1b7f2c85 | Iustin Pop | * changing disks into dual-master mode |
1454 | 1b7f2c85 | Iustin Pop | - INFO: Waiting for instance instance1 to sync disks. |
1455 | 1b7f2c85 | Iustin Pop | - INFO: Instance instance1's disks are in sync. |
1456 | 1b7f2c85 | Iustin Pop | * migrating instance to node2.example.com |
1457 | 1b7f2c85 | Iustin Pop | * changing the instance's disks on source node to secondary |
1458 | 1b7f2c85 | Iustin Pop | - INFO: Waiting for instance instance1 to sync disks. |
1459 | 1b7f2c85 | Iustin Pop | - INFO: Instance instance1's disks are in sync. |
1460 | 1b7f2c85 | Iustin Pop | * changing the instance's disks to single-master |
1461 | 1b7f2c85 | Iustin Pop | # |
1462 | 1b7f2c85 | Iustin Pop | |
1463 | 1b7f2c85 | Iustin Pop | |
1464 | 1b7f2c85 | Iustin Pop | MOVE |
1465 | 1b7f2c85 | Iustin Pop | ^^^^ |
1466 | 1b7f2c85 | Iustin Pop | |
1467 | 1b7f2c85 | Iustin Pop | **move** [-f] [-n *node*] [--shutdown-timeout=*N*] [--submit] |
1468 | 1b7f2c85 | Iustin Pop | {*instance*} |
1469 | 1b7f2c85 | Iustin Pop | |
1470 | 1b7f2c85 | Iustin Pop | Move will move the instance to an arbitrary node in the cluster. |
1471 | 1b7f2c85 | Iustin Pop | This works only for instances having a plain or file disk |
1472 | 1b7f2c85 | Iustin Pop | template. |
1473 | 1b7f2c85 | Iustin Pop | |
1474 | 1b7f2c85 | Iustin Pop | Note that since this operation is done via data copy, it will take |
1475 | 1b7f2c85 | Iustin Pop | a long time for big disks (similar to replace-disks for a drbd |
1476 | 1b7f2c85 | Iustin Pop | instance). |
1477 | 1b7f2c85 | Iustin Pop | |
1478 | 1b7f2c85 | Iustin Pop | The ``--shutdown-timeout`` is used to specify how much time to wait |
1479 | 1b7f2c85 | Iustin Pop | before forcing the shutdown (e.g. ``xm destroy`` in XEN, killing the |
1480 | 1b7f2c85 | Iustin Pop | kvm process for KVM, etc.). By default two minutes are given to each |
1481 | 1b7f2c85 | Iustin Pop | instance to stop. |
1482 | 1b7f2c85 | Iustin Pop | |
1483 | 1b7f2c85 | Iustin Pop | The ``--submit`` option is used to send the job to the master |
1484 | 1b7f2c85 | Iustin Pop | daemon but not wait for its completion. The job ID will be shown so |
1485 | 1b7f2c85 | Iustin Pop | that it can be examined via **gnt-job info**. |
1486 | 1b7f2c85 | Iustin Pop | |
1487 | 1b7f2c85 | Iustin Pop | Example:: |
1488 | 1b7f2c85 | Iustin Pop | |
1489 | 1b7f2c85 | Iustin Pop | # gnt-instance move -n node3.example.com instance1.example.com |
1490 | 1b7f2c85 | Iustin Pop | |
1491 | 1b7f2c85 | Iustin Pop | |
1492 | 1b7f2c85 | Iustin Pop | TAGS |
1493 | 1b7f2c85 | Iustin Pop | ~~~~ |
1494 | 1b7f2c85 | Iustin Pop | |
1495 | 1b7f2c85 | Iustin Pop | ADD-TAGS |
1496 | 1b7f2c85 | Iustin Pop | ^^^^^^^^ |
1497 | 1b7f2c85 | Iustin Pop | |
1498 | 1b7f2c85 | Iustin Pop | **add-tags** [--from *file*] {*instancename*} {*tag*...} |
1499 | 1b7f2c85 | Iustin Pop | |
1500 | 1b7f2c85 | Iustin Pop | Add tags to the given instance. If any of the tags contains invalid |
1501 | 1b7f2c85 | Iustin Pop | characters, the entire operation will abort. |
1502 | 1b7f2c85 | Iustin Pop | |
1503 | 1b7f2c85 | Iustin Pop | If the ``--from`` option is given, the list of tags will be |
1504 | 1b7f2c85 | Iustin Pop | extended with the contents of that file (each line becomes a tag). |
1505 | 1b7f2c85 | Iustin Pop | In this case, there is not need to pass tags on the command line |
1506 | b5a418aa | Michael Hanselmann | (if you do, both sources will be used). A file name of ``-`` will be |
1507 | 1b7f2c85 | Iustin Pop | interpreted as stdin. |
1508 | 1b7f2c85 | Iustin Pop | |
1509 | 1b7f2c85 | Iustin Pop | LIST-TAGS |
1510 | 1b7f2c85 | Iustin Pop | ^^^^^^^^^ |
1511 | 1b7f2c85 | Iustin Pop | |
1512 | 1b7f2c85 | Iustin Pop | **list-tags** {*instancename*} |
1513 | 1b7f2c85 | Iustin Pop | |
1514 | 1b7f2c85 | Iustin Pop | List the tags of the given instance. |
1515 | 1b7f2c85 | Iustin Pop | |
1516 | 1b7f2c85 | Iustin Pop | REMOVE-TAGS |
1517 | 1b7f2c85 | Iustin Pop | ^^^^^^^^^^^ |
1518 | 1b7f2c85 | Iustin Pop | |
1519 | 1b7f2c85 | Iustin Pop | **remove-tags** [--from *file*] {*instancename*} {*tag*...} |
1520 | 1b7f2c85 | Iustin Pop | |
1521 | 1b7f2c85 | Iustin Pop | Remove tags from the given instance. If any of the tags are not |
1522 | 1b7f2c85 | Iustin Pop | existing on the node, the entire operation will abort. |
1523 | 1b7f2c85 | Iustin Pop | |
1524 | 1b7f2c85 | Iustin Pop | If the ``--from`` option is given, the list of tags to be removed will |
1525 | 1b7f2c85 | Iustin Pop | be extended with the contents of that file (each line becomes a tag). |
1526 | 1b7f2c85 | Iustin Pop | In this case, there is not need to pass tags on the command line (if |
1527 | b5a418aa | Michael Hanselmann | you do, tags from both sources will be removed). A file name of ``-`` |
1528 | b5a418aa | Michael Hanselmann | will be interpreted as stdin. |