Statistics
| Branch: | Tag: | Revision:

root / doc / design-ovf-support.rst @ 75932bcf

History | View | Annotate | Download (9.8 kB)

1
==============================================================
2
Ganeti Instance Import/Export using Open Virtualization Format
3
==============================================================
4

    
5
Background
6
==========
7

    
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.
13

    
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.
19

    
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.
25

    
26
Overview
27
========
28

    
29
Open Virtualization Format description
30
--------------------------------------
31

    
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).
40

    
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.
46

    
47
OVF package should contain one file with ``.ovf`` extension, which is an
48
XML file specifying the following (per virtual machine):
49

    
50
- virtual disks
51
- network description
52
- list of virtual hardware
53
- operating system, if any
54

    
55
Each of the elements in ``.ovf`` file may, if desired, contain a
56
human-readable description to every piece of information given.
57

    
58
Additionally, the package may have some disk image files and other
59
additional resources (e.g. ISO images).
60

    
61
Supported disk formats
62
----------------------
63

    
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.
67

    
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
73
  ``.vhd``
74
- Red Hat Enterprise Virtualization: ``.raw`` (raw disk format),
75
  ``.cow`` (qemu's ``QCOW2``)
76
- other: AbiCloud, OpenNode Cloud, SUSE Studio, Morfeo Claudia,
77
  OpenStack
78

    
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:
82

    
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,
86
  if we do?]
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.
90

    
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
93
sparse vmdk images.
94

    
95
Import and export - the closer look
96
===================================
97

    
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
101
information.
102

    
103
Ganeti's backup format vs OVF
104
-----------------------------
105
.. highlight:: xml
106

    
107
The basic structure of Ganeti ``.ovf`` file is the following::
108

    
109
    <Envelope>
110
        <References></References>
111
        <DiskSection></DiskSection>
112
        <NetworkSection></NetworkSection>
113
        <VirtualSystem>
114
            <Name></Name>
115
            <OperatingSystemSection></OperatingSystemSection>
116
            <VirtualHardwareSection><VirtualHardwareSection>
117
        </VirtualSystem>
118
        <gnt:GanetiSection>
119
            <gnt:VersionId/>
120
            <gnt:AutoBalance/>
121
            <gnt:Tags></gnt:Tags>
122
            <gnt:OSParameters></gnt:OSParameters>
123
            <gnt:Hypervisor>
124
                <gnt:HypervisorParameters>
125
                </gnt:HypervisorParameters>
126
            </gnt:Hypervisor>
127
        </gnt:GanetiSection>
128
    </Envelope>
129

    
130
.. note ::
131
    Tags with ``gnt:`` prefix are Ganeti-specific and are not a part of
132
    OVF standard.
133

    
134
.. highlight:: text
135

    
136
Whereas Ganeti's export info is of the following form, ``=>`` showing
137
where will the data be in OVF format::
138

    
139
  [instance]
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
152
      tags                      => gnt:Tags
153

    
154
  [backend]
155
      auto_balanced             => gnt:AutoBalance
156
      memory = mem_in_mb        => Item in VirtualHardwareSection
157
      vcpus = number            => Item in VirtualHardwareSection
158

    
159
  [export]
160
      compression               => DiskSection
161
      os                        => OperatingSystemSection
162
      source                    => ignored
163
      timestamp                 => ignored
164
      version                   => gnt:VersionId
165

    
166
  [os]                          => gnt:OSParameters
167

    
168
  [hypervisor]                  => gnt:HypervisorParameters
169

    
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
172
network/disk.
173

    
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``.
180

    
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]
185

    
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:
192

    
193
1. Export from Ganeti to OVF with ``--external`` option - this will
194
cause to skip the non-standard information.
195

    
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.
199

    
200
.. note::
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
204
    the disk image.
205

    
206
Planned limitations
207
===================
208

    
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
214
import process.
215

    
216
Package
217
-------
218

    
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.
224

    
225
Multiple Virtual Systems
226
------------------------
227

    
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
231
option.
232

    
233
Disks
234
-----
235

    
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``.
241

    
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
244
of equal size.
245

    
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.
248

    
249
Network
250
-------
251

    
252
There are no known limitations regarding network support.
253

    
254
Hardware
255
--------
256

    
257
TODO
258

    
259
Operating Systems
260
-----------------
261

    
262
TODO
263

    
264
Other
265
-----
266

    
267

    
268
Implementation details
269
======================
270

    
271
TODO
272

    
273
.. vim: set textwidth=72 :
274
.. Local Variables:
275
.. mode: rst
276
.. fill-column: 72
277
.. End: