1 ==============================================================
2 Ganeti Instance Import/Export using Open Virtualization Format
3 ==============================================================
8 Open Virtualization Format is an open standard for packaging
9 information regarding virtual machines. It is used, among other, by
10 VMWare, VirtualBox and XenServer. OVF allows users to migrate between
11 virtualization software without the need of reconfiguring hardware,
12 network or operating system.
14 Currently, exporting instance in Ganeti results with a configuration
15 file that is readable only for Ganeti. It disallows the users to
16 change the platform they use without loosing all the machine's
17 configuration. Import function in Ganeti is also currently limited to
18 the previously prepared instances.
20 Implementation of OVF support allows users to migrate to Ganeti from
21 other platforms, thus potentially increasing the usage. It also
22 enables virtual machine end-users to create their own machines
23 (e.g. in VirtualBox or SUSE Studio) and then add them to Ganeti
24 cluster, thus providing better personalization.
29 Open Virtualization Format description
30 --------------------------------------
32 According to the DMTF document introducing the standard: "The Open
33 Virtualization Format (OVF) Specification describes an open, secure,
34 portable, efficient and extensible format for the packaging and
35 distribution of software to be run in virtual machines." OVF supports
36 both single and multiple- configurations of VMs in one package, is
37 host- and virtualization platform-independent and optimized for
38 distribution (e.g. by allowing usage of public key infrastructure and
39 providing tools for management of basic software licensing).
41 There are no limitations regarding hard drive images used, as long as
42 the description is provided. Any hardware described in a proper
43 i.e. CIM - Common Information Model) format is accepted, although
44 there is no guarantee that every virtualization software will support
45 all types of hardware.
47 OVF package should contain one file with ``.ovf`` extension, which is an
48 XML file specifying the following (per virtual machine):
52 - list of virtual hardware
53 - operating system, if any
55 Each of the elements in ``.ovf`` file may, if desired, contain a
56 human-readable description to every piece of information given.
58 Additionally, the package may have some disk image files and other
59 additional resources (e.g. ISO images).
61 Supported disk formats
62 ----------------------
64 Although OVF is claimed to support 'any disk format', what we are
65 interested in is which of the formats are supported by VM managers
66 that currently use OVF.
68 - VMWare: ``.vmdk`` (which comes in at least 3 different flavours:
69 ``sparse``, ``compressed`` and ``streamOptimized``)
70 - VirtualBox: ``.vdi`` (VirtualBox's format), ``.vmdk``, ``.vhd``
71 (Microsoft and XenServer); export disk format is always ``.vmdk``
72 - XenServer: ``.vmdk``, ``.vhd``; export disk format is always
74 - Red Hat Enterprise Virtualization: ``.raw`` (raw disk format),
75 ``.cow`` (qemu's ``QCOW2``)
76 - other: AbiCloud, OpenNode Cloud, SUSE Studio, Morfeo Claudia,
79 In our implementation of the OVF we plan to allow a choice between
80 raw, cow and vmdk disk formats for both import and export. The
81 justification is the following:
83 - Raw format is supported as it is the main format of disk images used
84 in Ganeti, thus it is effortless to provide support for this format
85 - Cow is used in Qemu, [TODO: ..why do we support it, again? That is,
87 - Vmdk is most commonly supported in virtualization software, it also
88 has the advantage of producing relatively small disk images, which
89 is extremely important advantage when moving instances.
91 The conversion between RAW and the other formats will be done using
92 qemu-img, which transforms, among other, raw disk images to monolithic
95 Import and export - the closer look
96 ===================================
98 This section contains an overview of how different parts of
99 Ganeti's export info are included in ``.ovf`` configuration file.
100 It also explains how import is designed to work with incomplete
103 Ganeti's backup format vs OVF
104 -----------------------------
107 The basic structure of Ganeti ``.ovf`` file is the following::
110 <References></References>
111 <DiskSection></DiskSection>
112 <NetworkSection></NetworkSection>
115 <OperatingSystemSection></OperatingSystemSection>
116 <VirtualHardwareSection><VirtualHardwareSection>
121 <gnt:Tags></gnt:Tags>
122 <gnt:OSParameters></gnt:OSParameters>
124 <gnt:HypervisorParameters>
125 </gnt:HypervisorParameters>
131 Tags with ``gnt:`` prefix are Ganeti-specific and are not a part of
136 Whereas Ganeti's export info is of the following form, ``=>`` showing
137 where will the data be in OVF format::
140 disk0_dump = filename => References
141 disk0_ivname = name => ignored
142 disk0_size = size_in_mb => DiskSection
143 disk_count = number => ignored
144 disk_template = disk_type => References
145 hypervisor = hyp-name => gnt:HypervisorSection
146 name = inst-name => Name in VirtualSystem
147 nic0_ip = ip => Item in VirtualHardwareSection
148 nic0_link = link => Item in VirtualHardwareSection
149 nic0_mac = mac => Item in VirtualHardwareSection
150 nic0_mode = mode => Network in NetworkSection
151 nic_count = number => ignored
155 auto_balanced => gnt:AutoBalance
156 memory = mem_in_mb => Item in VirtualHardwareSection
157 vcpus = number => Item in VirtualHardwareSection
160 compression => DiskSection
161 os => OperatingSystemSection
164 version => gnt:VersionId
166 [os] => gnt:OSParameters
168 [hypervisor] => gnt:HypervisorParameters
170 In case of multiple networks/disks used by an instance, they will
171 all be saved in appropriate sections as specified above for the first
174 Import from other virtualization software
175 -----------------------------------------
176 In case of importing to Ganeti OVF package generated in other software,
177 e.g. VirtualBox, some fields required for Ganeti to properly handle
178 import may be missing. Most often it will happen that such OVF package
179 will lack the ``gnt:GanetiSection``.
181 If this happens, the tool will simply ask for all the necessary
182 information or otherwise you can specify all the missing parameters in
183 the command line. For the latter, please refer to [TODO: reference to
184 command line options]
186 Export to other virtualization software
187 ---------------------------------------
188 When exporting to other virtualization software, you may notice that
189 there is a section ``gnt:GanetiSection``, containing Ganeti-specific
190 information. This may on **rare** cases cause trouble in importing your
191 instance. If that is the case please do one of the two:
193 1. Export from Ganeti to OVF with ``--external`` option - this will
194 cause to skip the non-standard information.
196 2. Manually remove the gnt:GanetiSection from the ``.ovf`` file. You
197 will also have to recompute sha1 sum (``sha1sum`` command) and update
198 your ``.mf`` file with new value.
201 Manual change option is only recommended when you have exported your
202 instance with ``-format`` option other that ``raw`` or selected
203 ``--compress``. It saves you the time of converting or compressing
209 The limitations regarding import of the OVF instances generated
210 outside Ganeti will be (in general) the same, as limitations for
211 Ganeti itself. The desired behavior in case of encountering
212 unsupported element will be to ignore this element's tag and inform
213 the user on console output, if possible - without interruption of the
219 There are no limitations regarding support for multiple files in
220 package or packing the OVF package into one OVA (Open Virtual
221 Appliance) file. As for certificates and licenses in the package,
222 their support will be under discussion after completion of the basic
223 features implementation.
225 Multiple Virtual Systems
226 ------------------------
228 At first only singular instances (i.e. VirtualSystem, not
229 VirtualSystemCollection) will be supported. In the future multi-tiered
230 appliances containing whole nodes (or even clusters) are considered an
236 As mentioned, Ganeti will allow exporting only ``raw``, ``cow`` and
237 ``vmdk`` formats. As for import, we will support all that
238 ``qemu-img`` can convert to raw format. At this point this means
239 ``raw``, ``cow``, ``qcow``, ``qcow2``, ``vmdk`` and ``cloop``. We do
240 not plan for now to support ``vdi`` or ``vhd``.
242 We plan to support compression both for import and export - in tar.gz
243 format. There is also a possibility to provide virtual disk in chunks
246 When no ``ovf:format`` tag is provided during import, we assume that
247 the disk is to be created on import and proceed accordingly.
252 There are no known limitations regarding network support.
268 Implementation details
269 ======================
273 .. vim: set textwidth=72 :