Export: documentation
authorAgata Murawska <agatamurawska@google.com>
Mon, 12 Sep 2011 11:40:01 +0000 (13:40 +0200)
committerMichael Hanselmann <hansmi@google.com>
Mon, 26 Sep 2011 14:10:21 +0000 (16:10 +0200)
Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

doc/design-ovf-support.rst
doc/ovfconverter.rst

index f01871d..bd88273 100644 (file)
@@ -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:
index 0168175..f45c9ed 100644 (file)
@@ -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