search for: qemuimg_cmd

Displaying 20 results from an estimated 28 matches for "qemuimg_cmd".

2017 Oct 27
0
[PATCH v11 4/8] builder: add Utils.get_image_infos function
...iff --git a/builder/utils.ml b/builder/utils.ml index acb6c2f4b..9fceee282 100644 --- a/builder/utils.ml +++ b/builder/utils.ml @@ -33,3 +33,9 @@ and revision = let string_of_revision = function | Rev_int n -> string_of_int n | Rev_string s -> s + +let get_image_infos filepath = + let qemuimg_cmd = "qemu-img info --output json " ^ (Std_utils.quote filepath) in + let lines = external_command qemuimg_cmd in + let line = String.concat "\n" lines in + Yajl.yajl_tree_parse line diff --git a/builder/utils.mli b/builder/utils.mli index 45385f713..4acde9f36 100644 --- a/build...
2017 Oct 27
15
[PATCH v11 0/8] virt-builder-repository
Hi all, Here is the latest version of the series. Diffs to v10: * Make Index.arch a (string, string option) maybe and use it to guess arch at parse time * Compute the image size at parse time when the template flag is set and the value is missing. * Add virt-repository_main slow test * Other fixes from Richard's comments Cédric Bosdonnat (7): Ignore builder/*.out and *.img
2017 Jan 03
0
[PATCH 5/5] Add a virt-builder-repository tool
...utimg ^ ".xz" + ) in + + let outindex_path = tmprepo // "index" in + let index_channel = open_out outindex_path in + + let process_image filename repo index interactive = ( + printf "Preparing %s...\n" filename; + + let filepath = repo // filename in + let qemuimg_cmd = "qemu-img info --output json " ^ (quote filepath) in + let lines = external_command qemuimg_cmd in + let line = String.concat "" lines in + let infos = yajl_tree_parse line in + let format = object_get_string "format" infos in + let size = object_get_n...
2017 Mar 07
0
[PATCH v4 9/9] Add a virt-builder-repository tool
...tdir; + + info "Compressing ...%!"; + let cmd = [ "xz"; "-f"; "--best"; + "--block-size=16777216"; outimg ] in + if run_command cmd <> 0 then + exit 1; + outimg ^ ".xz" + +let get_disk_image_info filepath = + let qemuimg_cmd = "qemu-img info --output json " ^ (quote filepath) in + let lines = external_command qemuimg_cmd in + let line = String.concat "\n" lines in + let infos = yajl_tree_parse line in + { + format = object_get_string "format" infos; + size = object_get_number &qu...
2018 Aug 17
0
[PATCH v3 1/4] mltools: Rename Yajl module as JSON_parser and move to common/mltools.
...Some (Checksums.of_string t c) | _ -> None ) disk_item in diff --git a/builder/utils.ml b/builder/utils.ml index 1446561b0..538a43be9 100644 --- a/builder/utils.ml +++ b/builder/utils.ml @@ -43,4 +43,4 @@ let get_image_infos filepath = let qemuimg_cmd = "qemu-img info --output json " ^ quote filepath in let lines = external_command qemuimg_cmd in let line = String.concat "\n" lines in - Yajl.yajl_tree_parse line + JSON_parser.json_parser_tree_parse line diff --git a/builder/utils.mli b/builder/utils.mli index 4249fd95...
2017 Mar 23
0
[PATCH v5 10/10] Add a virt-builder-repository tool
...tdir; + + info "Compressing ...%!"; + let cmd = [ "xz"; "-f"; "--best"; + "--block-size=16777216"; outimg ] in + if run_command cmd <> 0 then + exit 1; + outimg ^ ".xz" + +let get_disk_image_info filepath = + let qemuimg_cmd = "qemu-img info --output json " ^ (quote filepath) in + let lines = external_command qemuimg_cmd in + let line = String.concat "\n" lines in + let infos = yajl_tree_parse line in + { + format = object_get_string "format" infos; + size = object_get_number &qu...
2017 Feb 10
0
[PATCH v3 10/10] Add a virt-builder-repository tool
...ile; + + info "Compressing ...%!"; + let cmd = [ "xz"; "-f"; "--best"; + "--block-size=16777216"; outimg ] in + if run_command cmd <> 0 then + exit 1; + outimg ^ ".xz" + +let get_disk_image_infos filepath = + let qemuimg_cmd = "qemu-img info --output json " ^ (quote filepath) in + let lines = external_command qemuimg_cmd in + let line = String.concat "\n" lines in + let infos = yajl_tree_parse line in + { format = object_get_string "format" infos; + size = object_get_number "vi...
2017 Apr 12
0
[PATCH v6 10/10] Add a virt-builder-repository tool
...+ + info "Compressing ...%!"; + let cmd = sprintf "cat \"%s\" | xz -f --best --block-size=16777216 - >\"%s\"" + file outimg in + if shell_command cmd <> 0 then + exit 1; + outimg + +let get_disk_image_info filepath = + let qemuimg_cmd = "qemu-img info --output json " ^ (quote filepath) in + let lines = external_command qemuimg_cmd in + let line = String.concat "\n" lines in + let infos = yajl_tree_parse line in + { + format = object_get_string "format" infos; + size = object_get_number &qu...
2017 Jun 19
0
[PATCH v7 9/9] Add a virt-builder-repository tool
...+ + info "Compressing ...%!"; + let cmd = sprintf "cat \"%s\" | xz -f --best --block-size=16777216 - >\"%s\"" + file outimg in + if shell_command cmd <> 0 then + exit 1; + outimg + +let get_disk_image_info filepath = + let qemuimg_cmd = "qemu-img info --output json " ^ (quote filepath) in + let lines = external_command qemuimg_cmd in + let line = String.concat "\n" lines in + let infos = yajl_tree_parse line in + { + format = object_get_string "format" infos; + size = object_get_number &qu...
2017 Sep 18
0
[PATCH v9 7/7] New tool: virt-builder-repository
...f_"i‘xz’ command failed"); + outimg + +let get_mime_type filepath = + let file_cmd = "file --mime-type --brief " ^ (quote filepath) in + match external_command file_cmd with + | [] -> "" + | lines -> List.hd lines + +let get_disk_image_info filepath = + let qemuimg_cmd = "qemu-img info --output json " ^ (quote filepath) in + let lines = external_command qemuimg_cmd in + let line = String.concat "\n" lines in + let infos = yajl_tree_parse line in + { + format = object_get_string "format" infos; + size = object_get_number &qu...
2017 Oct 05
0
[PATCH v11 6/6] New tool: virt-builder-repository
...error (f_"‘xz’ command failed"); + outimg + +let get_mime_type filepath = + let file_cmd = "file --mime-type --brief " ^ (quote filepath) in + match external_command file_cmd with + | [] -> None + | line :: _ -> Some line + +let get_disk_image_info filepath = + let qemuimg_cmd = "qemu-img info --output json " ^ (quote filepath) in + let lines = external_command qemuimg_cmd in + let line = String.concat "\n" lines in + let infos = yajl_tree_parse line in + { + format = object_get_string "format" infos; + size = object_get_number &qu...
2017 Sep 12
0
[PATCH v8 7/7] Add a virt-builder-repository tool
...ailed"); + outimg + +let get_mime_type filepath = + let file_cmd = "file --mime-type " ^ (quote filepath) in + let output = List.hd (external_command file_cmd) in + let _, mime = String.split ":" output in + String.trim mime + +let get_disk_image_info filepath = + let qemuimg_cmd = "qemu-img info --output json " ^ (quote filepath) in + let lines = external_command qemuimg_cmd in + let line = String.concat "\n" lines in + let infos = yajl_tree_parse line in + { + format = object_get_string "format" infos; + size = object_get_number &qu...
2017 Jan 03
13
[PATCH 0/5] Introducing virt-builder-repository
Hi all, I wanted to provide an easy way to create or update a virt-builder repository out of a folder of template disk image files. This is what virt-builder-repository aims at. Some of the data are computed from the image file, others are asked the user or extracted from an existing index file. So far, virt-builder-repository doesn't run libguestfs on each image to extract the architecture,
2017 Nov 13
0
[PATCH v12 3/3] New tool: virt-builder-repository
...der/utils.ml @@ -35,6 +35,10 @@ let string_of_revision = function | Rev_int n -> string_of_int n | Rev_string s -> s +let increment_revision = function + | Rev_int n -> Rev_int (n + 1) + | Rev_string s -> Rev_int ((int_of_string s) + 1) + let get_image_infos filepath = let qemuimg_cmd = "qemu-img info --output json " ^ quote filepath in let lines = external_command qemuimg_cmd in diff --git a/builder/utils.mli b/builder/utils.mli index 5c7bfa1e4..7440e4b3d 100644 --- a/builder/utils.mli +++ b/builder/utils.mli @@ -32,3 +32,6 @@ val string_of_revision : revision -&gt...
2018 Aug 17
8
[PATCH v3 4/4] v2v: Add --print-estimate option to print copy size
I rethought this again, as I think that it's a dangerous assumption to bake qemu-img measure output into our API. This patch series runs qemu-img measure behind the scenes, but then parses the output and sums it to a single number which we print. Doing that required a bit of reworking, moving the Jansson [JSON parser] bindings from virt-builder into the common directory and a couple of other
2017 Mar 23
13
[PATCH v5 00/10] Introducing virt-builder-repository
Hi all, Here is the v5 of my patches series applying the latest comments from Pino. Cédric Bosdonnat (10): lib/osinfo.c: Extract xml processing into a callback lib: extract osinfo DB traversing API mllib: ocaml wrapper for lib/osinfo builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function dib: move do_cp to
2017 Feb 10
15
[PATCH v3 00/10] Introducing virt-builder-repository
Hi guys, Here is a v3 of the series, including changes to answer Richard's comments. Cédric Bosdonnat (10): mllib: factorize code to add Checksum.get_checksum function Move xml and xpath_helpers OCAML code to mllib mllib: add Xml.parse_file helper lib/osinfo.c: Extract xml processing into a callback lib: extract osinfo DB traversing API mllib: ocaml wrapper for lib/osinfo
2017 Sep 20
6
[PATCH v10 0/6] virt-builder-repository
Hi all, Diff to v9 includes the changes requested by Pino. Cédric Bosdonnat (5): builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function mllib: add XPath helper xpath_get_nodes() New tool: virt-builder-repository Pino Toscano (1): builder: add simple OCaml osinfo-db reader .gitignore
2017 Nov 21
5
[PATCH v13 0/3] virt-builder-repository
Hey there, Here is an update of the series. The changes: * Incorporate Richard's comments. Left out the with_openfile one since that leads to a double close. * Change the ask option return type to string (removing the option) since if the use doesn't input anything we're using the default, and the default is now a mandatory parameter. * Make sure there are items in the
2017 Sep 18
11
[PATCH v9 0/7] virt-builder-repository
Hi there, Diffs to v8: * Remove the regex to increment the revision: Index_parser.get_entry() only handles integers * Fix Pino's comments Cédric Bosdonnat (6): builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function mllib: add XPath helper xpath_get_nodes() builder: remove useless fish dependency New tool: