root / man / ganeti-os-interface.rst @ 5dd9a07e
History | View | Annotate | Download (12.6 kB)
1 | 4db3647e | Iustin Pop | ganeti-os-interface(7) Ganeti | Version @GANETI_VERSION@ |
---|---|---|---|
2 | 4db3647e | Iustin Pop | ======================================================== |
3 | 4db3647e | Iustin Pop | |
4 | 4db3647e | Iustin Pop | Name |
5 | 4db3647e | Iustin Pop | ---- |
6 | 4db3647e | Iustin Pop | |
7 | 4db3647e | Iustin Pop | ganeti-os-interface - Specifications for guest OS types |
8 | 4db3647e | Iustin Pop | |
9 | 4db3647e | Iustin Pop | DESCRIPTION |
10 | 4db3647e | Iustin Pop | ----------- |
11 | 4db3647e | Iustin Pop | |
12 | d1b1deb4 | Iustin Pop | The method of supporting guest operating systems in Ganeti is to have, |
13 | d1b1deb4 | Iustin Pop | for each guest OS type, a directory containing a number of required |
14 | d1b1deb4 | Iustin Pop | files. This directory must be present across all nodes (Ganeti doesn't |
15 | d1b1deb4 | Iustin Pop | replicate it) in order for the OS to be usable by Ganeti. |
16 | d1b1deb4 | Iustin Pop | |
17 | 4db3647e | Iustin Pop | |
18 | 4db3647e | Iustin Pop | REFERENCE |
19 | 4db3647e | Iustin Pop | --------- |
20 | 4db3647e | Iustin Pop | |
21 | dfba45b1 | Stephen Shirley | There are eight required files: *create*, *import*, *export*, *rename*, |
22 | d1b1deb4 | Iustin Pop | *verify* (executables), *ganeti_api_version*, *variants.list* and |
23 | d1b1deb4 | Iustin Pop | *parameters.list* (text files). |
24 | 4db3647e | Iustin Pop | |
25 | 4db3647e | Iustin Pop | Common environment |
26 | 4db3647e | Iustin Pop | ~~~~~~~~~~~~~~~~~~ |
27 | 4db3647e | Iustin Pop | |
28 | 4db3647e | Iustin Pop | All commands will get their input via environment variables. A |
29 | 4db3647e | Iustin Pop | common set of variables will be exported for all commands, and some |
30 | 4db3647e | Iustin Pop | of them might have extra ones. Note that all counts are |
31 | 4db3647e | Iustin Pop | zero-based. |
32 | 4db3647e | Iustin Pop | |
33 | 896a03f6 | Iustin Pop | Since Ganeti version 2.5, the environment will be cleaned up before |
34 | 896a03f6 | Iustin Pop | being passed to scripts, therefore they will not inherit the environment |
35 | 896a03f6 | Iustin Pop | in with which the ganeti node daemon was started. If you depend on any |
36 | 896a03f6 | Iustin Pop | environment variables (non-Ganeti), then you will need to define or |
37 | 896a03f6 | Iustin Pop | source them appropriately. |
38 | 896a03f6 | Iustin Pop | |
39 | 4db3647e | Iustin Pop | OS_API_VERSION |
40 | 4db3647e | Iustin Pop | The OS API version that the rest of the environment conforms to. |
41 | 4db3647e | Iustin Pop | |
42 | 4db3647e | Iustin Pop | INSTANCE_NAME |
43 | 4db3647e | Iustin Pop | The instance name the script should operate on. |
44 | 4db3647e | Iustin Pop | |
45 | 4db3647e | Iustin Pop | INSTANCE_OS, OS_NAME |
46 | 4db3647e | Iustin Pop | Both names point to the name of the instance's OS as Ganeti knows |
47 | 4db3647e | Iustin Pop | it. This can simplify the OS scripts by providing the same scripts |
48 | 4db3647e | Iustin Pop | under multiple names, and then the scripts can use this name to |
49 | 4db3647e | Iustin Pop | alter their behaviour. |
50 | 4db3647e | Iustin Pop | |
51 | 4db3647e | Iustin Pop | With OS API 15 changing the script behavior based on this variable |
52 | 4db3647e | Iustin Pop | is deprecated: OS_VARIANT should be used instead (see below). |
53 | 4db3647e | Iustin Pop | |
54 | 4db3647e | Iustin Pop | OS_VARIANT |
55 | 4db3647e | Iustin Pop | The variant of the OS which should be installed. Each OS must |
56 | 4db3647e | Iustin Pop | support all variants listed under its variants.list file, and may |
57 | 4db3647e | Iustin Pop | support more. Any more supported variants should be properly |
58 | 4db3647e | Iustin Pop | documented in the per-OS documentation. |
59 | 4db3647e | Iustin Pop | |
60 | 4db3647e | Iustin Pop | HYPERVISOR |
61 | 4db3647e | Iustin Pop | The hypervisor of this instance. |
62 | 4db3647e | Iustin Pop | |
63 | 4db3647e | Iustin Pop | DISK_COUNT |
64 | 37a8cb64 | Helga Velroyen | The number of disks the instance has. The actual disk definitions are |
65 | 4db3647e | Iustin Pop | in a set of additional variables. The instance's disk will be |
66 | 4db3647e | Iustin Pop | numbered from 0 to this value minus one. |
67 | 4db3647e | Iustin Pop | |
68 | 4db3647e | Iustin Pop | DISK_%N_PATH |
69 | 4db3647e | Iustin Pop | The path to the storage for disk N of the instance. This might be |
70 | 4db3647e | Iustin Pop | either a block device or a regular file, in which case the OS |
71 | 4db3647e | Iustin Pop | scripts should use ``losetup`` (if they need to mount it). E.g. the |
72 | 4db3647e | Iustin Pop | first disk of the instance might be exported as |
73 | 4db3647e | Iustin Pop | ``DISK_0_PATH=/dev/drbd0``. |
74 | 4db3647e | Iustin Pop | |
75 | 4db3647e | Iustin Pop | DISK_%N_ACCESS |
76 | 4db3647e | Iustin Pop | This is how the hypervisor will export the instance disks: either |
77 | 4db3647e | Iustin Pop | read-write (``rw``) or read-only (``ro``). |
78 | 4db3647e | Iustin Pop | |
79 | 8a348b15 | Christos Stavrakakis | DISK_%N_UUID |
80 | 8a348b15 | Christos Stavrakakis | The uuid associated with the N-th disk of the instance. |
81 | 8a348b15 | Christos Stavrakakis | |
82 | 8a348b15 | Christos Stavrakakis | DISK_%N_NAME |
83 | 8a348b15 | Christos Stavrakakis | (Optional) The name, if any, associated with the N-th disk of the instance. |
84 | 8a348b15 | Christos Stavrakakis | |
85 | 4db3647e | Iustin Pop | DISK_%N_FRONTEND_TYPE |
86 | 4db3647e | Iustin Pop | (Optional) If applicable to the current hypervisor type: the type |
87 | 4db3647e | Iustin Pop | of the device exported by the hypervisor. For example, the Xen HVM |
88 | 4db3647e | Iustin Pop | hypervisor can export disks as either ``paravirtual`` or |
89 | 4db3647e | Iustin Pop | ``ioemu``. |
90 | 4db3647e | Iustin Pop | |
91 | 4db3647e | Iustin Pop | DISK_%N_BACKEND_TYPE |
92 | 4db3647e | Iustin Pop | How files are visible on the node side. This can be either |
93 | 4db3647e | Iustin Pop | ``block`` (when using block devices) or ``file:type``, where |
94 | 7bc2c097 | Michele Tartara | ``type`` is either ``loop``, ``blktap`` or ``blktap2``, depending on how the |
95 | 7bc2c097 | Michele Tartara | hypervisor will be configured. Note that not all backend types apply to all |
96 | 7bc2c097 | Michele Tartara | hypervisors. |
97 | 4db3647e | Iustin Pop | |
98 | 4db3647e | Iustin Pop | NIC_COUNT |
99 | 4db3647e | Iustin Pop | Similar to the ``DISK_COUNT``, this represents the number of NICs |
100 | 4db3647e | Iustin Pop | of the instance. |
101 | 4db3647e | Iustin Pop | |
102 | 4db3647e | Iustin Pop | NIC_%N_MAC |
103 | 4db3647e | Iustin Pop | The MAC address associated with this interface. |
104 | 4db3647e | Iustin Pop | |
105 | 8a348b15 | Christos Stavrakakis | NIC_%N_UUID |
106 | 8a348b15 | Christos Stavrakakis | The uuid associated with the N-th NIC of the instance. |
107 | 8a348b15 | Christos Stavrakakis | |
108 | 8a348b15 | Christos Stavrakakis | NIC_%N_NAME |
109 | 8a348b15 | Christos Stavrakakis | (Optional) The name, if any, associated with the N-th NIC of the instance. |
110 | 8a348b15 | Christos Stavrakakis | |
111 | 4db3647e | Iustin Pop | NIC_%N_IP |
112 | 4db3647e | Iustin Pop | The IP address, if any, associated with the N-th NIC of the |
113 | 4db3647e | Iustin Pop | instance. |
114 | 4db3647e | Iustin Pop | |
115 | 4db3647e | Iustin Pop | NIC_%N_MODE |
116 | 57fb6fcb | Guido Trotter | The NIC mode, routed, bridged or openvswitch |
117 | 4db3647e | Iustin Pop | |
118 | 4db3647e | Iustin Pop | NIC_%N_BRIDGE |
119 | 4db3647e | Iustin Pop | The bridge to which this NIC will be attached. This variable is |
120 | 4db3647e | Iustin Pop | defined only when the NIC is in bridged mode. |
121 | 4db3647e | Iustin Pop | |
122 | 4db3647e | Iustin Pop | NIC_%N_LINK |
123 | 57fb6fcb | Guido Trotter | In bridged or openvswitch mode, this is the interface to which the |
124 | 57fb6fcb | Guido Trotter | NIC will be attached (same as ``NIC_%N_BRIDGE`` for bridged). In |
125 | 57fb6fcb | Guido Trotter | routed mode it is the routing table which will be used by the |
126 | 57fb6fcb | Guido Trotter | hypervisor to insert the appropriate routes. |
127 | 4db3647e | Iustin Pop | |
128 | 4db3647e | Iustin Pop | NIC_%N_FRONTEND_TYPE |
129 | 4db3647e | Iustin Pop | (Optional) If applicable, the type of the exported NIC to the |
130 | 4db3647e | Iustin Pop | instance, this can be one of: ``rtl8139``, ``ne2k_pci``, |
131 | 4db3647e | Iustin Pop | ``ne2k_isa``, ``paravirtual``. |
132 | 4db3647e | Iustin Pop | |
133 | 7e8f03e3 | Dimitris Aragiorgis | NIC_%d_NETWORK_NAME |
134 | d89168ff | Guido Trotter | (Optional) If a NIC network is specified, the network's name. |
135 | d89168ff | Guido Trotter | |
136 | d89168ff | Guido Trotter | NIC_%d_NETWORK_UUID |
137 | d89168ff | Guido Trotter | (Optional) If a NIC network is specified, the network's uuid. |
138 | d89168ff | Guido Trotter | |
139 | d89168ff | Guido Trotter | NIC_%d_NETWORK_FAMILY |
140 | d89168ff | Guido Trotter | (Optional) If a NIC network is specified, the network's family. |
141 | d89168ff | Guido Trotter | |
142 | d89168ff | Guido Trotter | NIC_%d_NETWORK_SUBNET |
143 | d89168ff | Guido Trotter | (Optional) If a NIC network is specified, the network's IPv4 subnet. |
144 | d89168ff | Guido Trotter | |
145 | d89168ff | Guido Trotter | NIC_%d_NETWORK_GATEWAY |
146 | d89168ff | Guido Trotter | (Optional) If a NIC network is specified, the network's IPv4 |
147 | d89168ff | Guido Trotter | gateway. |
148 | d89168ff | Guido Trotter | |
149 | d89168ff | Guido Trotter | NIC_%d_NETWORK_SUBNET6 |
150 | d89168ff | Guido Trotter | (Optional) If a NIC network is specified, the network's IPv6 subnet. |
151 | d89168ff | Guido Trotter | |
152 | d89168ff | Guido Trotter | NIC_%d_NETWORK_GATEWAY6 |
153 | d89168ff | Guido Trotter | (Optional) If a NIC network is specified, the network's IPv6 |
154 | d89168ff | Guido Trotter | gateway. |
155 | d89168ff | Guido Trotter | |
156 | d89168ff | Guido Trotter | NIC_%d_NETWORK_MAC_PREFIX |
157 | d89168ff | Guido Trotter | (Optional) If a NIC network is specified, the network's mac prefix. |
158 | d89168ff | Guido Trotter | |
159 | d89168ff | Guido Trotter | NIC_%d_NETWORK_TAGS |
160 | d89168ff | Guido Trotter | (Optional) If a NIC network is specified, the network's tags, space |
161 | d89168ff | Guido Trotter | separated. |
162 | d89168ff | Guido Trotter | |
163 | d1b1deb4 | Iustin Pop | OSP_*name* |
164 | d1b1deb4 | Iustin Pop | Each OS parameter (see below) will be exported in its own |
165 | dfba45b1 | Stephen Shirley | variable, prefixed with ``OSP_``, and upper-cased. For example, a |
166 | d1b1deb4 | Iustin Pop | ``dhcp`` parameter will be exported as ``OSP_DHCP``. |
167 | d1b1deb4 | Iustin Pop | |
168 | 4db3647e | Iustin Pop | DEBUG_LEVEL |
169 | 4db3647e | Iustin Pop | If non-zero, this should cause the OS script to generate verbose |
170 | 4db3647e | Iustin Pop | logs of its execution, for troubleshooting purposes. Currently |
171 | 4db3647e | Iustin Pop | only ``0`` and ``1`` are valid values. |
172 | 4db3647e | Iustin Pop | |
173 | 4db3647e | Iustin Pop | |
174 | d1b1deb4 | Iustin Pop | EXECUTABLE SCRIPTS |
175 | d1b1deb4 | Iustin Pop | ------------------ |
176 | d1b1deb4 | Iustin Pop | |
177 | d1b1deb4 | Iustin Pop | |
178 | 4db3647e | Iustin Pop | create |
179 | 4db3647e | Iustin Pop | ~~~~~~ |
180 | 4db3647e | Iustin Pop | |
181 | 4db3647e | Iustin Pop | The **create** command is used for creating a new instance from |
182 | 4db3647e | Iustin Pop | scratch. It has no additional environment variables bside the |
183 | 4db3647e | Iustin Pop | common ones. |
184 | 4db3647e | Iustin Pop | |
185 | 4db3647e | Iustin Pop | The ``INSTANCE_NAME`` variable denotes the name of the instance, |
186 | 4db3647e | Iustin Pop | which is guaranteed to resolve to an IP address. The create script |
187 | 4db3647e | Iustin Pop | should configure the instance according to this name. It can |
188 | 4db3647e | Iustin Pop | configure the IP statically or not, depending on the deployment |
189 | 4db3647e | Iustin Pop | environment. |
190 | 4db3647e | Iustin Pop | |
191 | 4db3647e | Iustin Pop | The ``INSTANCE_REINSTALL`` variable is set to ``1`` when this create |
192 | dfba45b1 | Stephen Shirley | request is reinstalling an existing instance, rather than creating |
193 | 37a8cb64 | Helga Velroyen | a new one. This can be used, for example, to preserve some data in the |
194 | 4db3647e | Iustin Pop | old instance in an OS-specific way. |
195 | 4db3647e | Iustin Pop | |
196 | 4db3647e | Iustin Pop | export |
197 | 4db3647e | Iustin Pop | ~~~~~~ |
198 | 4db3647e | Iustin Pop | |
199 | 4db3647e | Iustin Pop | This command is used in order to make a backup of a given disk of |
200 | 4db3647e | Iustin Pop | the instance. The command should write to stdout a dump of the |
201 | 4db3647e | Iustin Pop | given block device. The output of this program will be passed |
202 | 4db3647e | Iustin Pop | during restore to the **import** command. |
203 | 4db3647e | Iustin Pop | |
204 | 4db3647e | Iustin Pop | The specific disk to backup is denoted by two additional environment |
205 | 4db3647e | Iustin Pop | variables: ``EXPORT_INDEX`` which denotes the index in the instance |
206 | 4db3647e | Iustin Pop | disks structure (and could be used for example to skip the second disk |
207 | dfba45b1 | Stephen Shirley | if not needed for backup) and ``EXPORT_DEVICE`` which has the same value |
208 | dfba45b1 | Stephen Shirley | as ``DISK_N_PATH`` but is duplicated here for easier usage by shell |
209 | 4db3647e | Iustin Pop | scripts (rather than parse the ``DISK_...`` variables). |
210 | 4db3647e | Iustin Pop | |
211 | 4db3647e | Iustin Pop | To provide the user with an estimate on how long the export will take, |
212 | 4db3647e | Iustin Pop | a predicted size can be written to the file descriptor passed in the |
213 | 4db3647e | Iustin Pop | variable ``EXP_SIZE_FD``. The value is in bytes and must be terminated |
214 | 4db3647e | Iustin Pop | by a newline character (``\n``). Older versions of Ganeti don't |
215 | 4db3647e | Iustin Pop | support this feature, hence the variable should be checked before |
216 | 4db3647e | Iustin Pop | use. Example:: |
217 | 4db3647e | Iustin Pop | |
218 | 4db3647e | Iustin Pop | if test -n "$EXP_SIZE_FD"; then |
219 | 4db3647e | Iustin Pop | blockdev --getsize64 $blockdev >&$EXP_SIZE_FD |
220 | 4db3647e | Iustin Pop | fi |
221 | 4db3647e | Iustin Pop | |
222 | 4db3647e | Iustin Pop | import |
223 | 4db3647e | Iustin Pop | ~~~~~~ |
224 | 4db3647e | Iustin Pop | |
225 | 4db3647e | Iustin Pop | The **import** command is used for restoring an instance from a |
226 | 4db3647e | Iustin Pop | backup as done by **export**. The arguments are the similar to |
227 | 4db3647e | Iustin Pop | those passed to **export**, whose output will be provided on |
228 | 4db3647e | Iustin Pop | stdin. |
229 | 4db3647e | Iustin Pop | |
230 | dfba45b1 | Stephen Shirley | The difference in variables is that the current disk is denoted by |
231 | 4db3647e | Iustin Pop | ``IMPORT_DEVICE`` and ``IMPORT_INDEX`` (instead of ``EXPORT_...``). |
232 | 4db3647e | Iustin Pop | |
233 | 4db3647e | Iustin Pop | rename |
234 | 4db3647e | Iustin Pop | ~~~~~~ |
235 | 4db3647e | Iustin Pop | |
236 | 4db3647e | Iustin Pop | This command is used in order to perform a rename at the instance |
237 | 4db3647e | Iustin Pop | OS level, after the instance has been renamed in Ganeti. The |
238 | 4db3647e | Iustin Pop | command should do whatever steps are required to ensure that the |
239 | 4db3647e | Iustin Pop | instance is updated to use the new name, if the operating system |
240 | 4db3647e | Iustin Pop | supports it. |
241 | 4db3647e | Iustin Pop | |
242 | 4db3647e | Iustin Pop | Note that it is acceptable for the rename script to do nothing at |
243 | 4db3647e | Iustin Pop | all, however be warned that in this case, there will be a |
244 | 4db3647e | Iustin Pop | desynchronization between what gnt-instance list shows you and the |
245 | 4db3647e | Iustin Pop | actual hostname of the instance. |
246 | 4db3647e | Iustin Pop | |
247 | 4db3647e | Iustin Pop | The script will be passed one additional environment variable |
248 | 4db3647e | Iustin Pop | called ``OLD_INSTANCE_NAME`` which holds the old instance name. The |
249 | 4db3647e | Iustin Pop | ``INSTANCE_NAME`` variable holds the new instance name. |
250 | 4db3647e | Iustin Pop | |
251 | 4db3647e | Iustin Pop | A very simple rename script should at least change the hostname and |
252 | 4db3647e | Iustin Pop | IP address of the instance, leaving the administrator to update the |
253 | 4db3647e | Iustin Pop | other services. |
254 | 4db3647e | Iustin Pop | |
255 | d1b1deb4 | Iustin Pop | verify |
256 | d1b1deb4 | Iustin Pop | ~~~~~~ |
257 | d1b1deb4 | Iustin Pop | |
258 | d1b1deb4 | Iustin Pop | The *verify* script is used to verify consistency of the OS parameters |
259 | d1b1deb4 | Iustin Pop | (see below). The command should take one or more arguments denoting |
260 | d1b1deb4 | Iustin Pop | what checks should be performed, and return a proper exit code |
261 | d1b1deb4 | Iustin Pop | depending on whether the validation failed or succeeded. |
262 | d1b1deb4 | Iustin Pop | |
263 | d1b1deb4 | Iustin Pop | Currently (API version 20), only one parameter is supported: |
264 | d1b1deb4 | Iustin Pop | ``parameters``. This should validate the ``OSP_`` variables from the |
265 | dfba45b1 | Stephen Shirley | environment, and output diagnostic messages in case the validation |
266 | d1b1deb4 | Iustin Pop | fails. |
267 | d1b1deb4 | Iustin Pop | |
268 | d1b1deb4 | Iustin Pop | For the ``dhcp`` parameter given as example above, a verification |
269 | 29fbe62e | Iustin Pop | script could be: |
270 | 29fbe62e | Iustin Pop | |
271 | 3a817255 | Michael Hanselmann | .. code-block:: bash |
272 | d1b1deb4 | Iustin Pop | |
273 | d1b1deb4 | Iustin Pop | #!/bin/sh |
274 | d1b1deb4 | Iustin Pop | |
275 | d1b1deb4 | Iustin Pop | case $OSP_DHCP in |
276 | 56a1d5cc | Iustin Pop | ""|yes|no) |
277 | 56a1d5cc | Iustin Pop | ;; |
278 | 56a1d5cc | Iustin Pop | *) |
279 | 56a1d5cc | Iustin Pop | echo "Invalid value '$OSP_DHCP' for the dhcp parameter" 1>&2 |
280 | 56a1d5cc | Iustin Pop | exit 1; |
281 | 56a1d5cc | Iustin Pop | ;; |
282 | d1b1deb4 | Iustin Pop | esac |
283 | d1b1deb4 | Iustin Pop | |
284 | d1b1deb4 | Iustin Pop | exit 0 |
285 | d1b1deb4 | Iustin Pop | |
286 | d1b1deb4 | Iustin Pop | |
287 | d1b1deb4 | Iustin Pop | TEXT FILES |
288 | d1b1deb4 | Iustin Pop | ---------- |
289 | d1b1deb4 | Iustin Pop | |
290 | d1b1deb4 | Iustin Pop | |
291 | 4db3647e | Iustin Pop | ganeti_api_version |
292 | 4db3647e | Iustin Pop | ~~~~~~~~~~~~~~~~~~ |
293 | 4db3647e | Iustin Pop | |
294 | 4db3647e | Iustin Pop | The ganeti_api_version file is a plain text file containing the |
295 | 4db3647e | Iustin Pop | version(s) of the guest OS API that this OS definition complies |
296 | dfba45b1 | Stephen Shirley | with, one per line. The version documented by this man page is 20, |
297 | dfba45b1 | Stephen Shirley | so this file must contain the number 20 followed by a newline if |
298 | 4db3647e | Iustin Pop | only this version is supported. A script compatible with more than |
299 | 4db3647e | Iustin Pop | one Ganeti version should contain the most recent version first |
300 | dfba45b1 | Stephen Shirley | (i.e. 20), followed by the old version(s) (in this case 15 and/or |
301 | dfba45b1 | Stephen Shirley | 10). |
302 | 4db3647e | Iustin Pop | |
303 | 4db3647e | Iustin Pop | variants.list |
304 | 4db3647e | Iustin Pop | ~~~~~~~~~~~~~ |
305 | 4db3647e | Iustin Pop | |
306 | 35007011 | Iustin Pop | variants.list is a plain text file containing all the declared supported |
307 | 35007011 | Iustin Pop | variants for this OS, one per line. If this file is missing or empty, |
308 | 35007011 | Iustin Pop | then the OS won't be considered to support variants. |
309 | 4db3647e | Iustin Pop | |
310 | 5a7cb9d3 | Iustin Pop | Empty lines and lines starting with a hash (``#``) are ignored. |
311 | 5a7cb9d3 | Iustin Pop | |
312 | d1b1deb4 | Iustin Pop | parameters.list |
313 | d1b1deb4 | Iustin Pop | ~~~~~~~~~~~~~~~ |
314 | d1b1deb4 | Iustin Pop | |
315 | d1b1deb4 | Iustin Pop | This file declares the parameters supported by the OS, one parameter |
316 | d1b1deb4 | Iustin Pop | per line, with name and description (space and/or tab separated). For |
317 | d1b1deb4 | Iustin Pop | example:: |
318 | d1b1deb4 | Iustin Pop | |
319 | d1b1deb4 | Iustin Pop | dhcp Whether to enable (yes) or disable (no) dhcp |
320 | d1b1deb4 | Iustin Pop | root_size The size of the root partition, in GiB |
321 | d1b1deb4 | Iustin Pop | |
322 | d1b1deb4 | Iustin Pop | The parameters can then be used in instance add or modification, as |
323 | d1b1deb4 | Iustin Pop | follows:: |
324 | d1b1deb4 | Iustin Pop | |
325 | a53cd1f4 | Iustin Pop | # gnt-instance add -O dhcp=no,root_size=8 ... |
326 | d1b1deb4 | Iustin Pop | |
327 | d1b1deb4 | Iustin Pop | |
328 | 4db3647e | Iustin Pop | NOTES |
329 | 4db3647e | Iustin Pop | ----- |
330 | 4db3647e | Iustin Pop | |
331 | 4db3647e | Iustin Pop | Backwards compatibility |
332 | 4db3647e | Iustin Pop | ~~~~~~~~~~~~~~~~~~~~~~~ |
333 | 4db3647e | Iustin Pop | |
334 | dfba45b1 | Stephen Shirley | Ganeti 2.3 and up is compatible with API versions 10, 15 and 20. The OS |
335 | d1b1deb4 | Iustin Pop | parameters and related scripts (verify) are only supported in |
336 | d1b1deb4 | Iustin Pop | version 20. The variants functionality (variants.list, and OS_VARIANT |
337 | d1b1deb4 | Iustin Pop | env. var) are supported/present only in version 15 and up. |
338 | 4db3647e | Iustin Pop | |
339 | 4db3647e | Iustin Pop | Common behaviour |
340 | 4db3647e | Iustin Pop | ~~~~~~~~~~~~~~~~ |
341 | 4db3647e | Iustin Pop | |
342 | 4db3647e | Iustin Pop | All the scripts should display an usage message when called with a |
343 | 4db3647e | Iustin Pop | wrong number of arguments or when the first argument is ``-h`` or |
344 | 4db3647e | Iustin Pop | ``--help``. |
345 | 4db3647e | Iustin Pop | |
346 | 4db3647e | Iustin Pop | Upgrading from old versions |
347 | 4db3647e | Iustin Pop | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
348 | 4db3647e | Iustin Pop | |
349 | d1b1deb4 | Iustin Pop | Version 15 to 20 |
350 | d1b1deb4 | Iustin Pop | ^^^^^^^^^^^^^^^^ |
351 | d1b1deb4 | Iustin Pop | |
352 | d1b1deb4 | Iustin Pop | The ``parameters.list`` file and ``verify`` script have been |
353 | d1b1deb4 | Iustin Pop | added. For no parameters, an empty parameters file and an empty verify |
354 | d1b1deb4 | Iustin Pop | script which returns success can be used. |
355 | d1b1deb4 | Iustin Pop | |
356 | 4db3647e | Iustin Pop | Version 10 to 15 |
357 | 4db3647e | Iustin Pop | ^^^^^^^^^^^^^^^^ |
358 | 4db3647e | Iustin Pop | |
359 | 4db3647e | Iustin Pop | The ``variants.list`` file has been added, so OSes should support at |
360 | 4db3647e | Iustin Pop | least one variant, declaring it in that file and must be prepared to |
361 | 35007011 | Iustin Pop | parse the OS_VARIANT environment variable. OSes are free to support more |
362 | 35007011 | Iustin Pop | variants than just the declared ones. Note that this file is optional; |
363 | 35007011 | Iustin Pop | without it, the variants functionality is disabled. |
364 | 4db3647e | Iustin Pop | |
365 | 4db3647e | Iustin Pop | Version 5 to 10 |
366 | 4db3647e | Iustin Pop | ^^^^^^^^^^^^^^^ |
367 | 4db3647e | Iustin Pop | |
368 | 4db3647e | Iustin Pop | The method for passing data has changed from command line options |
369 | 4db3647e | Iustin Pop | to environment variables, so scripts should be modified to use |
370 | 4db3647e | Iustin Pop | these. For an example of how this can be done in a way compatible |
371 | 4db3647e | Iustin Pop | with both versions, feel free to look at the debootstrap instance's |
372 | 4db3647e | Iustin Pop | common.sh auxiliary script. |
373 | 4db3647e | Iustin Pop | |
374 | 4db3647e | Iustin Pop | Also, instances can have now a variable number of disks, not only |
375 | 4db3647e | Iustin Pop | two, and a variable number of NICs (instead of fixed one), so the |
376 | 4db3647e | Iustin Pop | scripts should deal with this. The biggest change is in the |
377 | 4db3647e | Iustin Pop | import/export, which are called once per disk, instead of once per |
378 | 4db3647e | Iustin Pop | instance. |
379 | 4db3647e | Iustin Pop | |
380 | 4db3647e | Iustin Pop | Version 4 to 5 |
381 | 4db3647e | Iustin Pop | ^^^^^^^^^^^^^^ |
382 | 4db3647e | Iustin Pop | |
383 | 4db3647e | Iustin Pop | The rename script has been added. If you don't want to do any |
384 | 4db3647e | Iustin Pop | changes on the instances after a rename, you can migrate the OS |
385 | 29fbe62e | Iustin Pop | definition to version 5 by creating the rename script simply as: |
386 | 29fbe62e | Iustin Pop | |
387 | 3a817255 | Michael Hanselmann | .. code-block:: bash |
388 | 4db3647e | Iustin Pop | |
389 | 4db3647e | Iustin Pop | #!/bin/sh |
390 | 4db3647e | Iustin Pop | |
391 | 4db3647e | Iustin Pop | exit 0 |
392 | 4db3647e | Iustin Pop | |
393 | 4db3647e | Iustin Pop | Note that the script must be executable. |
394 | 9ff4f2c0 | Michael Hanselmann | |
395 | 9ff4f2c0 | Michael Hanselmann | .. vim: set textwidth=72 : |
396 | 9ff4f2c0 | Michael Hanselmann | .. Local Variables: |
397 | 9ff4f2c0 | Michael Hanselmann | .. mode: rst |
398 | 9ff4f2c0 | Michael Hanselmann | .. fill-column: 72 |
399 | 9ff4f2c0 | Michael Hanselmann | .. End: |