v5:
- rebase, patches 1,3,5 were merged
- 1/3: we still need to discuss whether to detect compressed discs
- 2/3:
- renamed argument noempty to keep_empty
- tests were not run
- 3/3:
- using JSON module to generate JSON (as suggested by Pino)
- all the other comments raised by Pino
v4:
- rebase to more recent master
- 1/6: using just "quote" instead of "Filename.quote"
- 2/6: reformated block of code according to Richards suggestion
- 4/6: added tests for nsplit
v3: Addressed Pino's comments, namely:
- input_ova.ml
- untar takes list of paths
- renamed untar_partial to untar_metadata
- replaced uggly regex with nsplit
- tests
- test changes are part of the main commit
- renamed test-data/guestfs-hashsums.sh to test-data/test-utils.sh
- renamed qemu_version to qemu_is_version and moved it to
test-data/test-utils.sh
- normalize paths in expect files
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
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.
Tomáš Golembiovský (3):
v2v: ova: don't detect compressed disks, read the OVF instead
mllib: modify nsplit to take optional noempty and count arguments
v2v: ova: don't extract files from OVA if it's not needed
mllib/common_utils.ml | 13 ++-
mllib/common_utils.mli | 12 +-
mllib/common_utils_tests.ml | 30 +++++
test-data/test-utils.sh | 20 ++++
v2v/Makefile.am | 2 +
v2v/input_ova.ml | 198 +++++++++++++++++++++++++++++---
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 | 13 ++-
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 | 72 ++++++++++++
v2v/test-v2v-i-ova-two-disks.expected2 | 19 +++
v2v/test-v2v-i-ova-two-disks.sh | 13 ++-
16 files changed, 561 insertions(+), 30 deletions(-)
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.11.0