search for: create_overlay

Displaying 20 results from an estimated 43 matches for "create_overlay".

Did you mean: create_overlays
2015 Aug 11
0
[PATCH v2 04/17] v2v: factor out populating targets list
...an Kagan <rkagan@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 = -...
2015 Aug 27
2
Re: [PATCH v2 15/17] v2v: add --in-place mode
On Tue, Aug 11, 2015 at 08:00:34PM +0300, Roman Kagan wrote: > + let overlays = > + if not in_place then create_overlays source.s_disks > + else [] in > + let targets = > + if not in_place then init_targets overlays source output output_format > + else [] in This doesn't solve the problem I raised before which is that overlays and targets should never be empty lists. I think really what s...
2015 Aug 27
1
Re: [PATCH v2 15/17] v2v: add --in-place mode
On Thu, Aug 27, 2015 at 09:39:30PM +0300, Roman Kagan wrote: > On Thu, Aug 27, 2015 at 04:08:43PM +0100, Richard W.M. Jones wrote: > > On Tue, Aug 11, 2015 at 08:00:34PM +0300, Roman Kagan wrote: > > > + let overlays = > > > + if not in_place then create_overlays source.s_disks > > > + else [] in > > > + let targets = > > > + if not in_place then init_targets overlays source output output_format > > > + else [] in > > > > This doesn't solve the problem I raised before which is that overlays &gt...
2015 Oct 20
1
[PATCH v3 02/13] v2v: factor out overlay creation
...(* Sanity check created overlay (see below). *) - if not ((new G.guestfs ())#disk_has_backing_file overlay_file) then - error (f_"internal error: qemu-img did not create overlay with backing file"); - - overlay_file, source - ) source.s_disks in + let overlays = create_overlays source.s_disks in (* Open the guestfs handle. *) message (f_"Opening the overlay"); @@ -100,7 +67,7 @@ let rec main () = if verbose () then g#set_verbose true; g#set_network true; List.iter ( - fun (overlay_file, _) -> + fun ({ov_overlay_file = overlay_file}) -&...
2015 Oct 20
1
[PATCH v3 03/13] v2v: factor out populating targets list
...insertions(+), 37 deletions(-) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index 155eb83..4257b8d 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -58,6 +58,7 @@ let rec main () = let source = open_source input print_source in let source = amend_source source output_name network_map in let overlays = create_overlays source.s_disks in + let targets = init_targets overlays source output output_format in (* Open the guestfs handle. *) message (f_"Opening the overlay"); @@ -75,43 +76,6 @@ let rec main () = g#launch (); - (* Work out where we will write the final output. Do this early -...
2019 Oct 11
0
Re: [PATCH] v2v: Output saved overlays in a machine-readable fashion
...put metadata is read (eg. libvirt XML, VMware VMX) and an internal "source" object is created which models this metadata, plus (almost as a side-effect) links to the disks. In the following discussion remember that "source" == "metadata". * let overlays = create_overlays source.s_disks in let g = Guestfs.guestfs () in populate_overlays g overlays The overlays are created and added as disks to a guestfs handle * let inspect = Inspect_source.inspect_source g in let guestcaps = do_convert g inspect output in This does inspection + conversion. (The r...
2015 Oct 20
1
[PATCH v3 10/13] v2v: factor out opening and populating guestfs handle
...an Kagan <rkagan@virtuozzo.com> --- v2v/v2v.ml | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index c28905d..23bd708 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -60,19 +60,9 @@ let rec main () = let overlays = create_overlays source.s_disks in let targets = init_targets overlays source output output_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 () the...
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 + * t...
2015 Aug 11
0
[PATCH v2 15/17] v2v: add --in-place mode
...etwork_map, no_trim, output_alloc, output_format, output_name, print_source, root_choice = Cmdline.parse_cmdline () in @@ -877,24 +888,35 @@ let main () = let source = open_source input print_source in let source = amend_source source output_name network_map in - let overlays = create_overlays source.s_disks in - let targets = init_targets overlays source output output_format in + let overlays = + if not in_place then create_overlays source.s_disks + else [] in + let targets = + if not in_place then init_targets overlays source output output_format + else [] in - messa...
2015 Nov 10
1
[PATCH] v2v: Add --compressed option to produce compressed qcow2 files (RHBZ#1279273).
...rim, + compressed, debug_overlays, do_copy, in_place, network_map, no_trim, output_alloc, output_format, output_name, print_source, root_choice = Cmdline.parse_cmdline () in @@ -65,7 +65,8 @@ let rec main () = let conversion_mode = if not in_place then ( let overlays = create_overlays source.s_disks in - let targets = init_targets overlays source output output_format in + let targets = + init_targets overlays source output output_format compressed in Copying (overlays, targets) ) else In_place in @@ -132,7 +133,7 @@ let rec main () =...
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
2019 Oct 11
6
Re: [PATCH] v2v: Output saved overlays in a machine-readable fashion
On Thu, Oct 10, 2019 at 03:33:25PM +0100, Richard W.M. Jones wrote: >On Wed, Oct 09, 2019 at 02:19:46PM +0200, Martin Kletzander wrote: >> Even though this option is not to be used according to the manual, it: >> >> a) still might be useful even for machine-readable logs >> >> b) should not break the machine-readable output > >I'm a bit confused what
2020 Feb 10
0
Re: [RFC] lib: allow to specify physical/logical block size for disks
...emode ? safe_strdup (g, data->cachemode) : NULL; > drv->discard = data->discard; > drv->copyonread = data->copyonread; > + drv->pblocksize = data->pblocksize; > + drv->lblocksize = data->lblocksize; > > if (data->readonly) { > if (create_overlay (g, drv) == -1) { > @@ -150,6 +154,8 @@ create_drive_non_file (guestfs_h *g, > drv->cachemode = data->cachemode ? safe_strdup (g, data->cachemode) : NULL; > drv->discard = data->discard; > drv->copyonread = data->copyonread; > + drv->pblocksize = dat...
2015 Oct 20
2
[PATCH v3 11/13] v2v: add --in-place mode
...work_map, no_trim, output_alloc, output_format, output_name, print_source, root_choice = Cmdline.parse_cmdline () in @@ -57,12 +61,26 @@ let rec main () = let source = open_source input print_source in let source = amend_source source output_name network_map in - let overlays = create_overlays source.s_disks in - let targets = init_targets overlays source output output_format in - message (f_"Opening the overlay"); + let conversion_mode = + if not in_place then ( + let overlays = create_overlays source.s_disks in + let targets = init_targets overlays source o...
2015 Aug 27
0
Re: [PATCH v2 15/17] v2v: add --in-place mode
On Thu, Aug 27, 2015 at 04:08:43PM +0100, Richard W.M. Jones wrote: > On Tue, Aug 11, 2015 at 08:00:34PM +0300, Roman Kagan wrote: > > + let overlays = > > + if not in_place then create_overlays source.s_disks > > + else [] in > > + let targets = > > + if not in_place then init_targets overlays source output output_format > > + else [] in > > This doesn't solve the problem I raised before which is that overlays > and targets should never be...
2020 Feb 07
8
[RFC] lib: allow to specify physical/logical block size for disks
...drv->cachemode = data->cachemode ? safe_strdup (g, data->cachemode) : NULL; drv->discard = data->discard; drv->copyonread = data->copyonread; + drv->pblocksize = data->pblocksize; + drv->lblocksize = data->lblocksize; if (data->readonly) { if (create_overlay (g, drv) == -1) { @@ -150,6 +154,8 @@ create_drive_non_file (guestfs_h *g, drv->cachemode = data->cachemode ? safe_strdup (g, data->cachemode) : NULL; drv->discard = data->discard; drv->copyonread = data->copyonread; + drv->pblocksize = data->pblocksize; + drv-...
2015 Oct 21
2
[PATCH] v2v: use open_guestfs everywhere
...virtual create_metadata : 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...
2019 Oct 11
2
Re: [PATCH] v2v: Output saved overlays in a machine-readable fashion
...(eg. libvirt XML, VMware VMX) and an > internal "source" object is created which models this metadata, > plus (almost as a side-effect) links to the disks. In the > following discussion remember that "source" == "metadata". > >* let overlays = create_overlays source.s_disks in > let g = Guestfs.guestfs () in > populate_overlays g overlays > > The overlays are created and added as disks to a guestfs handle > >* let inspect = Inspect_source.inspect_source g in > let guestcaps = do_convert g inspect output in > > This d...
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
2020 Apr 06
0
[v2v PATCH 2/2] Consolidate handling of temporary files/dirs
...with more than 1GB of free space.\n\nSee also the virt-v2v(1) manual, section \"Minimum free space check in the host\".") - overlay_dir (human_size free_space) + 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...