search for: conversion_mode

Displaying 20 results from an estimated 47 matches for "conversion_mode".

2015 Oct 20
2
[PATCH v3 11/13] v2v: add --in-place mode
...--git a/v2v/v2v.ml b/v2v/v2v.ml index 23bd708..26a9b64 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -41,12 +41,16 @@ let print_mpstat chan { mp_dev = dev; mp_path = path; fprintf chan " bsize=%Ld blocks=%Ld bfree=%Ld bavail=%Ld\n" s.G.bsize s.G.blocks s.G.bfree s.G.bavail +type conversion_mode = + | Copying of overlay list * target list + | In_place + let () = Random.self_init () let rec main () = (* Handle the command line. *) let input, output, - debug_overlays, do_copy, network_map, no_trim, + debug_overlays, do_copy, in_place, network_map, no_trim, output_a...
2015 Oct 20
0
Re: [PATCH v3 11/13] v2v: add --in-place mode
Can you repost the final 3 patches, rebased on top of current master? More comments below ... On Tue, Oct 20, 2015 at 04:08:19PM +0300, Roman Kagan wrote: > + let guestfs_kind = (match conversion_mode with > + | Copying (_, _) -> "overlay" > + | In_place -> "source VM" > + ) in > + > + message (f_"Opening the %s") guestfs_kind; This is a bit cleaner if written as: (match conversio...
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 27
1
Re: [PATCH v2 15/17] v2v: add --in-place mode
...te to look at. At the moment, it's (sort of) obvious that in_place => overlays = targets = [] but we're not using the compiler to enforce that, so it could break in future. It can be made type-safe without a huge amount of work. Something like this. First define a new type: type conversion_mode = | Copying of overlay list * target list | In_place Then change the code to look like below (I didn't change all of it, but it should be fairly obvious from the examples here): let conversion_mode = if not in_place then Copying ( let overlays = create_overlays source.s...
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 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
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.
2015 Oct 21
1
[PATCH] v2v: move open_guestfs to Types
...on options (e.g. debug, tracing) + * already set. + *) 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. *)...
2018 Mar 15
0
[PATCH 2/2] v2v: Add --print-target to display overlay and target information.
...ov_overlay_file - t.target_overlay.ov_source.s_qemu_uri type target_firmware = TargetBIOS | TargetUEFI diff --git a/v2v/v2v.ml b/v2v/v2v.ml index 75936c501..abb531c6f 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -150,6 +150,22 @@ let rec main () = g#shutdown (); g#close (); + (match conversion_mode with + | In_place -> () + | Copying (overlays, targets) -> + (* Print overlays/targets and stop. *) + if cmdline.print_target then ( + printf (f_"Overlay and Target information (--print-target option):\n"); + printf "\n"; + List.iter ( +...
2017 May 22
1
[PATCH] v2v: add crypto support (RHBZ#1451665)
...nce the arguments. *) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index 8cf1fad..59f5ef1 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -86,6 +86,9 @@ let rec main () = g#launch (); + (* Decrypt the disks. *) + inspect_decrypt g; + (* Inspection - this also mounts up the filesystems. *) (match conversion_mode with | Copying _ -> message (f_"Inspecting the overlay") diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod index f6d196f..c255c0d 100644 --- a/v2v/virt-v2v.pod +++ b/v2v/virt-v2v.pod @@ -302,6 +302,17 @@ Save the overlay file(s) created during conversion. This option is only used...
2020 Sep 16
2
Re: virt-v2v: Virtio-Scsi patch
...- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -88,6 +88,7 @@ let rec main () =    let g = open_guestfs ~identifier:"v2v" () in    g#set_memsize (g#get_memsize () * 14 / 5); +  g#set_smp 4;    (* The network is only used by the unconfigure_vmware () function. *)    g#set_network true;    (match conversion_mode with No commandline flag or so (for now). > > - - - > > I think this patch as it stands has two problems: > > (a) It should be split up into 3 patches. > > Patch #1 would contain the change to v2v/linux_kernels.mli and > v2v/linux_kernels.ml. IMHO this patch #1 would b...
2018 Aug 14
0
[PATCH] v2v: Verify that ’source.s_disks.s_disk_id‘s are all unique.
.../v2v.ml b/v2v/v2v.ml index 09bc4f37d..1775200d3 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -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 i...
2020 Sep 18
0
[PATCH v2v] v2v: Set the number of vCPUs to same as host number of pCPUs.
...fs ~identifier:"v2v" () in g#set_memsize (g#get_memsize () * 14 / 5); + (* Setting the number of vCPUs allows parallel mkinitrd. *) + g#set_smp (Sysconf.nr_processors_online ()); (* The network is only used by the unconfigure_vmware () function. *) g#set_network true; (match conversion_mode with -- 2.27.0
2016 Dec 12
0
Re: libguestfs error: bridge 'virbr0' not found
...changed, 1 deletion(-) diff --git a/v2v/v2v.ml b/v2v/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 co...
2016 Feb 09
0
[PATCH 4/4] v2v: in-place: request caps based on source config
...+ b/v2v/v2v.ml @@ -82,11 +82,17 @@ let rec main () = ); let keep_serial_console = output#keep_serial_console in - let rcaps = { - rcaps_block_bus = None; - rcaps_net_bus = None; - rcaps_video = None; - } in + let rcaps = + match conversion_mode with + | Copying (_, _) -> + { + rcaps_block_bus = None; + rcaps_net_bus = None; + rcaps_video = None; + } + | In_place -> + rcaps_from_source source + in let guestcaps = do_convert g inspect source keep_serial_console rcaps in g#...
2016 Feb 20
0
[PATCH v2 4/4] v2v: in-place: request caps based on source config
...+ b/v2v/v2v.ml @@ -82,11 +82,17 @@ let rec main () = ); let keep_serial_console = output#keep_serial_console in - let rcaps = { - rcaps_block_bus = None; - rcaps_net_bus = None; - rcaps_video = None; - } in + let rcaps = + match conversion_mode with + | Copying (_, _) -> + { + rcaps_block_bus = None; + rcaps_net_bus = None; + rcaps_video = None; + } + | In_place -> + rcaps_from_source source + in let guestcaps = do_convert g inspect source keep_serial_console rcaps in g#...
2015 Nov 10
0
[PATCH 4/4] mllib, v2v: Allow open_guestfs to set the handle identifier.
...a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -74,8 +74,7 @@ let rec 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 vir...
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
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
2017 Feb 22
0
[PATCH 1/4] v2v: Pass output object into the conversion module.
...e [inspect_fn] function. *) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index ee00d2e..b9fb759 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -103,7 +103,6 @@ let rec main () = (* Conversion. *) let guestcaps = - let keep_serial_console = output#keep_serial_console in let rcaps = match conversion_mode with | Copying _ -> @@ -111,7 +110,7 @@ let rec main () = | In_place -> rcaps_from_source source in - do_convert g inspect source keep_serial_console rcaps in + do_convert g inspect source output rcaps in g#umount_all (); @@ -549,7 +548,7 @@ and check_ta...