search for: s_disks

Displaying 20 results from an estimated 67 matches for "s_disks".

2018 Aug 14
0
[PATCH] v2v: Verify that ’source.s_disks.s_disk_id‘s are all unique.
...l @@ -31,6 +31,7 @@ open Utils open Cmdline module G = Guestfs +module IntSet = Set.Make(struct let compare = compare type t = int end) (* Conversion mode, either normal (copying) or [--in-place]. *) type conversion_mode = @@ -234,10 +235,15 @@ and open_source cmdline input = if source.s_disks = [] then error (f_"source has no hard disks!"); - List.iter ( - fun disk -> - assert (disk.s_qemu_uri <> ""); - ) source.s_disks; + let () = + let ids = ref IntSet.empty in + List.iter ( + fun { s_qemu_uri; s_disk_id } -> + assert (...
2015 Oct 20
1
[PATCH v3 01/13] v2v: factor out opening input VM
...- (match source.s_hypervisor with - | OtherHV hv -> - warning (f_"unknown source hypervisor ('%s') in metadata") hv - | _ -> () - ); - - assert (source.s_name <> ""); - assert (source.s_memory > 0L); - assert (source.s_vcpu >= 1); - if source.s_disks = [] then - error (f_"source has no hard disks!"); - List.iter ( - fun disk -> - assert (disk.s_qemu_uri <> ""); - ) source.s_disks; - - (* Map source name. *) - let source = - match output_name with - | None -> source - (* Note the s_orig_nam...
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 should be happeni...
2015 Aug 27
1
Re: [PATCH v2 15/17] v2v: add --in-place mode
...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 > > and targe...
2016 Feb 09
0
[PATCH 1/4] v2v: collect source network and video adapter types
...s_vnet_type = Network } in @@ -89,6 +90,7 @@ class input_disk input_format disk = object s_display = Some { s_display_type = Window; s_keymap = None; s_password = None; s_listen = LNone; s_port = None }; + s_video = None; s_sound = None; s_disks = [disk]; s_removables = []; diff --git a/v2v/input_libvirtxml.ml b/v2v/input_libvirtxml.ml index 3537011..c6f7a1f 100644 --- a/v2v/input_libvirtxml.ml +++ b/v2v/input_libvirtxml.ml @@ -140,6 +140,25 @@ let parse_libvirt_xml ?conn xml = None ) in + (* Video adapter. *) + le...
2016 Mar 18
0
[PATCH v4 1/5] v2v: collect source network and video adapter types
...s_vnet_type = Network } in @@ -89,6 +90,7 @@ class input_disk input_format disk = object s_display = Some { s_display_type = Window; s_keymap = None; s_password = None; s_listen = LNone; s_port = None }; + s_video = None; s_sound = None; s_disks = [disk]; s_removables = []; diff --git a/v2v/input_libvirtxml.ml b/v2v/input_libvirtxml.ml index 3537011..9d8963d 100644 --- a/v2v/input_libvirtxml.ml +++ b/v2v/input_libvirtxml.ml @@ -140,6 +140,23 @@ let parse_libvirt_xml ?conn xml = None ) in + (* Video adapter. *) + le...
2016 Feb 20
0
[PATCH v2 1/4] v2v: collect source network and video adapter types
...s_vnet_type = Network } in @@ -89,6 +90,7 @@ class input_disk input_format disk = object s_display = Some { s_display_type = Window; s_keymap = None; s_password = None; s_listen = LNone; s_port = None }; + s_video = None; s_sound = None; s_disks = [disk]; s_removables = []; diff --git a/v2v/input_libvirtxml.ml b/v2v/input_libvirtxml.ml index 3537011..9d8963d 100644 --- a/v2v/input_libvirtxml.ml +++ b/v2v/input_libvirtxml.ml @@ -140,6 +140,23 @@ let parse_libvirt_xml ?conn xml = None ) in + (* Video adapter. *) + le...
2019 Oct 11
0
Re: [PATCH] v2v: Output saved overlays in a machine-readable fashion
...g. 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 real do_convert f...
2019 Oct 11
2
Re: [PATCH] v2v: Output saved overlays in a machine-readable fashion
...re 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 +...
2015 Aug 11
0
[PATCH v2 15/17] v2v: add --in-place mode
...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 - message (f_"Open...
2015 Oct 20
1
[PATCH v3 02/13] v2v: factor out overlay creation
...er errors"); - - (* 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 (...
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 11
0
[PATCH v2 04/17] v2v: factor out populating targets list
...!" - prog Config.package_name Config.package_version Config.host_cpu; - - if debug_gc then - at_exit (fun () -> Gc.compact()); - - 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 - - (* 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_...
2015 Oct 20
1
[PATCH v3 10/13] v2v: factor out opening and populating guestfs handle
...tuozzo.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 () then g#set_verbose...
2015 Oct 20
2
[PATCH v3 11/13] v2v: add --in-place mode
...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 output output_for...
2016 Feb 22
2
Re: [PATCH v2 4/4] v2v: in-place: request caps based on source config
...caps based on source configuration. *) > + > + (* rely on s_controller enum being in ascending preference order, and None > + * being smaller than Some anything *) > + let best_block_type = > + List.fold_left max None > + (List.map (fun sd -> sd.s_controller) source.s_disks) in > + let block_type = > + match best_block_type with > + | Some Source_virtio_blk -> Some Virtio_blk > + | Some Source_SCSI -> None > + | Some Source_IDE -> Some IDE > + | None -> None in > + > + (* rely on s_nic_model enum being in ascending...
2015 Aug 11
0
[PATCH v2 03/17] v2v: factor out overlay creation
...er errors"); - - (* 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"); @@ -164,7 +170,7 @@ let rec main () = if verbose () then g#set_verbose true; g#set_network true; List.iter ( - fun (overlay_file, _) -> + fun...
2016 Feb 20
8
[PATCH v2 0/4] v2v: more control over device types
The decision on which device type to use for disks, network and video cards on output used to be taken deep inside the converting functions. This is not always desirable. In particular, there are scenarios when this decision is made before the convertion takes place. E.g. in in-place mode, the decisions are taken and the output VM configuration is created outside of v2v tool. This patchset
2015 Oct 21
1
[PATCH] v2v: move open_guestfs to Types
...2v/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 "v2v"; - if trace () then g#set_trace true; - if verbose...
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