Export: documentation
[ganeti-local] / doc / ovfconverter.rst
1 =============
2 OVF converter
3 =============
4
5 Using ``ovfconverter`` from the ``tools`` directory, one can easily
6 convert previously exported Ganeti instance into OVF package, supported
7 by VMWare, VirtualBox and some other virtualization software. It is
8 also possible to use instance exported from such a tool and convert it
9 to Ganeti config file, used by ``gnt-backup import`` command.
10
11 For the internal design of the converter and more detailed description,
12 including listing of available command line options, please refer to
13 :doc:`design-ovf-support`
14
15 As the amount of Ganeti-specific details, that need to be provided in
16 order to import an external instance, is rather large, we will present
17 here some examples of importing instances from different sources.
18 It is also worth noting that there are some limitations regarding
19 support for different hardware.
20
21 Limitations on import
22 =====================
23
24 Network
25 -------
26 Available modes for the network include ``bridged`` and ``routed``.
27 There is no ``NIC`` mode, which is typically used e.g. by VirtualBox.
28 For most usecases this should not be of any effect, since if
29 ``NetworkSection`` contains any networks which are not discovered as
30 ``bridged`` or ``routed``, the network mode is assigned automatically,
31 using Ganeti's cluster defaults.
32
33 Backend
34 -------
35 The only values that are taken into account regarding Virtual Hardware
36 (described in ``VirtualHardwareSection`` of the ``.ovf`` file) are:
37
38 - number of virtual CPUs
39 - RAM memory
40 - hard disks
41 - networks
42
43 Neither USB nor CD-ROM drive are used in Ganeti. We decided to simply
44 ignore unused elements of this section, so their presence won't raise
45 any warnings.
46
47
48 Operating System
49 ----------------
50 List of operating systems available on a cluster is viewable using
51 ``gnt-os list`` command. When importing from external source, providing
52 OS type in a command line (``--os-type=...``) is **required**. This is
53 because rven if the type is given in OVF description, it is not detailed
54 enough for Ganeti to know which os-specific scripts to use.
55
56
57 Import examples
58 ===============
59
60 Ganeti's OVF
61 ------------
62 If you are importing instance created using ``ovfconverter export`` --
63 you most probably will not have to provide any additional information.
64 In that case, the following is all you need (unless you wish to change
65 some configuration options)::
66
67         ovfconverter import ganeti.ovf
68         [...]
69         gnt-instance import -n <node> <instance name>
70
71
72 Virtualbox, VMWare and other external sources
73 ---------------------------------------------
74 In case of importing from external source, you will most likely have to
75 provide the following details:
76
77 - ``os-type`` can be any operating system listed on ``gnt-os list``
78 - ``name`` that has to be resolvable, as it will be used as instance
79   name (even if your external instance has a name, it most probably is
80   not resolvable to an IP address)
81
82 These are not the only options, but the recommended ones. For the
83 complete list of available options please refer to
84 `Command Line description <design-ovf-support.rst>`
85
86 Minimalistic but complete example of importing Virtualbox's OVF
87 instance may look like::
88
89     ovfconverter virtualbox.ovf --os-type=lenny-image \
90       --name=xen.test.i1 --disk-template=diskless
91     [...]
92     gnt-instance import -n node1.xen xen.test.i1
93
94
95
96 Export example
97 ==============
98
99 Exporting instance into ``.ovf`` format is pretty streightforward and
100 requires little - if any - explanation. The only compulsory detail is
101 the required disk format, provided using the ``--format`` option.
102
103 Export to another Ganeti instance
104 ---------------------------------
105 If for some reason it is convenient for you to use ``ovfconverter`` to
106 move instance between clusters (e.g. because of the disk compression),
107 the complete example of export may look like this::
108
109     gnt-backup export -n node1.xen xen.test.i1
110     [...]
111     ovfconverter export --format=vmdk --ova \
112       /srv/ganeti/export/xen.i1.node1.xen/config.ini
113     [...]
114
115 The result is then in
116 ``/srv/ganeti/export/xen.i1.node1.xen/xen.test.i1.ova``
117
118 Export to Virtualbox/VMWare/other external tool
119 -----------------------------------------------
120 Typically, when exporting to external tool we do not want
121 Ganeti-specific configuration to be saved. In that case, simply use the
122 ``--external`` option::
123
124     gnt-backup export -n node1.xen xen.test.i1
125     [...]
126     ovfconverter export --external --output-dir ~/ganeti-instance/ \
127       /srv/ganeti/export/xen.i1.node1.xen/config.ini
128
129
130 Known issues
131 ============
132
133 Export
134 ------
135 When exporting to **VirtualBox**, you may encounter errors regarding
136 network. If that is the case, simply change the network type in options
137 to ``NAT``.
138
139
140 .. vim: set textwidth=72 :
141 .. Local Variables:
142 .. mode: rst
143 .. fill-column: 72
144 .. End: