search for: ov_sd

Displaying 20 results from an estimated 55 matches for "ov_sd".

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.
2020 Apr 06
2
Re: [v2v PATCH 2/2] Consolidate handling of temporary files/dirs
...gt; > @@ -60,8 +50,12 @@ object > method supported_firmware = [ TargetBIOS; TargetUEFI ] > > method prepare_targets _ overlays _ = > - (* Write targets to a temporary local file - see above for reason. *) > - List.map (fun (_, ov) -> TargetFile (tmpdir // ov.ov_sd)) overlays > + (* Although glance can slurp in a stream from stdin, unfortunately > + * 'qemu-img convert' cannot write to a stream (although I guess > + * it could be implemented at least for raw). Therefore we have > + * to write to a temporary file. XXX >...
2015 Oct 20
1
[PATCH v3 08/13] v2v: factor out preserving overlays for debugging
...- (* Save overlays if --debug-overlays option was used. *) - if debug_overlays then ( - let overlay_dir = (new Guestfs.guestfs ())#get_cachedir () in - List.iter ( - fun ov -> - let saved_filename = - sprintf "%s/%s-%s.qcow2" overlay_dir source.s_name ov.ov_sd in - rename ov.ov_overlay_file saved_filename; - printf (f_"Overlay saved as %s [--debug-overlays]\n") saved_filename - ) overlays - ); + if debug_overlays then preserve_overlays overlays source.s_name; message (f_"Finishing off"); delete_target_on_exi...
2019 Oct 09
3
[PATCH] v2v: Output saved overlays in a machine-readable fashion
...-815,13 +815,28 @@ and actual_target_size target_file disk_stats = (* Save overlays if --debug-overlays option was used. *) and preserve_overlays overlays src_name = - List.iter ( - fun ov -> - let saved_filename = - sprintf "%s/%s-%s.qcow2" overlay_dir src_name ov.ov_sd in - rename ov.ov_overlay_file saved_filename; - info (f_"Overlay saved as %s [--debug-overlays]") saved_filename - ) overlays + let filenames = List.map ( + fun ov -> + let saved_filename = + sprintf "%s/%s-%s.qcow2" overlay_dir src_nam...
2020 Apr 06
4
[v2v PATCH 1/2] v2v: nbdkit: change base dir for nbdkit sockets/pidfiles
Since this new temporary directory will contain UNIX sockets for communicating with nbdkit, then its path must not be too long. Use the existing directory that libguestfs exposes for this, i.e. sockdir. --- v2v/nbdkit.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/v2v/nbdkit.ml b/v2v/nbdkit.ml index 65317f9b..46b20c9d 100644 --- a/v2v/nbdkit.ml +++ b/v2v/nbdkit.ml
2020 Apr 06
0
[v2v PATCH 2/2] Consolidate handling of temporary files/dirs
...; - t in object inherit output @@ -60,8 +50,12 @@ object method supported_firmware = [ TargetBIOS; TargetUEFI ] method prepare_targets _ overlays _ = - (* Write targets to a temporary local file - see above for reason. *) - List.map (fun (_, ov) -> TargetFile (tmpdir // ov.ov_sd)) overlays + (* Although glance can slurp in a stream from stdin, unfortunately + * 'qemu-img convert' cannot write to a stream (although I guess + * it could be implemented at least for raw). Therefore we have + * to write to a temporary file. XXX + *) + List.map (f...
2015 Oct 20
1
[PATCH v3 02/13] v2v: factor out overlay creation
...nd fill in a few other fields. - *) - let overlays = - mapi ( - fun i (overlay_file, source) -> - let sd = "sd" ^ drive_name i in - let dev = "/dev/" ^ sd in - let vsize = g#blockdev_getsize64 dev in - - { ov_overlay_file = overlay_file; ov_sd = sd; - ov_virtual_size = vsize; ov_source = source } - ) overlays in - (* Work out where we will write the final output. Do this early * just so we can display errors to the user before doing too much * work. @@ -385,6 +338,7 @@ let rec main () = (* Save overlays if --...
2015 Oct 20
1
[PATCH v3 03/13] v2v: factor out populating targets list
...try to autodetect the format when reading it.\n\nHowever because the input format was not defined, we do not know what output format you want to use. You have two choices: either define the original format in the source metadata, or use the '-of' option to force the output format") ov.ov_sd ov.ov_source.s_qemu_uri in - - (* What really happens here is that the call to #disk_create - * below fails if the format is not raw or qcow2. We would - * have to extend libguestfs to support further formats, which - * is trivial, but we'd want to check that the...
2019 Oct 10
0
Re: [PATCH] v2v: Output saved overlays in a machine-readable fashion
...et_size target_file disk_stats = > > (* Save overlays if --debug-overlays option was used. *) > and preserve_overlays overlays src_name = > - List.iter ( > - fun ov -> > - let saved_filename = > - sprintf "%s/%s-%s.qcow2" overlay_dir src_name ov.ov_sd in > - rename ov.ov_overlay_file saved_filename; > - info (f_"Overlay saved as %s [--debug-overlays]") saved_filename > - ) overlays > + let filenames = List.map ( > + fun ov -> > + let saved_filename = > + sprintf "%s/%s...
2015 Aug 11
0
[PATCH v2 03/17] v2v: factor out overlay creation
...s_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 in + + { ov_overlay_file = overlay_file; ov_sd = sd; + ov_virtual_size = vsize; ov_source = source } + ) src_disks + let rec main () = (* Handle the command line. *) let input, output, @@ -122,40 +161,7 @@ let rec main () = let source = open_source input print_source in let source = amend_source source output_name network...
2015 Oct 20
1
[PATCH v3 07/13] v2v: factor out copying of output data
...; () - | Some estimate, Some actual -> - let pc = - 100. *. Int64.to_float estimate /. Int64.to_float actual - -. 100. in - printf "%s: estimate %Ld (%s) versus actual %Ld (%s): %.1f%%" - t.target_overlay.ov_sd - estimate (human_size estimate) - actual (human_size actual) - pc; - if pc < 0. then printf " ! ESTIMATE TOO LOW !"; - printf "\n%!"; - ); - - t - ) targets - ) (* do_copy *) in...
2018 Mar 15
0
[PATCH 2/2] v2v: Add --print-target to display overlay and target information.
...: bool; + print_target : bool; root_choice : Types.root_choice; } diff --git a/v2v/types.ml b/v2v/types.ml index b89bd2fe2..c1f36fdb1 100644 --- a/v2v/types.ml +++ b/v2v/types.ml @@ -281,11 +281,10 @@ type overlay = { } let string_of_overlay ov = - sprintf "\ -ov_overlay_file = %s -ov_sd = %s -ov_virtual_size = %Ld -ov_source = %s + sprintf " overlay file: %s + overlay device name: %s +overlay virtual disk size: %Ld + overlay source qemu URI: %s " ov.ov_overlay_file ov.ov_sd @@ -304,12 +303,9 @@ and target_file = | TargetURI of string l...
2020 Jan 28
2
[v2v PATCH 1/2] Add back guestcaps as parameter of output#prepare_targets
...@@ -59,7 +59,7 @@ object method supported_firmware = [ TargetBIOS; TargetUEFI ] - method prepare_targets _ overlays = + method prepare_targets _ overlays _ = (* Write targets to a temporary local file - see above for reason. *) List.map (fun (_, ov) -> TargetFile (tmpdir // ov.ov_sd)) overlays diff --git a/v2v/output_json.ml b/v2v/output_json.ml index 29c4a1d0..b23420a7 100644 --- a/v2v/output_json.ml +++ b/v2v/output_json.ml @@ -71,7 +71,7 @@ class output_json dir json_options = object method as_options = sprintf "-o json -os %s" dir - method prepare_targe...
2018 Mar 16
7
[PATCH v2 0/5] Add --print-target with machine-readable version.
This adds --print-target. In addition, v2 provides a machine-readable version (in JSON format). All of the record -> JSON boilerplate in this patch could be eliminated if we moved the baseline to OCaml 4.02. Rich.
2016 May 22
0
[PATCH 2/2] ocaml tools: Use a common debug function.
...client or idmapd is not configured properly.\n\nYou will have to chown the files that virt-v2v creates after the run, otherwise RHEV-M will not be able to import the VM.") uid gid @@ -233,9 +229,7 @@ object fun ({ target_overlay = ov } as t, image_uuid, vol_uuid) -> let ov_sd = ov.ov_sd in let target_file = images_dir // image_uuid // vol_uuid in - - if verbose () then - eprintf "RHEV: will export %s to %s\n%!" ov_sd target_file; + debug "RHEV: will export %s to %s" ov_sd target_file; { t with targ...
2016 May 22
4
ocaml tools: Use a common debug function.
Add a Common_utils.debug function for printing messages only when in verbose mode. Rich.
2018 Mar 15
3
[PATCH 0/2] v2v: Add --print-target to display overlay and target information.
RHV was connecting to the VMware source in order to find out the virtual disk size of the source disk(s), duplicating logic that virt-v2v already provides. This makes that information available using a new ‘virt-v2v --print-target option’. Note in order to get all the information, this has to actually perform the conversion step, so it takes 30 seconds or so before we reach the point where the
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
2017 Dec 07
1
[PATCH] v2v: -o null: Use the qemu null device driver.
..."null." in - rmdir_on_exit t; - t in object inherit output @@ -44,13 +51,25 @@ object method supported_firmware = [ TargetBIOS; TargetUEFI ] method prepare_targets source targets = - List.map ( - fun t -> - let target_file = tmpdir // t.target_overlay.ov_sd in - { t with target_file = target_file } - ) targets + let json_params = [ + "file.driver", JSON.String "null-co"; + "file.size", JSON.String "1E"; + ] in + let target_file = "json:" ^ JSON.string_of_doc json_params in...
2020 Apr 06
0
[PATCH virt-v2v v2 2/2] v2v: Allow large temporary directory to be set on a global basis.
...n unlink_on_exit overlay_file; (* There is a specific reason to use the newer qcow2 variant: @@ -823,7 +821,7 @@ and preserve_overlays overlays src_name = List.iter ( fun ov -> let saved_filename = - sprintf "%s/%s-%s.qcow2" overlay_dir src_name ov.ov_sd in + sprintf "%s/%s-%s.qcow2" large_tmpdir src_name ov.ov_sd in rename ov.ov_overlay_file saved_filename; info (f_"Overlay saved as %s [--debug-overlays]") saved_filename ) overlays -- 2.25.0