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.
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`
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.
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.
35 The only values that are taken into account regarding Virtual Hardware
36 (described in ``VirtualHardwareSection`` of the ``.ovf`` file) are:
38 - number of virtual CPUs
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
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.
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)::
67 ovfconverter import ganeti.ovf
69 gnt-instance import -n <node> <instance name>
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:
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)
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>`
86 Minimalistic but complete example of importing Virtualbox's OVF
87 instance may look like::
89 ovfconverter virtualbox.ovf --os-type=lenny-image \
90 --name=xen.test.i1 --disk-template=diskless
92 gnt-instance import -n node1.xen xen.test.i1
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.
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::
109 gnt-backup export -n node1.xen xen.test.i1
111 ovfconverter export --format=vmdk --ova \
112 /srv/ganeti/export/xen.i1.node1.xen/config.ini
115 The result is then in
116 ``/srv/ganeti/export/xen.i1.node1.xen/xen.test.i1.ova``
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::
124 gnt-backup export -n node1.xen xen.test.i1
126 ovfconverter export --external --output-dir ~/ganeti-instance/ \
127 /srv/ganeti/export/xen.i1.node1.xen/config.ini
135 When exporting to **VirtualBox**, you may encounter errors regarding
136 network. If that is the case, simply change the network type in options
140 .. vim: set textwidth=72 :