diff --git a/doc/design-ovf-support.rst b/doc/design-ovf-support.rst index f01871d2d286008dbc250c9f090db79b603e25e2..bd88273e6549d2c551ede87ecbd2861eae6883dd 100644 --- a/doc/design-ovf-support.rst +++ b/doc/design-ovf-support.rst @@ -454,7 +454,7 @@ the command line. Typical workflow for the import is very simple: -- read the ``.ovf`` file info memory +- read the ``.ovf`` file into memory - verify manifest - parse each element of the configuration file: name, disk template, hypervisor, operating system, backend parameters, network and disks @@ -468,6 +468,29 @@ Typical workflow for the import is very simple: - save gathered information in ``config.ini`` file +Export +------ + +Similar to import, export functionality also uses two classes - +OVFWriter and OVFExporter. + +OVFWriter class produces XML output based on the information given. Its +sole role is to separate the creation of ``.ovf`` file content. + +OVFExporter class gathers information from ``config.ini`` file or +command line and performs necessary operations like disk conversion, disk +compression, manifest creation and OVA package creation. + +Typical workflow for the export is even simpler, than for the import: + +- read the ``config.ini`` file into memory +- gather information about certain parts of the instance, convert and + compress disks if desired +- save each of these elements as a fragment of XML tree +- save the XML tree as ``.ovf`` file +- create manifest file and fill it with appropriate checksums +- if ``--ova`` option was chosen, pack the results into ``.ova`` tarfile + .. vim: set textwidth=72 : .. Local Variables: diff --git a/doc/ovfconverter.rst b/doc/ovfconverter.rst index 0168175fe8a09b3a99184597685d048893989433..f45c9ed6ccc99aa26fbd248524fc5cbf41ccf8e5 100644 --- a/doc/ovfconverter.rst +++ b/doc/ovfconverter.rst @@ -92,6 +92,51 @@ instance may look like:: gnt-instance import -n node1.xen xen.test.i1 + +Export example +============== + +Exporting instance into ``.ovf`` format is pretty streightforward and +requires little - if any - explanation. The only compulsory detail is +the required disk format, provided using the ``--format`` option. + +Export to another Ganeti instance +--------------------------------- +If for some reason it is convenient for you to use ``ovfconverter`` to +move instance between clusters (e.g. because of the disk compression), +the complete example of export may look like this:: + + gnt-backup export -n node1.xen xen.test.i1 + [...] + ovfconverter export --format=vmdk --ova \ + /srv/ganeti/export/xen.i1.node1.xen/config.ini + [...] + +The result is then in +``/srv/ganeti/export/xen.i1.node1.xen/xen.test.i1.ova`` + +Export to Virtualbox/VMWare/other external tool +----------------------------------------------- +Typically, when exporting to external tool we do not want +Ganeti-specific configuration to be saved. In that case, simply use the +``--external`` option:: + + gnt-backup export -n node1.xen xen.test.i1 + [...] + ovfconverter export --external --output-dir ~/ganeti-instance/ \ + /srv/ganeti/export/xen.i1.node1.xen/config.ini + + +Known issues +============ + +Export +------ +When exporting to **VirtualBox**, you may encounter errors regarding +network. If that is the case, simply change the network type in options +to ``NAT``. + + .. vim: set textwidth=72 : .. Local Variables: .. mode: rst