search for: populate_overlays

Displaying 16 results from an estimated 16 matches for "populate_overlays".

2015 Oct 20
1
[PATCH v3 10/13] v2v: factor out opening and populating guestfs handle
...ue; - 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 @@ and init_targets overlays source output output_format = output#prepare_targets source targets +and open_guestfs () = + (* Open the guestfs handle. *) + let g = new G.guestfs () in + g#set_identifier "v2v"; + if trace () then...
2015 Oct 21
1
[PATCH] v2v: move open_guestfs to Types
...diff --git a/v2v/v2v.ml b/v2v/v2v.ml index 333ece0..88ae409 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -76,6 +76,8 @@ let rec main () = ); let g = open_guestfs () in + g#set_identifier "v2v"; + g#set_network true; (match conversion_mode with | Copying (overlays, _) -> populate_overlays g overlays | In_place -> populate_disks g source.s_disks @@ -284,15 +286,6 @@ and init_targets overlays source output output_format = output#prepare_targets source targets -and open_guestfs () = - (* Open the guestfs handle. *) - let g = new G.guestfs () in - g#set_identifier &quot...
2015 Aug 11
0
[PATCH v2 15/17] v2v: add --in-place mode
..._copy, network_map, no_trim, + debug_gc, debug_overlays, do_copy, in_place, network_map, no_trim, output_alloc, output_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&q...
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 ---
2019 Oct 11
0
Re: [PATCH] v2v: Output saved overlays in a machine-readable fashion
...al "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 real do_convert function takes the source struct as parameter, but i...
2015 Oct 20
2
[PATCH v3 11/13] v2v: add --in-place mode
...n + + let guestfs_kind = (match conversion_mode with + | Copying (_, _) -> "overlay" + | In_place -> "source VM" + ) in + + message (f_"Opening the %s") guestfs_kind; let g = open_guestfs () in - populate_overlays g overlays; + (match conversion_mode with + | Copying (overlays, _) -> populate_overlays g overlays + | In_place -> populate_disks g source.s_disks + ); g#launch (); @@ -72,9 +90,16 @@ let rec main () = let mpstats = get_mpstats g in check_free_space mpstats; - check_tar...
2015 Aug 27
1
Re: [PATCH v2 15/17] v2v: add --in-place mode
...ersion_mode = if not in_place then Copying ( let overlays = create_overlays source.s_disks in let targets = init_targets overlays source output output_format in overlays, targets) else In_place in ... (match conversion_mode with Copying (overlays, _) -> populate_overlays g overlays In_place -> populate_disks g source.s_disks ); ... match conversion_mode with | In_place -> message (f_"Finishing off"); exit 0 | Copying (overlays, targets) -> (* rest of main function follows here ... *) > > (2) v2v.ml calls...
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
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
2016 Dec 12
0
Re: libguestfs error: bridge 'virbr0' not found
...v2v.ml index d94a704..55c32ed 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -76,7 +76,6 @@ let rec main () = let g = open_guestfs ~identifier:"v2v" () in g#set_memsize (g#get_memsize () * 8 / 5); - g#set_network true; (match conversion_mode with | Copying (overlays, _) -> populate_overlays g overlays | In_place -> populate_disks g source.s_disks -- 2.10.2 -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with...
2019 Oct 11
2
Re: [PATCH] v2v: Output saved overlays in a machine-readable fashion
...ject 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 real do_convert function > takes the s...
2015 Nov 10
0
[PATCH 4/4] mllib, v2v: Allow open_guestfs to set the handle identifier.
...c main () = | In_place -> message (f_"Opening the source VM") ); - let g = open_guestfs () in - g#set_identifier "v2v"; + let g = open_guestfs ~identifier:"v2v" () in g#set_network true; (match conversion_mode with | Copying (overlays, _) -> populate_overlays g overlays diff --git a/v2v/windows.ml b/v2v/windows.ml index d3bc5d9..b7447a5 100644 --- a/v2v/windows.ml +++ b/v2v/windows.ml @@ -72,8 +72,7 @@ let rec copy_virtio_drivers g inspect virtio_win driverdir = ) else if is_regular_file virtio_win then ( try - let g2 = open_guestfs () i...
2016 Dec 11
2
libguestfs error: bridge 'virbr0' not found
Hey, I am getting this error after using virt-v2v-copy-to-local and trying to run: $ virt-v2v -i libvirtxml rhel7.xml -o local -os /var/tmp -of raw I try to set: export LIBGUESTFS_BACKEND_SETTINGS=virbr0=ovirtmgmt with no success and the file /etc/qemu/bridge.conf contains: allow virbr0 it only worked after creating the bridge, is there other way to import without creating the bridge? Thank
2019 Oct 15
0
Re: [PATCH] v2v: Output saved overlays in a machine-readable fashion
...do that :( > > > What you want -- copy done elsewhere, convert in place, create metadata -- > > is a very different flow. It could look something like this: > > > > * let overlays = create_overlays source.s_disks in > > let g = Guestfs.guestfs () in > > populate_overlays g overlays > > let inspect = Inspect_source.inspect_source g in > > let guestcaps = do_convert g inspect output in > > let targets = output#prepare_targets overlays in > > for each overlay: qemu-img commit it > > output#create_metadata source targets guestcap...
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 Nov 10
7
[PATCH 0/4]: mllib: Add 'may' function, and refactoring.
The 'may' function is a higher-order function (HOF) that replaces: match x with | None -> () | Some x -> f x with: may f x The idea comes from lablgtk (OCaml Gtk bindings) where it is widely used. If this change is clearer than previous code, then this could be used in many more places. However I previously steered clear from using HOFs like this because they can be