search for: src_disks

Displaying 20 results from an estimated 21 matches for "src_disks".

2015 Oct 20
2
[PATCH v3 11/13] v2v: add --in-place mode
...) + ); + message (f_"Finishing off") and open_source input print_source = message (f_"Opening the source %s") input#as_options; @@ -269,6 +299,17 @@ and populate_overlays (g:G.guestfs) overlays = ~copyonread:true ) overlays +and populate_disks (g:G.guestfs) src_disks = + List.iter ( + fun ({s_qemu_uri = qemu_uri; s_format = format}) -> + match format with + | None -> + g#add_drive_opts qemu_uri ~cachemode:"unsafe" ~discard:"besteffort" + | Some fmt -> + g#add_drive_opts qemu_uri ~format:fmt ~cachemod...
2015 Oct 20
1
[PATCH v3 02/13] v2v: factor out overlay creation
...used. *) if debug_overlays then ( + let overlay_dir = (new Guestfs.guestfs ())#get_cachedir () in List.iter ( fun ov -> let saved_filename = @@ -460,6 +414,45 @@ and amend_source source output_name network_map = { source with s_nics = nics } +and create_overlays src_disks = + (* Create a qcow2 v3 overlay to protect the source image(s). There + * is a specific reason to use the newer qcow2 variant: Because the + * L2 table can store zero clusters efficiently, and because + * discarded blocks are stored as zero clusters, this should allow us + * to fstrim/bl...
2015 Oct 20
1
[PATCH v3 03/13] v2v: factor out populating targets list
...arget_overlay = ov } - ) overlays in - let targets = output#prepare_targets source targets in - (* Inspection - this also mounts up the filesystems. *) message (f_"Inspecting the overlay"); let inspect = inspect_source g root_choice in @@ -453,6 +417,45 @@ and create_overlays src_disks = ov_virtual_size = vsize; ov_source = source } ) src_disks +and init_targets overlays source output output_format = + (* 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. + *) + message...
2015 Aug 11
0
[PATCH v2 04/17] v2v: factor out populating targets list
...gan@virtuozzo.com> --- v2v/v2v.ml | 73 ++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index b3dfa07..c20cbf0 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -144,40 +144,7 @@ let create_overlays src_disks = ov_virtual_size = vsize; ov_source = source } ) src_disks -let rec main () = - (* Handle the command line. *) - let input, output, - debug_gc, debug_overlays, do_copy, network_map, no_trim, - output_alloc, output_format, output_name, print_source, root_choice = - Cmdline....
2015 Nov 10
3
[PATCH] v2v: Make the interface between cmdline.ml and v2v.ml
I'm interested to hear opinions on whether this makes the code clearer, or not. This is virt-v2v, but many other virt-* tools work the same way, and analogous changes could be made. Currently when command line argument parsing is done in 'cmdline.ml' the list of parsed parameters is passed to the main program in a very long tuple. Each parameter is strongly typed, but not named (so
2015 Aug 11
0
[PATCH v2 03/17] v2v: factor out overlay creation
...----------------- 1 file changed, 42 insertions(+), 49 deletions(-) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index a2cf249..b3dfa07 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -105,6 +105,45 @@ let amend_source source output_name network_map = { source with s_nics = nics } +let create_overlays src_disks = + (* Create a qcow2 v3 overlay to protect the source image(s). There + * is a specific reason to use the newer qcow2 variant: Because the + * L2 table can store zero clusters efficiently, and because + * discarded blocks are stored as zero clusters, this should allow us + * to fstrim/bl...
2015 Aug 11
0
[PATCH v2 15/17] v2v: add --in-place mode
...put_format, output_name, print_source, root_choice diff --git a/v2v/v2v.ml b/v2v/v2v.ml index 1228316..88bbbaa 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -860,10 +860,21 @@ let populate_overlays (g:G.guestfs) overlays = ~copyonread:true ) overlays +let populate_disks (g:G.guestfs) src_disks = + List.iter ( + fun ({s_qemu_uri = qemu_uri; s_format = format}) -> + match format with + | None -> + g#add_drive_opts qemu_uri ~cachemode:"unsafe" ~discard:"besteffort" + | Some fmt -> + g#add_drive_opts qemu_uri ~format:f...
2015 Nov 10
1
[PATCH] v2v: Add --compressed option to produce compressed qcow2 files (RHBZ#1279273).
...do_copy then targets - else copy_targets targets input output output_alloc in + else copy_targets targets input output output_alloc compressed in (* Create output metadata. *) message (f_"Creating output metadata"); @@ -247,7 +248,7 @@ and create_overlays src_disks = ov_virtual_size = vsize; ov_source = source } ) src_disks -and init_targets overlays source output output_format = +and init_targets overlays source output output_format compressed = (* Work out where we will write the final output. Do this early * just so we can display err...
2015 Oct 20
0
Re: [PATCH v3 11/13] v2v: add --in-place mode
...t. I think you should call #keep_serial_console in both cases, since this is controlled by the guest type, not the conversion mode. > - message (f_"Closing the overlay"); > + message (f_"Closing the %s") guestfs_kind; See above. > +and populate_disks (g:G.guestfs) src_disks = As far as I know, the type annotation here should not be necessary. But if it is necessary, then put some spaces in, ie: ... (g : G.guestfs) ... > + List.iter ( > + fun ({s_qemu_uri = qemu_uri; s_format = format}) -> > + match format with > + | No...
2015 Oct 21
2
[PATCH] v2v: use open_guestfs everywhere
...etadata : source -> target list -> target_buses -> guestcaps -> inspect -> target_firmware -> unit method keep_serial_console = true end diff --git a/v2v/v2v.ml b/v2v/v2v.ml index 88ae409..2f473eb 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -217,7 +217,7 @@ and create_overlays src_disks = * data 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 overlay_dir = (open_guestfs ())#get_cachedir () in List.mapi ( fun i ({ s_qemu_uri = qemu_uri;...
2015 Oct 20
5
[PATCH v4 0/3] v2v: add --in-place mode
This series is an 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. Roman Kagan (3): v2v: add --in-place mode v2v: document --in-place v2v: add test for --in-place ---
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 Oct 21
0
Re: [PATCH] v2v: use open_guestfs everywhere
...-> target_buses -> guestcaps -> inspect -> target_firmware -> unit > method keep_serial_console = true > end > diff --git a/v2v/v2v.ml b/v2v/v2v.ml > index 88ae409..2f473eb 100644 > --- a/v2v/v2v.ml > +++ b/v2v/v2v.ml > @@ -217,7 +217,7 @@ and create_overlays src_disks = > * data 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 overlay_dir = (open_guestfs ())#get_cachedir () in > List.mapi ( >...
2015 Nov 10
1
[PATCH] OCaml tools: use open_guestfs everywhere
...n - if trace () then g#set_trace true; - if verbose () then g#set_verbose true; + let g = open_guestfs () in add g dryrun; g#launch (); diff --git a/v2v/v2v.ml b/v2v/v2v.ml index dabec7f..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...
2015 Nov 19
4
[PATCH 0/4] v2v: Add a new tool virt-v2v-copy-to-local to handle Xen and ESXi
It turns out that RHEL 5 Xen conversions don't work if the source disk is located on a block device. See patch 1/4 for the gory details. This patch series proposes a new tool called virt-v2v-copy-to-local which essentially is a way to make new virt-v2v work like the old virt-v2v, ie. copy first, convert after. Of course this is very slow and would only be used as a last resort, but I
2016 May 23
0
[PATCH 5/5] mllib: add a new run_command helper
...ignore (shell_command cmd); + let cmd = [| "umount"; mp |] in + ignore (run_command cmd); try rmdir mp with _ -> () ); diff --git a/v2v/v2v.ml b/v2v/v2v.ml index b332ced..81aec7e 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -226,10 +226,9 @@ and create_overlays src_disks = "compat=1.1" ^ (match format with None -> "" | Some fmt -> ",backing_fmt=" ^ fmt) in - let cmd = - sprintf "qemu-img create -q -f qcow2 -b %s -o %s %s" - (quote qemu_uri) (quot...
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
2016 May 22
0
[PATCH 2/2] ocaml tools: Use a common debug function.
...gets @@ -156,7 +155,7 @@ and open_source cmdline input = exit 0 ); - if verbose () then printf "%s%!" (string_of_source source); + debug "%s" (string_of_source source); (match source.s_hypervisor with | OtherHV hv -> @@ -230,7 +229,7 @@ and create_overlays src_disks = let cmd = sprintf "qemu-img create -q -f qcow2 -b %s -o %s %s" (quote qemu_uri) (quote options) overlay_file in - if verbose () then printf "%s\n%!" cmd; + debug "%s" cmd; if Sys.command cmd <> 0 then e...
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 Nov 01
1
[PATCH UNFINISHED] v2v: Split up huge manual page into smaller pages.
This patch is incomplete, but early feedback would be welcome. Rich.