Displaying 15 results from an estimated 15 matches for "init_targets".
2015 Nov 10
1
[PATCH] v2v: Add --compressed option to produce compressed qcow2 files (RHBZ#1279273).
..., 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 () =
let targets =
if not do_copy then targets
-...
2015 Oct 20
1
[PATCH v3 10/13] v2v: factor out opening and populating guestfs handle
...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 true;
- g#set_network true;
- L...
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 happening here is something like this:
(1) Create extra modules:
common.ml - for common fu...
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 27
1
Re: [PATCH v2 15/17] v2v: add --in-place mode
...d 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 empty lists.
>
> Why shouldn't they?
Because the point of using the language is to use...
2015 Oct 20
1
[PATCH v3 03/13] v2v: factor out populating targets list
...v.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
- * just so we can display errors to the user be...
2015 Aug 11
0
[PATCH v2 04/17] v2v: factor out populating targets list
...rbose true;
- 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;
-
- g#launch ();
-
+let 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.
@@ -213,7 +180,43 @@ let rec main () =
target_actual_size = None;
target_overlay = ov }...
2015 Aug 11
0
[PATCH v2 15/17] v2v: add --in-place mode
...at, 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_"Opening the overlay");
+ let gu...
2015 Oct 21
1
[PATCH] v2v: move open_guestfs to Types
...,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 () then g#set_verbose true;
- g#set_n...
2015 Oct 20
2
[PATCH v3 11/13] v2v: add --in-place mode
..., 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_format in
+ Copying (overlays,...
2015 Aug 27
0
Re: [PATCH v2 15/17] v2v: add --in-place mode
...15 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 empty lists.
Why shouldn't they?
I thought the problem was that it was hard to keep track of whether the
empty l...
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 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
---
2017 Dec 08
3
[PATCH v2 0/2] v2v: -o null: Use the qemu null device driver.
This changes the infrastructure to allow the target_file to be
a QEMU URI.
Rich.
2017 Apr 04
1
[PATCH] Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
...nd open_source cmdline input =
(match source.s_hypervisor with
| OtherHV hv ->
- warning (f_"unknown source hypervisor ('%s') in metadata") hv
+ warning (f_"unknown source hypervisor (‘%s’) in metadata") hv
| _ -> ()
);
@@ -323,7 +323,7 @@ and init_targets cmdline output source overlays =
| Some format, _ -> format (* -of overrides everything *)
| None, Some format -> format (* same as backing format *)
| None, None ->
- error (f_"disk %s (%s) has no defined format.\n\nThe input metadata di...