root / man / ganeti-os-interface.sgml @ b44bd844
History | View | Annotate | Download (15.8 kB)
1 | a8083063 | Iustin Pop | <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [ |
---|---|---|---|
2 | a8083063 | Iustin Pop | |
3 | a8083063 | Iustin Pop | <!-- Fill in your name for FIRSTNAME and SURNAME. --> |
4 | a8083063 | Iustin Pop | <!-- Please adjust the date whenever revising the manpage. --> |
5 | e0897adf | Michael Hanselmann | <!ENTITY dhdate "<date>June 08, 2010</date>"> |
6 | a8083063 | Iustin Pop | <!-- SECTION should be 1-8, maybe w/ subsection other parameters are |
7 | a8083063 | Iustin Pop | allowed: see man(7), man(1). --> |
8 | a8083063 | Iustin Pop | <!ENTITY dhsection "<manvolnum>7</manvolnum>"> |
9 | a8083063 | Iustin Pop | <!ENTITY dhucpackage "<refentrytitle>ganeti-os-interface</refentrytitle>"> |
10 | a8083063 | Iustin Pop | <!ENTITY dhpackage "ganeti"> |
11 | a8083063 | Iustin Pop | |
12 | a8083063 | Iustin Pop | <!ENTITY debian "<productname>Debian</productname>"> |
13 | a8083063 | Iustin Pop | <!ENTITY gnu "<acronym>GNU</acronym>"> |
14 | a8083063 | Iustin Pop | <!ENTITY gpl "&gnu; <acronym>GPL</acronym>"> |
15 | a8083063 | Iustin Pop | <!ENTITY footer SYSTEM "footer.sgml"> |
16 | a8083063 | Iustin Pop | ]> |
17 | a8083063 | Iustin Pop | |
18 | a8083063 | Iustin Pop | <refentry> |
19 | a8083063 | Iustin Pop | <refentryinfo> |
20 | a8083063 | Iustin Pop | <copyright> |
21 | a8083063 | Iustin Pop | <year>2006</year> |
22 | a8083063 | Iustin Pop | <year>2007</year> |
23 | 216842d7 | Iustin Pop | <year>2008</year> |
24 | 216842d7 | Iustin Pop | <year>2009</year> |
25 | 7a8da378 | Michael Hanselmann | <year>2010</year> |
26 | a8083063 | Iustin Pop | <holder>Google Inc.</holder> |
27 | a8083063 | Iustin Pop | </copyright> |
28 | a8083063 | Iustin Pop | &dhdate; |
29 | a8083063 | Iustin Pop | </refentryinfo> |
30 | a8083063 | Iustin Pop | <refmeta> |
31 | a8083063 | Iustin Pop | &dhucpackage; |
32 | a8083063 | Iustin Pop | |
33 | a8083063 | Iustin Pop | &dhsection; |
34 | e0897adf | Michael Hanselmann | <refmiscinfo>Ganeti 2.2</refmiscinfo> |
35 | a8083063 | Iustin Pop | </refmeta> |
36 | a8083063 | Iustin Pop | <refnamediv> |
37 | 037da795 | Guido Trotter | <refname>ganeti-os-interface</refname> |
38 | a8083063 | Iustin Pop | |
39 | e0897adf | Michael Hanselmann | <refpurpose>Specifications for guest OS types</refpurpose> |
40 | a8083063 | Iustin Pop | </refnamediv> |
41 | a8083063 | Iustin Pop | |
42 | a8083063 | Iustin Pop | <refsect1> |
43 | a8083063 | Iustin Pop | <title>DESCRIPTION</title> |
44 | a8083063 | Iustin Pop | |
45 | a8083063 | Iustin Pop | <para> |
46 | a8083063 | Iustin Pop | The method of supporting guest operating systems in Ganeti is to |
47 | a8083063 | Iustin Pop | have, for each guest OS type, a directory containing a number of |
48 | a8083063 | Iustin Pop | required files. |
49 | a8083063 | Iustin Pop | </para> |
50 | a8083063 | Iustin Pop | |
51 | a8083063 | Iustin Pop | |
52 | a8083063 | Iustin Pop | </refsect1> |
53 | a8083063 | Iustin Pop | <refsect1> |
54 | a8083063 | Iustin Pop | <title>REFERENCE</title> |
55 | a8083063 | Iustin Pop | |
56 | a8083063 | Iustin Pop | <para> |
57 | bdfec6fd | Guido Trotter | There are six required files: <filename>create</filename>, |
58 | 386b57af | Iustin Pop | <filename>import</filename>, <filename>export</filename>, |
59 | bdfec6fd | Guido Trotter | <filename>rename</filename> (executables), |
60 | bdfec6fd | Guido Trotter | <filename>ganeti_api_version</filename> and |
61 | bdfec6fd | Guido Trotter | <filename>variants.list</filename> (text file). |
62 | a8083063 | Iustin Pop | </para> |
63 | a8083063 | Iustin Pop | |
64 | a8083063 | Iustin Pop | <refsect2> |
65 | 216842d7 | Iustin Pop | <title>Common environment</title> |
66 | 216842d7 | Iustin Pop | <para> |
67 | 216842d7 | Iustin Pop | All commands will get their input via environment variables. A |
68 | 216842d7 | Iustin Pop | common set of variables will be exported for all commands, and |
69 | 216842d7 | Iustin Pop | some of them might have extra ones. Note that all counts are |
70 | 216842d7 | Iustin Pop | zero-based. |
71 | 216842d7 | Iustin Pop | </para> |
72 | 216842d7 | Iustin Pop | <variablelist> |
73 | 216842d7 | Iustin Pop | <varlistentry> |
74 | 216842d7 | Iustin Pop | <term>OS_API_VERSION</term> |
75 | 216842d7 | Iustin Pop | <listitem> |
76 | e0897adf | Michael Hanselmann | <simpara>The OS API version that the rest of the |
77 | 216842d7 | Iustin Pop | environment conforms to.</simpara> |
78 | 216842d7 | Iustin Pop | </listitem> |
79 | 216842d7 | Iustin Pop | </varlistentry> |
80 | 216842d7 | Iustin Pop | <varlistentry> |
81 | 216842d7 | Iustin Pop | <term>INSTANCE_NAME</term> |
82 | 216842d7 | Iustin Pop | <listitem> |
83 | 216842d7 | Iustin Pop | <simpara>The instance name the script should operate |
84 | 216842d7 | Iustin Pop | on.</simpara> |
85 | 216842d7 | Iustin Pop | </listitem> |
86 | 216842d7 | Iustin Pop | </varlistentry> |
87 | 216842d7 | Iustin Pop | <varlistentry> |
88 | 216842d7 | Iustin Pop | <term>INSTANCE_OS</term> |
89 | efaa9b06 | Iustin Pop | <term>OS_NAME</term> |
90 | 216842d7 | Iustin Pop | <listitem> |
91 | efaa9b06 | Iustin Pop | <simpara>Both names point to the name of the instance's OS |
92 | efaa9b06 | Iustin Pop | as Ganeti knows it. This can simplify the OS scripts by |
93 | efaa9b06 | Iustin Pop | providing the same scripts under multiple names, and then |
94 | efaa9b06 | Iustin Pop | the scripts can use this name to alter their |
95 | efaa9b06 | Iustin Pop | behaviour.</simpara> <simpara>With OS API 15 changing the |
96 | efaa9b06 | Iustin Pop | script behavior based on this variable is deprecated: |
97 | efaa9b06 | Iustin Pop | OS_VARIANT should be used instead (see below).</simpara> |
98 | bdfec6fd | Guido Trotter | </listitem> |
99 | bdfec6fd | Guido Trotter | </varlistentry> |
100 | bdfec6fd | Guido Trotter | <varlistentry> |
101 | bdfec6fd | Guido Trotter | <term>OS_VARIANT</term> |
102 | bdfec6fd | Guido Trotter | <listitem> |
103 | bdfec6fd | Guido Trotter | <simpara>The variant of the OS which should be installed. Each OS |
104 | bdfec6fd | Guido Trotter | must support all variants listed under its |
105 | bdfec6fd | Guido Trotter | <filename>variants.list</filename> file, and may support more. |
106 | bdfec6fd | Guido Trotter | Any more supported variants should be properly documented in the |
107 | e0897adf | Michael Hanselmann | per-OS documentation.</simpara> |
108 | 216842d7 | Iustin Pop | </listitem> |
109 | 216842d7 | Iustin Pop | </varlistentry> |
110 | 216842d7 | Iustin Pop | <varlistentry> |
111 | 216842d7 | Iustin Pop | <term>HYPERVISOR</term> |
112 | 216842d7 | Iustin Pop | <listitem> |
113 | 216842d7 | Iustin Pop | <simpara>The hypervisor of this instance.</simpara> |
114 | 216842d7 | Iustin Pop | </listitem> |
115 | 216842d7 | Iustin Pop | </varlistentry> |
116 | 216842d7 | Iustin Pop | <varlistentry> |
117 | 216842d7 | Iustin Pop | <term>DISK_COUNT</term> |
118 | 216842d7 | Iustin Pop | <listitem> |
119 | 216842d7 | Iustin Pop | <simpara>The number of disks the instance has. The actual |
120 | 216842d7 | Iustin Pop | disk defitions are in a set of additional variables. The |
121 | 216842d7 | Iustin Pop | instance's disk will be numbered from 0 to this value |
122 | 216842d7 | Iustin Pop | minus one.</simpara> |
123 | 216842d7 | Iustin Pop | </listitem> |
124 | 216842d7 | Iustin Pop | </varlistentry> |
125 | 216842d7 | Iustin Pop | <varlistentry> |
126 | 216842d7 | Iustin Pop | <term>DISK_%N_PATH</term> |
127 | 216842d7 | Iustin Pop | <listitem> |
128 | 216842d7 | Iustin Pop | <simpara>The path to the storage for disk N of the |
129 | 216842d7 | Iustin Pop | instance. This might be either a block device or a regular |
130 | 216842d7 | Iustin Pop | file, in which case the OS scripts should use |
131 | 216842d7 | Iustin Pop | <emphasis>losetup</emphasis> (if they need to mount |
132 | 216842d7 | Iustin Pop | it). E.g. the first disk of the instance might be exported |
133 | 216842d7 | Iustin Pop | as <envar>DISK_0_PATH=/dev/drbd0</envar>.</simpara> |
134 | 216842d7 | Iustin Pop | </listitem> |
135 | 216842d7 | Iustin Pop | </varlistentry> |
136 | 216842d7 | Iustin Pop | <varlistentry> |
137 | 216842d7 | Iustin Pop | <term>DISK_%N_ACCESS</term> |
138 | 216842d7 | Iustin Pop | <listitem> |
139 | 216842d7 | Iustin Pop | <simpara>This is how the hypervisor will export the |
140 | 216842d7 | Iustin Pop | instance disks: either read-write (<emphasis>rw</emphasis>) or |
141 | 216842d7 | Iustin Pop | read-only (<emphasis>ro</emphasis>).</simpara> |
142 | 216842d7 | Iustin Pop | </listitem> |
143 | 216842d7 | Iustin Pop | </varlistentry> |
144 | 216842d7 | Iustin Pop | <varlistentry> |
145 | 216842d7 | Iustin Pop | <term>DISK_%N_FRONTEND_TYPE</term> |
146 | 216842d7 | Iustin Pop | <listitem> |
147 | 216842d7 | Iustin Pop | <simpara>(Optional) If applicable to the current |
148 | 216842d7 | Iustin Pop | hypervisor type: the type of the device exported by the |
149 | 216842d7 | Iustin Pop | hypervisor. For example, the Xen HVM hypervisor can export |
150 | 216842d7 | Iustin Pop | disks as either <emphasis>paravirtual</emphasis> or |
151 | 216842d7 | Iustin Pop | <emphasis>ioemu</emphasis>.</simpara> |
152 | 216842d7 | Iustin Pop | </listitem> |
153 | 216842d7 | Iustin Pop | </varlistentry> |
154 | 216842d7 | Iustin Pop | <varlistentry> |
155 | 216842d7 | Iustin Pop | <term>DISK_%N_BACKEND_TYPE</term> |
156 | 216842d7 | Iustin Pop | <listitem> |
157 | 216842d7 | Iustin Pop | <simpara>How files are visible on the node side. This can |
158 | 216842d7 | Iustin Pop | be either <emphasis>block</emphasis> (when using block |
159 | 216842d7 | Iustin Pop | devices) or <emphasis>file:type</emphasis>, where |
160 | 216842d7 | Iustin Pop | <emphasis>type</emphasis> is either |
161 | 216842d7 | Iustin Pop | <emphasis>loop</emphasis> <emphasis>blktap</emphasis> |
162 | 216842d7 | Iustin Pop | depending on how the hypervisor will be configured. Note |
163 | 216842d7 | Iustin Pop | that not all backend types apply to all |
164 | 216842d7 | Iustin Pop | hypervisors.</simpara> |
165 | 216842d7 | Iustin Pop | </listitem> |
166 | 216842d7 | Iustin Pop | </varlistentry> |
167 | 216842d7 | Iustin Pop | <varlistentry> |
168 | 216842d7 | Iustin Pop | <term>NIC_COUNT</term> |
169 | 216842d7 | Iustin Pop | <listitem> |
170 | 216842d7 | Iustin Pop | <simpara>Similar to the <envar>DISK_COUNT</envar>, this |
171 | 216842d7 | Iustin Pop | represents the number of NICs of the instance.</simpara> |
172 | 216842d7 | Iustin Pop | </listitem> |
173 | 216842d7 | Iustin Pop | </varlistentry> |
174 | 216842d7 | Iustin Pop | <varlistentry> |
175 | 216842d7 | Iustin Pop | <term>NIC_%N_MAC</term> |
176 | 216842d7 | Iustin Pop | <listitem> |
177 | 216842d7 | Iustin Pop | <simpara>The MAC address associated with this |
178 | 216842d7 | Iustin Pop | interface.</simpara> |
179 | 216842d7 | Iustin Pop | </listitem> |
180 | 216842d7 | Iustin Pop | </varlistentry> |
181 | 216842d7 | Iustin Pop | <varlistentry> |
182 | 216842d7 | Iustin Pop | <term>NIC_%N_IP</term> |
183 | 216842d7 | Iustin Pop | <listitem> |
184 | 216842d7 | Iustin Pop | <simpara>The IP address, if any, associated with the N-th |
185 | 216842d7 | Iustin Pop | NIC of the instance.</simpara> |
186 | 216842d7 | Iustin Pop | </listitem> |
187 | 216842d7 | Iustin Pop | </varlistentry> |
188 | 216842d7 | Iustin Pop | <varlistentry> |
189 | 216842d7 | Iustin Pop | <term>NIC_%N_BRIDGE</term> |
190 | 216842d7 | Iustin Pop | <listitem> |
191 | 216842d7 | Iustin Pop | <simpara>The bridge to which this NIC will be attached |
192 | 216842d7 | Iustin Pop | to.</simpara> |
193 | 216842d7 | Iustin Pop | </listitem> |
194 | 216842d7 | Iustin Pop | </varlistentry> |
195 | 216842d7 | Iustin Pop | <varlistentry> |
196 | 216842d7 | Iustin Pop | <term>NIC_%N_FRONTEND_TYPE</term> |
197 | 216842d7 | Iustin Pop | <listitem> |
198 | 216842d7 | Iustin Pop | <para>(Optional) If applicable, the type of the exported |
199 | 216842d7 | Iustin Pop | NIC to the instance, this can be one of of: <simplelist |
200 | 216842d7 | Iustin Pop | type="inline"> <member>rtl8139</member> |
201 | 216842d7 | Iustin Pop | <member>ne2k_pci</member> <member>ne2k_isa</member> |
202 | 216842d7 | Iustin Pop | <member>paravirtual</member> </simplelist>. |
203 | 216842d7 | Iustin Pop | </para> |
204 | 216842d7 | Iustin Pop | </listitem> |
205 | 216842d7 | Iustin Pop | </varlistentry> |
206 | 216842d7 | Iustin Pop | <varlistentry> |
207 | 216842d7 | Iustin Pop | <term>DEBUG_LEVEL</term> |
208 | 216842d7 | Iustin Pop | <listitem> |
209 | 216842d7 | Iustin Pop | <simpara>If non-zero, this should cause the OS script to |
210 | 216842d7 | Iustin Pop | generate verbose logs of its execution, for |
211 | 216842d7 | Iustin Pop | troubleshooting purposes. Currently only |
212 | 216842d7 | Iustin Pop | <emphasis>0</emphasis> and <emphasis>1</emphasis> are |
213 | 216842d7 | Iustin Pop | valid values.</simpara> |
214 | 216842d7 | Iustin Pop | </listitem> |
215 | 216842d7 | Iustin Pop | </varlistentry> |
216 | 216842d7 | Iustin Pop | </variablelist> |
217 | 216842d7 | Iustin Pop | </refsect2> |
218 | 216842d7 | Iustin Pop | |
219 | 216842d7 | Iustin Pop | <refsect2> |
220 | a8083063 | Iustin Pop | <title>create</title> |
221 | a8083063 | Iustin Pop | |
222 | a8083063 | Iustin Pop | <para>The <command>create</command> command is used for creating |
223 | 216842d7 | Iustin Pop | a new instance from scratch. It has no additional environment |
224 | 216842d7 | Iustin Pop | variables bside the common ones.</para> |
225 | a8083063 | Iustin Pop | |
226 | 216842d7 | Iustin Pop | <para>The <envar>INSTANCE_NAME</envar> variable denotes the name |
227 | a8083063 | Iustin Pop | of the instance, which is guaranteed to resolve to an IP |
228 | a8083063 | Iustin Pop | address. The create script should configure the instance |
229 | a8083063 | Iustin Pop | according to this name. It can configure the IP statically or |
230 | a8083063 | Iustin Pop | not, depending on the deployment environment.</para> |
231 | a8083063 | Iustin Pop | |
232 | e557bae9 | Guido Trotter | <para>The <envar>INSTANCE_REINSTALL</envar> variable is set to '1' when |
233 | e557bae9 | Guido Trotter | this create request is reinstalling and existing instance, rather than |
234 | e557bae9 | Guido Trotter | creating one anew. This can be used, for example, to preserve some |
235 | e0897adf | Michael Hanselmann | data in the old instance in an OS-specific way.</para> |
236 | e557bae9 | Guido Trotter | |
237 | a8083063 | Iustin Pop | </refsect2> |
238 | a8083063 | Iustin Pop | |
239 | a8083063 | Iustin Pop | <refsect2> |
240 | 216842d7 | Iustin Pop | <title>export</title> |
241 | a8083063 | Iustin Pop | |
242 | a8083063 | Iustin Pop | <para> |
243 | 216842d7 | Iustin Pop | This command is used in order to make a backup of a given disk |
244 | 216842d7 | Iustin Pop | of the instance. The command should write to stdout a dump of |
245 | 216842d7 | Iustin Pop | the given block device. The output of this program will be |
246 | 216842d7 | Iustin Pop | passed during restore to the <command>import</command> |
247 | 216842d7 | Iustin Pop | command. |
248 | 216842d7 | Iustin Pop | </para> |
249 | 216842d7 | Iustin Pop | |
250 | 216842d7 | Iustin Pop | <para> |
251 | 216842d7 | Iustin Pop | The specific disk to backup is denoted by two additional |
252 | 216842d7 | Iustin Pop | environment variables: <envar>EXPORT_INDEX</envar> which |
253 | 216842d7 | Iustin Pop | denotes the index in the instance disks structure (and could |
254 | 216842d7 | Iustin Pop | be used for example to skip the second disk if not needed for |
255 | 216842d7 | Iustin Pop | backup) and <envar>EXPORT_PATH</envar> which has the same |
256 | 216842d7 | Iustin Pop | value as <emphasis>DISK_N_PATH</emphasis> but is duplicate |
257 | 216842d7 | Iustin Pop | here for easier usage by shell scripts (rather than parse the |
258 | 216842d7 | Iustin Pop | DISK_... variables). |
259 | a8083063 | Iustin Pop | </para> |
260 | a8083063 | Iustin Pop | |
261 | f9323011 | Michael Hanselmann | <para> |
262 | f9323011 | Michael Hanselmann | To provide the user with an estimate on how long the export will take, |
263 | f9323011 | Michael Hanselmann | a predicted size can be written to the file descriptor passed in the |
264 | f9323011 | Michael Hanselmann | variable <envar>EXP_SIZE_FD</envar>. The value is in bytes and must be |
265 | f9323011 | Michael Hanselmann | terminated by a newline character (\n). Older versions of Ganeti don't |
266 | f9323011 | Michael Hanselmann | support this feature, hence the variable should be checked before use. |
267 | f9323011 | Michael Hanselmann | Example: <screen> |
268 | f9323011 | Michael Hanselmann | if test -n "$EXP_SIZE_FD"; then |
269 | f9323011 | Michael Hanselmann | blockdev --getsize64 $blockdev >&$EXP_SIZE_FD |
270 | f9323011 | Michael Hanselmann | fi |
271 | f9323011 | Michael Hanselmann | </screen> |
272 | f9323011 | Michael Hanselmann | </para> |
273 | f9323011 | Michael Hanselmann | |
274 | a8083063 | Iustin Pop | </refsect2> |
275 | a8083063 | Iustin Pop | |
276 | a8083063 | Iustin Pop | <refsect2> |
277 | 216842d7 | Iustin Pop | <title>import</title> |
278 | a8083063 | Iustin Pop | |
279 | a8083063 | Iustin Pop | <para> |
280 | 216842d7 | Iustin Pop | The <command>import</command> command is used for restoring an |
281 | 216842d7 | Iustin Pop | instance from a backup as done by |
282 | 216842d7 | Iustin Pop | <command>export</command>. The arguments are the similar to |
283 | 216842d7 | Iustin Pop | those passed to <command>export</command>, whose output will |
284 | 216842d7 | Iustin Pop | be provided on <acronym>stdin</acronym>. |
285 | a8083063 | Iustin Pop | </para> |
286 | a8083063 | Iustin Pop | |
287 | a8083063 | Iustin Pop | <para> |
288 | 216842d7 | Iustin Pop | The difference in variables is that the current disk is called |
289 | 7a8da378 | Michael Hanselmann | by <envar>IMPORT_DEVICE</envar> and <envar>IMPORT_INDEX</envar> |
290 | 216842d7 | Iustin Pop | (instead of <emphasis>EXPORT_</emphasis>). |
291 | a8083063 | Iustin Pop | </para> |
292 | a8083063 | Iustin Pop | |
293 | a8083063 | Iustin Pop | </refsect2> |
294 | a8083063 | Iustin Pop | |
295 | a8083063 | Iustin Pop | <refsect2> |
296 | 386b57af | Iustin Pop | <title>rename</title> |
297 | 386b57af | Iustin Pop | |
298 | 386b57af | Iustin Pop | <para> |
299 | 386b57af | Iustin Pop | This command is used in order to perform a rename at the |
300 | 386b57af | Iustin Pop | instance OS level, after the instance has been renamed in |
301 | 386b57af | Iustin Pop | Ganeti. The command should do whatever steps are required to |
302 | 386b57af | Iustin Pop | ensure that the instance is updated to use the new name, if |
303 | 386b57af | Iustin Pop | the operating system supports it. |
304 | 386b57af | Iustin Pop | </para> |
305 | 386b57af | Iustin Pop | |
306 | 386b57af | Iustin Pop | <para> |
307 | 386b57af | Iustin Pop | Note that it is acceptable for the rename script to do nothing |
308 | 386b57af | Iustin Pop | at all, however be warned that in this case, there will be a |
309 | 386b57af | Iustin Pop | desynchronization between what <computeroutput>gnt-instance |
310 | 386b57af | Iustin Pop | list</computeroutput> shows you and the actual hostname of the |
311 | 386b57af | Iustin Pop | instance. |
312 | 386b57af | Iustin Pop | </para> |
313 | 386b57af | Iustin Pop | |
314 | 216842d7 | Iustin Pop | <para>The script will be passed one additional environment |
315 | 216842d7 | Iustin Pop | variable called <envar>OLD_INSTANCE_NAME</envar> which holds the |
316 | 216842d7 | Iustin Pop | old instance name. The <envar>INSTANCE_NAME</envar> variable |
317 | 216842d7 | Iustin Pop | holds the new instance name.</para> |
318 | 216842d7 | Iustin Pop | |
319 | 386b57af | Iustin Pop | <para> |
320 | 386b57af | Iustin Pop | A very simple rename script should at least change the |
321 | 386b57af | Iustin Pop | hostname and IP address of the instance, leaving the |
322 | 386b57af | Iustin Pop | administrator to update the other services. |
323 | 386b57af | Iustin Pop | </para> |
324 | 386b57af | Iustin Pop | </refsect2> |
325 | 386b57af | Iustin Pop | |
326 | 386b57af | Iustin Pop | <refsect2> |
327 | a8083063 | Iustin Pop | <title>ganeti_api_version</title> |
328 | a8083063 | Iustin Pop | <para> |
329 | a8083063 | Iustin Pop | The <filename>ganeti_api_version</filename> file is a plain |
330 | e0897adf | Michael Hanselmann | text file containing the version(s) of the guest OS API that |
331 | 216842d7 | Iustin Pop | this OS definition complies with, one per line. The version |
332 | bdfec6fd | Guido Trotter | documented by this man page is 15, so this file must contain |
333 | bdfec6fd | Guido Trotter | the number 15 followed by a newline if only this version is |
334 | e0897adf | Michael Hanselmann | supported. A script compatible with more than one Ganeti version |
335 | bdfec6fd | Guido Trotter | should contain the most recent version first (i.e. 15), |
336 | bdfec6fd | Guido Trotter | followed by the old version(s) (in this case 10 and/or 5). |
337 | bdfec6fd | Guido Trotter | </para> |
338 | bdfec6fd | Guido Trotter | </refsect2> |
339 | bdfec6fd | Guido Trotter | |
340 | bdfec6fd | Guido Trotter | <refsect2> |
341 | bdfec6fd | Guido Trotter | <title>variants.list</title> |
342 | bdfec6fd | Guido Trotter | <para> |
343 | bdfec6fd | Guido Trotter | <filename>variants.list</filename> is a plain text file |
344 | bdfec6fd | Guido Trotter | containing all the declared supported variants for this |
345 | bdfec6fd | Guido Trotter | OS, one per line. At least one variant must be supported. |
346 | a8083063 | Iustin Pop | </para> |
347 | a8083063 | Iustin Pop | </refsect2> |
348 | a8083063 | Iustin Pop | |
349 | a8083063 | Iustin Pop | </refsect1> |
350 | a8083063 | Iustin Pop | |
351 | a8083063 | Iustin Pop | <refsect1> |
352 | a8083063 | Iustin Pop | <title>NOTES</title> |
353 | a8083063 | Iustin Pop | |
354 | a8083063 | Iustin Pop | <refsect2> |
355 | e0897adf | Michael Hanselmann | <title>Backwards compatibility</title> |
356 | bdfec6fd | Guido Trotter | |
357 | bdfec6fd | Guido Trotter | <para> |
358 | e0897adf | Michael Hanselmann | Ganeti 2.2 is compatible with both API version 10, and 15. |
359 | e0897adf | Michael Hanselmann | In API version 10 the <filename>variants.list</filename> |
360 | bdfec6fd | Guido Trotter | file is ignored and no OS_VARIANT environment variable is |
361 | bdfec6fd | Guido Trotter | passed. |
362 | bdfec6fd | Guido Trotter | </para> |
363 | bdfec6fd | Guido Trotter | </refsect2> |
364 | bdfec6fd | Guido Trotter | |
365 | bdfec6fd | Guido Trotter | <refsect2> |
366 | a8083063 | Iustin Pop | <title>Common behaviour</title> |
367 | a8083063 | Iustin Pop | |
368 | 216842d7 | Iustin Pop | <para>All the scripts should display an usage message when |
369 | 216842d7 | Iustin Pop | called with a wrong number of arguments or when the first |
370 | 216842d7 | Iustin Pop | argument is <option>-h</option> or |
371 | 216842d7 | Iustin Pop | <option>--help</option>.</para> |
372 | a8083063 | Iustin Pop | |
373 | a8083063 | Iustin Pop | </refsect2> |
374 | a8083063 | Iustin Pop | |
375 | 386b57af | Iustin Pop | <refsect2> |
376 | 386b57af | Iustin Pop | <title>Upgrading from old versions</title> |
377 | 386b57af | Iustin Pop | <refsect3> |
378 | bdfec6fd | Guido Trotter | |
379 | bdfec6fd | Guido Trotter | <title>Version 10 to 15</title> |
380 | bdfec6fd | Guido Trotter | |
381 | bdfec6fd | Guido Trotter | <para> |
382 | bdfec6fd | Guido Trotter | The <filename>variants.list</filename> file has been |
383 | bdfec6fd | Guido Trotter | added, so OSes should support at least one variant, |
384 | bdfec6fd | Guido Trotter | declaring it in that file and must be prepared to parse |
385 | bdfec6fd | Guido Trotter | the OS_VARIANT environment variable. OSes are free to |
386 | bdfec6fd | Guido Trotter | support more variants than just the declared ones. |
387 | bdfec6fd | Guido Trotter | </para> |
388 | bdfec6fd | Guido Trotter | |
389 | bdfec6fd | Guido Trotter | </refsect3> |
390 | bdfec6fd | Guido Trotter | |
391 | bdfec6fd | Guido Trotter | <refsect3> |
392 | bdfec6fd | Guido Trotter | |
393 | 216842d7 | Iustin Pop | <title>Version 5 to 10</title> |
394 | 216842d7 | Iustin Pop | |
395 | 216842d7 | Iustin Pop | <para> |
396 | e0897adf | Michael Hanselmann | The method for passing data has changed from command line |
397 | 216842d7 | Iustin Pop | options to environment variables, so scripts should be |
398 | 216842d7 | Iustin Pop | modified to use these. For an example of how this can be |
399 | 216842d7 | Iustin Pop | done in a way compatible with both versions, feel free to |
400 | 216842d7 | Iustin Pop | look at the debootstrap instance's |
401 | 216842d7 | Iustin Pop | <filename>common.sh</filename> auxiliary script. |
402 | 216842d7 | Iustin Pop | </para> |
403 | 216842d7 | Iustin Pop | |
404 | 216842d7 | Iustin Pop | <para> |
405 | 216842d7 | Iustin Pop | Also, instances can have now a variable number of disks, not |
406 | 216842d7 | Iustin Pop | only two, and a variable number of NICs (instead of fixed |
407 | 216842d7 | Iustin Pop | one), so the scripts should deal with this. The biggest |
408 | 216842d7 | Iustin Pop | change is in the import/export, which are called once per |
409 | 216842d7 | Iustin Pop | disk, instead of once per instance. |
410 | 216842d7 | Iustin Pop | </para> |
411 | 216842d7 | Iustin Pop | |
412 | 216842d7 | Iustin Pop | </refsect3> |
413 | 216842d7 | Iustin Pop | |
414 | 216842d7 | Iustin Pop | <refsect3> |
415 | 386b57af | Iustin Pop | <title>Version 4 to 5</title> |
416 | 386b57af | Iustin Pop | <para> |
417 | 386b57af | Iustin Pop | The <filename>rename</filename> script has been added. If |
418 | 386b57af | Iustin Pop | you don't want to do any changes on the instances after a |
419 | 386b57af | Iustin Pop | rename, you can migrate the OS definition to version 5 by |
420 | 386b57af | Iustin Pop | creating the <filename>rename</filename> script simply as: |
421 | 386b57af | Iustin Pop | <screen> |
422 | 386b57af | Iustin Pop | #!/bin/sh |
423 | 386b57af | Iustin Pop | |
424 | 386b57af | Iustin Pop | exit 0 |
425 | 386b57af | Iustin Pop | </screen> |
426 | 386b57af | Iustin Pop | </para> |
427 | 386b57af | Iustin Pop | |
428 | 386b57af | Iustin Pop | <para>Note that the script must be executable.</para> |
429 | 386b57af | Iustin Pop | </refsect3> |
430 | 386b57af | Iustin Pop | </refsect2> |
431 | 386b57af | Iustin Pop | |
432 | a8083063 | Iustin Pop | <!-- |
433 | a8083063 | Iustin Pop | <refsect2> |
434 | a8083063 | Iustin Pop | |
435 | a8083063 | Iustin Pop | <title>Export/import format</title> |
436 | a8083063 | Iustin Pop | |
437 | 386b57af | Iustin Pop | <para> |
438 | 386b57af | Iustin Pop | It is up to the export and import scripts to define the format |
439 | 386b57af | Iustin Pop | they use. It is only required for these two to work |
440 | 386b57af | Iustin Pop | together. It is not recommended that |
441 | 386b57af | Iustin Pop | </para> |
442 | a8083063 | Iustin Pop | |
443 | a8083063 | Iustin Pop | </refsect2> |
444 | a8083063 | Iustin Pop | --> |
445 | a8083063 | Iustin Pop | |
446 | a8083063 | Iustin Pop | </refsect1> |
447 | a8083063 | Iustin Pop | |
448 | a8083063 | Iustin Pop | &footer; |
449 | a8083063 | Iustin Pop | |
450 | a8083063 | Iustin Pop | </refentry> |
451 | a8083063 | Iustin Pop | |
452 | a8083063 | Iustin Pop | <!-- Keep this comment at the end of the file |
453 | a8083063 | Iustin Pop | Local variables: |
454 | a8083063 | Iustin Pop | mode: sgml |
455 | a8083063 | Iustin Pop | sgml-omittag:t |
456 | a8083063 | Iustin Pop | sgml-shorttag:t |
457 | a8083063 | Iustin Pop | sgml-minimize-attributes:nil |
458 | a8083063 | Iustin Pop | sgml-always-quote-attributes:t |
459 | a8083063 | Iustin Pop | sgml-indent-step:2 |
460 | a8083063 | Iustin Pop | sgml-indent-data:t |
461 | a8083063 | Iustin Pop | sgml-parent-document:nil |
462 | a8083063 | Iustin Pop | sgml-default-dtd-file:nil |
463 | a8083063 | Iustin Pop | sgml-exposed-tags:nil |
464 | a8083063 | Iustin Pop | sgml-local-catalogs:nil |
465 | a8083063 | Iustin Pop | sgml-local-ecat-files:nil |
466 | a8083063 | Iustin Pop | End: |
467 | a8083063 | Iustin Pop | --> |