Displaying 20 results from an estimated 22 matches for "qemu_img_version".
2017 Feb 06
0
Re: [PATCH v8 2/4] v2v: add function qemu_img_version to utils
On Mon, Feb 06, 2017 at 11:06:46AM +0300, Roman Kagan wrote:
> On Sat, Feb 04, 2017 at 03:10:44PM +0100, Tomáš Golembiovský wrote:
> > The function returns version of qemu-img as a tuple (major, minor), or
> > the value (0,9) in case there was an error detecting the version.
>
> Depending on QEMU version is extremly unreliable. Vendors often stick
> with fairly old
2017 Feb 06
1
Re: [PATCH v8 2/4] v2v: add function qemu_img_version to utils
On Mon, 6 Feb 2017 15:25:53 +0000
"Richard W.M. Jones" <rjones@redhat.com> wrote:
> On Mon, Feb 06, 2017 at 11:06:46AM +0300, Roman Kagan wrote:
> > On Sat, Feb 04, 2017 at 03:10:44PM +0100, Tomáš Golembiovský wrote:
> > > The function returns version of qemu-img as a tuple (major, minor), or
> > > the value (0,9) in case there was an error detecting
2017 Feb 06
3
[PATCH] v2v: ova: Don't rely on qemu-img version, test "offset" and
Not tested yet, am running the tests now.
Rich.
2017 Feb 06
0
[PATCH] v2v: ova: Don't rely on qemu-img version, test "offset" and "size" features.
...--git a/v2v/input_ova.ml b/v2v/input_ova.ml
index 3c11cd0..3beaffc 100644
--- a/v2v/input_ova.ml
+++ b/v2v/input_ova.ml
@@ -90,9 +90,8 @@ object
match detect_file_type ova with
| `Tar ->
(* Normal ovas are tar file (not compressed). *)
- let qmajor, qminor = qemu_img_version () in
- if qmajor > 2 || (qmajor == 2 && qminor >= 8) then (
- (* If QEMU is 2.8 or newer we don't have to extract everything.
+ if qemu_img_supports_offset_and_size () then (
+ (* In newe QEMU we don't have to extract everything....
2017 Feb 06
2
[PATCH v2] v2v: ova: Don't rely on qemu-img version, test "offset"
v1 -> v2:
- Use 'qemu-img info' which avoids one of the temporary files
(thanks Tomáš).
- Add a unit test.
Unfortunately when I run 'make -C v2v check' I don't think this code
is being run at all, so there may be something else going on here
which I don't understand.
Rich.
2016 Nov 12
0
[PATCH v2 4/5] v2v: ova: don't extract files from OVA if it's not needed
...command (sprintf "tar -tf %s" (Filename.quote file)) in
+ List.iter (fun f ->
+ if Filename.check_suffix f ".ovf" ||
+ Filename.check_suffix f ".mf" then
+ untar ~path:f file outdir
+ ) files in
+
+ let qemu_img_version () =
+ let cmd = "qemu-img --version" in
+ let lines = external_command cmd in
+ match lines with
+ | [] -> error ("'qemu-img --version' returned no output")
+ | line :: _ ->
+ let rex = Str.regexp "qem...
2016 Nov 21
2
Re: [PATCH v2 4/5] v2v: ova: don't extract files from OVA if it's not needed
.... i.e. here: this can be changed to:
let files =
filter_map (
fun f ->
if Filename.check_suffix f ".ovf" ||
Filename.check_suffix f ".mf" then
Some f
else None
) files in
untar ~paths:files file outdir
> + let qemu_img_version () =
> + let cmd = "qemu-img --version" in
> + let lines = external_command cmd in
> + match lines with
> + | [] -> error ("'qemu-img --version' returned no output")
> + | line :: _ ->
> +...
2016 Nov 07
0
Re: [PATCH 0/5] Import directly from OVA tar archive if possible
...le-time check or runtime
> check?
- yes, we have version checks for qemu, but only internally in the
library (and it does not make sense to export)
- runtime check indeed -- for example something like the following
(taken & simplified from virt-sysprep in the rhel-6.x branches):
let qemu_img_version () =
let cmd = "qemu-img --version" in
let lines = external_command cmd in
match lines with
| [] -> error ("'qemu-img --version' returned no output")
| line :: _ ->
try
sscanf line "qemu-img version %d.%d" (
fun...
2016 Nov 23
0
Re: [PATCH v2 4/5] v2v: ova: don't extract files from OVA if it's not needed
...; tmpfile in
> >
> > + (* Untar only ovf and manifest from the archive *)
> > + let untar_partial file outdir =
>
> I'd rename this as "untar_metadata", as it seems a better fitting name.
> YMMV.
Agreed.
> > + let qemu_img_version () =
> > + let cmd = "qemu-img --version" in
> > + let lines = external_command cmd in
> > + match lines with
> > + | [] -> error ("'qemu-img --version' returned no output")
> > + | line :: _ -...
2017 Feb 04
8
[PATCH v8 0/4] Import directly from OVA tar archive if possible
...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ý (4):
mllib: add subdirectory function to common_utils
v2v: add function qemu_img_version to utils
v2v: add function find_file_in_tar to utils
v2v: ova: don't extract files from OVA if it's not needed
mllib/common_utils.ml | 9 +++
mllib/common_utils.mli | 10 +++
mllib/common_utils_tests.ml | 7 ++
test-data/test-utils.s...
2017 Feb 03
3
[PATCH v7 0/1] Import directly from OVA tar archive if possible
v7:
- rebased because patch 1/3 has been pushed
- changes to nsplit have been dropped (2/3)
- addressed Richard's comments, notably the subfolder function was moved to
mllib and renamed to subdirectory
v6:
- just rebase
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
2017 Feb 03
0
[PATCH v7 1/1] v2v: ova: don't extract files from OVA if it's not needed
...else None
+ ) files in
+ untar ~paths:files ova outdir
+ in
+
match detect_file_type ova with
| `Tar ->
(* Normal ovas are tar file (not compressed). *)
- untar ova tmpdir;
- tmpdir
+ let qmajor, qminor = qemu_img_version () in
+ if qmajor > 2 || (qmajor == 2 && qminor >= 8) then (
+ (* If QEMU is 2.8 or newer we don't have to extract everything.
+ * We can access disks inside the tar archive directly.
+ *)
+ untar_metadata ova tmpdir;
+...
2017 Jan 31
1
Re: [PATCH v6 3/3] v2v: ova: don't extract files from OVA if it's not needed
...t;) ?paths file outdir =
> + let cmd =
> + [ "tar"; sprintf "-x%sf" format; file; "-C"; outdir ]
> + @ (match paths with None -> [] | Some p -> p)
I don't think you need parens around the match statement here(?)
> + let qemu_img_version () =
> + let lines = external_command "qemu-img --version" in
> + match lines with
> + | [] -> error ("'qemu-img --version' returned no output")
> + | line :: _ ->
> + let rex = Str.regexp
> +...
2016 Nov 12
9
[PATCH v2 0/5] Import directly from OVA tar archive if possible
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
2017 Jan 30
6
[PATCH v6 0/3] Import directly from OVA tar archive if possible
v6:
- just rebase
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
2016 Dec 18
0
[PATCH v4 6/6] v2v: ova: don't extract files from OVA if it's not needed
...es =
+ filter_map (fun f ->
+ if Filename.check_suffix f ".ovf" ||
+ Filename.check_suffix f ".mf" then
+ Some f
+ else None
+ ) files in
+ untar ~paths:files ova outdir in
+
+ let qemu_img_version () =
+ let cmd = "qemu-img --version" in
+ let lines = external_command cmd in
+ match lines with
+ | [] -> error ("'qemu-img --version' returned no output")
+ | line :: _ ->
+ let rex = Str.regexp "qem...
2017 Jan 30
0
[PATCH v6 3/3] v2v: ova: don't extract files from OVA if it's not needed
...es =
+ filter_map (fun f ->
+ if Filename.check_suffix f ".ovf" ||
+ Filename.check_suffix f ".mf" then
+ Some f
+ else None
+ ) files in
+ untar ~paths:files ova outdir in
+
+ let qemu_img_version () =
+ let lines = external_command "qemu-img --version" in
+ match lines with
+ | [] -> error ("'qemu-img --version' returned no output")
+ | line :: _ ->
+ let rex = Str.regexp
+ "qemu-img versi...
2016 Dec 18
9
[PATCH v4 0/6] Import directly from OVA tar archive if possible
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
2017 Jan 11
3
[PATCH v5 0/3] Import directly from OVA tar archive if possible
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
2016 Nov 04
10
[PATCH 0/5] Import directly from OVA tar archive if possible
This is still a draft, not ready for commit yet. But feedback is
welcomed.
This series is related to the problem of inefficient import of OVA
files. The needed enhancements of QEMU was 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 first three