search for: overlay_file

Displaying 20 results from an estimated 36 matches for "overlay_file".

2015 Oct 20
1
[PATCH v3 02/13] v2v: factor out overlay creation
...a over the wire. - *) - message (f_"Creating an overlay to protect the source from being modified"); - let overlay_dir = (new Guestfs.guestfs ())#get_cachedir () in - let overlays = - List.map ( - fun ({ s_qemu_uri = qemu_uri; s_format = format } as source) -> - let overlay_file = - Filename.temp_file ~temp_dir:overlay_dir "v2vovl" ".qcow2" in - unlink_on_exit overlay_file; - - let options = - "compat=1.1" ^ - (match format with None -> "" - | Some fmt -> ",backing_fmt=...
2015 Aug 11
0
[PATCH v2 03/17] v2v: factor out overlay creation
...parts of the + * data over the wire. + *) + message (f_"Creating overlays to protect the sources from being modified"); + let overlay_dir = (new Guestfs.guestfs ())#get_cachedir () in + List.mapi ( + fun i ({ s_qemu_uri = qemu_uri; s_format = format } as source) -> + let overlay_file = + Filename.temp_file ~temp_dir:overlay_dir "v2vovl" ".qcow2" in + unlink_on_exit overlay_file; + + let options = + "compat=1.1" ^ + (match format with None -> "" + | Some fmt -> ",backing_fmt=" ^ fmt...
2015 Oct 20
1
[PATCH v3 10/13] v2v: factor out opening and populating guestfs handle
...utput_format in - (* Open the guestfs handle. *) message (f_"Opening the overlay"); - let g = new G.guestfs () in - g#set_identifier "v2v"; - if trace () then g#set_trace true; - if verbose () then g#set_verbose true; - g#set_network true; - List.iter ( - fun ({ov_overlay_file = overlay_file}) -> - g#add_drive_opts overlay_file - ~format:"qcow2" ~cachemode:"unsafe" ~discard:"besteffort" - ~copyonread:true - ) overlays; + let g = open_guestfs () in + populate_overlays g overlays; g#launch (); @@ -261,6 +251,24...
2015 Jul 27
4
[PATCH] v2v: add --in-place mode
...a over the wire. - *) - message (f_"Creating an overlay to protect the source from being modified"); let overlay_dir = (new Guestfs.guestfs ())#get_cachedir () in - let overlays = - List.map ( - fun ({ s_qemu_uri = qemu_uri; s_format = format } as source) -> - let overlay_file = - Filename.temp_file ~temp_dir:overlay_dir "v2vovl" ".qcow2" in - unlink_on_exit overlay_file; - - let options = - "compat=1.1" ^ - (match format with None -> "" - | Some fmt -> ",backing_fmt=...
2015 Jul 28
0
Re: [PATCH] v2v: add --in-place mode
...refactoring -- moving the overlay_dir assigning from within the loop up to here. Put that into a separate commit, as it's trivial to review on its own. > - let overlays = > - List.map ( > - fun ({ s_qemu_uri = qemu_uri; s_format = format } as source) -> > - let overlay_file = > - Filename.temp_file ~temp_dir:overlay_dir "v2vovl" ".qcow2" in > - unlink_on_exit overlay_file; > - > - let options = > - "compat=1.1" ^ > - (match format with None -> "" > - |...
2015 Nov 10
1
[PATCH] OCaml tools: use open_guestfs everywhere
...abec7f..3610446 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -236,12 +236,12 @@ and create_overlays src_disks = error (f_"qemu-img command failed, see earlier errors"); (* Sanity check created overlay (see below). *) - if not ((new G.guestfs ())#disk_has_backing_file overlay_file) then + if not ((open_guestfs ())#disk_has_backing_file overlay_file) then error (f_"internal error: qemu-img did not create overlay with backing file"); let sd = "sd" ^ drive_name i in - let vsize = (new G.guestfs ())#disk_virtual_size overlay_file...
2015 Oct 20
1
[PATCH v3 07/13] v2v: factor out copying of output data
...* exit. This only seemed to happen with lazy_refcounts was - * used. The symptom was that the header wasn't written back - * to the disk correctly and the file appeared to have no - * backing file. Just sanity check this here. - *) - let overlay_file = t.target_overlay.ov_overlay_file in - if not ((new G.guestfs ())#disk_has_backing_file overlay_file) then - error (f_"internal error: qemu corrupted the overlay file"); - - (* Give the input module a chance to adjust the parameters - * of the overl...
2015 Aug 11
41
[PATCH v2 00/17] v2v: add --in-place mode
This series is a second attempt to add a mode of virt-v2v operation where it leaves the config and disk image conversion, rollback on errors, registering with the destination hypervisor, etc. to a third-party toolset, and performs only tuning of the guest OS to run in the KVM-based hypervisor. The first 14 patches are just refactoring and rearrangement of the code, factoring the implementation
2015 Aug 11
0
[PATCH v2 04/17] v2v: factor out populating targets list
...- let overlays = create_overlays source.s_disks in - - (* Open the guestfs handle. *) - message (f_"Opening the overlay"); - let g = new G.guestfs () in - if trace () then g#set_trace true; - if verbose () then g#set_verbose true; - g#set_network true; - List.iter ( - fun ({ov_overlay_file = overlay_file}) -> - g#add_drive_opts overlay_file - ~format:"qcow2" ~cachemode:"unsafe" ~discard:"besteffort" - ~copyonread:true - ) overlays; - - g#launch (); - +let init_targets overlays source output output_format = (* Work out where we...
2015 Nov 10
1
[PATCH] v2v: Add --compressed option to produce compressed qcow2 files (RHBZ#1279273).
...preallocation ?compat; let cmd = - sprintf "qemu-img convert%s -n -f qcow2 -O %s %s %s" + sprintf "qemu-img convert%s -n -f qcow2 -O %s%s %s %s" (if not (quiet ()) then " -p" else "") - (quote t.target_format) (quote overlay_file) + (quote t.target_format) + (if compressed then " -c" else "") + (quote overlay_file) (quote t.target_file) in if verbose () then printf "%s\n%!" cmd; let start_time = gettimeofday () in diff --git a/v2v/virt-v2v.pod...
2016 May 23
0
[PATCH 5/5] mllib: add a new run_command helper
...128,10 +128,9 @@ object parsed_uri scheme server orig_path in (* Rebase the qcow2 overlay to adjust the readahead parameter. *) - let cmd = - sprintf "qemu-img rebase -u -b %s %s" - (quote backing_qemu_uri) (quote overlay.ov_overlay_file) in - if shell_command cmd <> 0 then + let cmd = [| "qemu-img"; "rebase"; "-u"; "-b"; backing_qemu_uri; + overlay.ov_overlay_file |] in + if run_command cmd <> 0 then warning (f_"qemu-img rebase faile...
2019 Apr 30
1
[PATCH] v2v: Allow output modes to rewrite disk copying
..."qemu-img"; "convert" ] @ + (if not (quiet ()) then [ "-p" ] else []) @ + [ "-n"; "-f"; "qcow2"; "-O"; target.target_format ] @ + (if compressed then [ "-c" ] else []) @ + [ target.target_overlay.ov_overlay_file; filename ] in + message (f_"Copying disk to %s (%s)") filename target.target_format; + if run_command cmd <> 0 then + error (f_"qemu-img command failed, see earlier errors"); + method virtual create_metadata : source -> target list -> target_buses -&gt...
2019 Nov 01
3
[PATCH] v2v: Optimize convert for images with small holes
...nput output = (if not (quiet ()) then [ "-p" ] else []) @ [ "-n"; "-f"; "qcow2"; "-O"; t.target_format ] @ (if cmdline.compressed then [ "-c" ] else []) @ + [ "-S"; "64k" ] @ [ overlay_file; filename ] in let start_time = gettimeofday () in if run_command cmd <> 0 then -- 2.20.1
2016 May 23
7
[PATCH 1/5] mllib: make external_command echo the command executed
Add an optional parameter to disable this behaviour, so the Curl module in v2v won't print user-sensible data (like passwords). --- builder/checksums.ml | 1 - builder/downloader.ml | 1 - builder/sigchecker.ml | 1 - mllib/common_utils.ml | 4 +++- mllib/common_utils.mli | 7 +++++-- v2v/curl.ml | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git
2015 Oct 21
2
[PATCH] v2v: use open_guestfs everywhere
..._"Creating an overlay to protect the source from being modified"); - let overlay_dir = (new Guestfs.guestfs ())#get_cachedir () in + let overlay_dir = (open_guestfs ())#get_cachedir () in List.mapi ( fun i ({ s_qemu_uri = qemu_uri; s_format = format } as source) -> let overlay_file = @@ -944,7 +944,7 @@ and target_bus_assignment source targets guestcaps = and preserve_overlays overlays src_name = (* Save overlays if --debug-overlays option was used. *) - let overlay_dir = (new Guestfs.guestfs ())#get_cachedir () in + let overlay_dir = (open_guestfs ())#get_cachedir ()...
2020 Apr 06
0
[v2v PATCH 2/2] Consolidate handling of temporary files/dirs
...cachedir (human_size free_space) (* Create a qcow2 v3 overlay to protect the source image(s). *) and create_overlays source_disks = @@ -286,8 +284,7 @@ and create_overlays source_disks = List.mapi ( fun i ({ s_qemu_uri = qemu_uri; s_format = format } as source) -> let overlay_file = - Filename.temp_file ~temp_dir:overlay_dir "v2vovl" ".qcow2" in - unlink_on_exit overlay_file; + Filename.temp_file ~temp_dir:cachedir "v2vovl" ".qcow2" in (* There is a specific reason to use the newer qcow2 variant: * B...
2020 Apr 06
0
[PATCH virt-v2v v2 2/2] v2v: Allow large temporary directory to be set on a global basis.
...large_tmpdir (human_size free_space) (* Create a qcow2 v3 overlay to protect the source image(s). *) and create_overlays source_disks = @@ -286,7 +284,7 @@ and create_overlays source_disks = List.mapi ( fun i ({ s_qemu_uri = qemu_uri; s_format = format } as source) -> let overlay_file = - Filename.temp_file ~temp_dir:overlay_dir "v2vovl" ".qcow2" in + Filename.temp_file ~temp_dir:large_tmpdir "v2vovl" ".qcow2" in unlink_on_exit overlay_file; (* There is a specific reason to use the newer qcow2 variant: @@ -823...
2017 Dec 08
3
[PATCH v2 0/2] v2v: -o null: Use the qemu null device driver.
This changes the infrastructure to allow the target_file to be a QEMU URI. Rich.
2015 Oct 21
0
Re: [PATCH] v2v: use open_guestfs everywhere
...y to protect the source from being modified"); > - let overlay_dir = (new Guestfs.guestfs ())#get_cachedir () in > + let overlay_dir = (open_guestfs ())#get_cachedir () in > List.mapi ( > fun i ({ s_qemu_uri = qemu_uri; s_format = format } as source) -> > let overlay_file = > @@ -944,7 +944,7 @@ and target_bus_assignment source targets guestcaps = > > and preserve_overlays overlays src_name = > (* Save overlays if --debug-overlays option was used. *) > - let overlay_dir = (new Guestfs.guestfs ())#get_cachedir () in > + let overlay_dir = (op...
2019 Nov 20
2
[PATCH] rhv-upload: Support qcow2 disks
...* which is the disk format. commpressed format will also not work. *) + [ "-n"; "-f"; "qcow2"; "-O"; "raw" ] @ (if cmdline.compressed then [ "-c" ] else []) @ [ "-S"; "64k" ] @ [ overlay_file; filename ] in -- 2.21.0