[Libguestfs] [PATCH v2 0/5] Import directly from OVA tar archive if possible

Tomáš Golembiovský tgolembi at redhat.com
Sat Nov 12 15:37:48 UTC 2016


This series is related to the problem of inefficient import of OVA
files. The needed enhancements of QEMU were merged into the codebase and
should be available in QEMU 2.8. From there we can use 'size' and
'offset' options in raw driver to tell QEMU to use only subset of a file
as an image.

The patch set is more or less complete. The only outstanding issue is
the missing detection of sparse files inside tar. But this can be done
in a separate patch. As pointed out before I didn't find a way how to
detect that by using the tar tool only and would probably require use of
some external library.

The first three patches are just preparation. The main work is in patch
four. Last patch fixes the tests.


v2:
- rewritten the tar invocations, the output processing is now done in
  OcaML rather than with a shell code; it turned out to be easier and
  more readable than I have feared.
- added QEMU version check
- addressed Pino's comments
- changed tests; the expected result is now based on the QEMU used
  during testing


Tomáš Golembiovský (5):
  mllib: compute checksum of file inside tar
  v2v: ova: don't detect compressed disks, read the OVF instead
  v2v: ova: move the untar function
  v2v: ova: don't extract files from OVA if it's not needed
  v2v: update tests to match changes in OVA import

 mllib/checksums.ml                      |  11 +-
 mllib/checksums.mli                     |   2 +-
 test-data/utils.sh                      |  21 ++++
 v2v/Makefile.am                         |   1 +
 v2v/input_ova.ml                        | 184 +++++++++++++++++++++++++++-----
 v2v/test-v2v-i-ova-formats.sh           |   5 +-
 v2v/test-v2v-i-ova-gz.ovf               |   2 +-
 v2v/test-v2v-i-ova-subfolders.expected2 |  18 ++++
 v2v/test-v2v-i-ova-subfolders.sh        |  12 ++-
 v2v/test-v2v-i-ova-tar.expected         |  18 ++++
 v2v/test-v2v-i-ova-tar.expected2        |  18 ++++
 v2v/test-v2v-i-ova-tar.ovf              | 138 ++++++++++++++++++++++++
 v2v/test-v2v-i-ova-tar.sh               |  70 ++++++++++++
 v2v/test-v2v-i-ova-two-disks.expected2  |  19 ++++
 v2v/test-v2v-i-ova-two-disks.sh         |  12 ++-
 15 files changed, 493 insertions(+), 38 deletions(-)
 create mode 100755 test-data/utils.sh
 create mode 100644 v2v/test-v2v-i-ova-subfolders.expected2
 create mode 100644 v2v/test-v2v-i-ova-tar.expected
 create mode 100644 v2v/test-v2v-i-ova-tar.expected2
 create mode 100644 v2v/test-v2v-i-ova-tar.ovf
 create mode 100755 v2v/test-v2v-i-ova-tar.sh
 create mode 100644 v2v/test-v2v-i-ova-two-disks.expected2

-- 
2.10.1




More information about the Libguestfs mailing list