search for: ov_virtual_size

Displaying 20 results from an estimated 57 matches for "ov_virtual_size".

2015 Oct 20
1
[PATCH v3 07/13] v2v: factor out copying of output data
...;full" - | _ -> None (* ignore -oa flag for other formats *) in - let compat = - match t.target_format with "qcow2" -> Some "1.1" | _ -> None in - output#disk_create - t.target_file t.target_format t.target_overlay.ov_virtual_size - ?preallocation ?compat; - - let cmd = - sprintf "qemu-img convert%s -n -f qcow2 -O %s %s %s" - (if not (quiet ()) then " -p" else "") - (quote t.target_format) (quote overlay_file) - (quote t.targe...
2015 Oct 20
1
[PATCH v3 02/13] v2v: factor out overlay creation
...fields. - *) - let overlays = - mapi ( - fun i (overlay_file, source) -> - let sd = "sd" ^ drive_name i in - let dev = "/dev/" ^ sd in - let vsize = g#blockdev_getsize64 dev in - - { ov_overlay_file = overlay_file; ov_sd = sd; - ov_virtual_size = vsize; ov_source = source } - ) overlays in - (* 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. @@ -385,6 +338,7 @@ let rec main () = (* Save overlays if --debug-overlays option was used. *...
2020 Sep 01
2
[PATCH v2v] v2v: Allow output to block devices (RHBZ#1868690).
...- | _ -> None (* ignore -oa flag for other formats *) in - let compat = - match t.target_format with "qcow2" -> Some "1.1" | _ -> None in - output#disk_create filename t.target_format - t.target_overlay.ov_virtual_size - ?preallocation ?compat + if not (is_block_device filename) then ( + (* It turns out that libguestfs's disk creation code is + * considerably more flexible and easier to use than + * qemu-img, so create the disk explicitly...
2015 Aug 11
0
[PATCH v2 03/17] v2v: factor out overlay creation
...y_file) then + error (f_"internal error: qemu-img did not create overlay with backing file"); + + let sd = "sd" ^ drive_name i in + + let vsize = (new G.guestfs ())#disk_virtual_size overlay_file in + + { ov_overlay_file = overlay_file; ov_sd = sd; + ov_virtual_size = vsize; ov_source = source } + ) src_disks + let rec main () = (* Handle the command line. *) let input, output, @@ -122,40 +161,7 @@ let rec main () = let source = open_source input print_source in let source = amend_source source output_name network_map in - - (* Create a qcow2...
2020 Sep 01
2
Re: [PATCH v2v] v2v: Allow output to block devices (RHBZ#1868690).
...a flag for other formats *) in > > - let compat = > > - match t.target_format with "qcow2" -> Some "1.1" | _ -> None in > > - output#disk_create filename t.target_format > > - t.target_overlay.ov_virtual_size > > - ?preallocation ?compat > > + if not (is_block_device filename) then ( > > + (* It turns out that libguestfs's disk creation code is > > + * considerably more flexible and easier to use than > > +...
2020 Sep 01
0
Re: [PATCH v2v] v2v: Allow output to block devices (RHBZ#1868690).
...t; None (* ignore -oa flag for other formats *) in > - let compat = > - match t.target_format with "qcow2" -> Some "1.1" | _ -> None in > - output#disk_create filename t.target_format > - t.target_overlay.ov_virtual_size > - ?preallocation ?compat > + if not (is_block_device filename) then ( > + (* It turns out that libguestfs's disk creation code is > + * considerably more flexible and easier to use than > + * qemu-img, so c...
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
2014 Sep 23
0
[PATCH 02/13] syntax-check: fix error_message_period check
...diff --git a/v2v/lib_ovf.ml b/v2v/lib_ovf.ml index fcba087..dec2ef8 100644 --- a/v2v/lib_ovf.ml +++ b/v2v/lib_ovf.ml @@ -161,7 +161,7 @@ let create_meta_files verbose output_alloc sd_uuid image_uuid targets = fun ({ target_overlay = ov } as t) -> let size_in_sectors = if ov.ov_virtual_size &^ 511L <> 0L then - error (f_"the virtual size of the input disk %s is not an exact multiple of 512 bytes. The virtual size is: %Ld.\n\nThis probably means something unexpected is going on, so please file a bug about this issue.") + error (f_"the virtual...
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 20
1
[PATCH v3 03/13] v2v: factor out populating targets list
...- ) overlays in - let targets = output#prepare_targets source targets in - (* Inspection - this also mounts up the filesystems. *) message (f_"Inspecting the overlay"); let inspect = inspect_source g root_choice in @@ -453,6 +417,45 @@ and create_overlays src_disks = ov_virtual_size = vsize; ov_source = source } ) src_disks +and 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. + *) + message (f_"Initializing the t...
2015 Aug 11
0
[PATCH v2 04/17] v2v: factor out populating targets list
...--- 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 = - Cmdline.parse_cmdline () in - - (*...
2018 Jun 18
1
[PATCH] v2v: Add <Disk ovf:capacity> attribute containing disk virtual size.
...l @@ -835,6 +835,7 @@ and add_disks targets guestcaps output_alloc sd_uuid image_uuids vol_uuids | OVirt -> image_uuid | RHVExportStorageDomain -> vol_uuid); "ovf:size", Int64.to_string size_gb; + "ovf:capacity", Int64.to_string ov.ov_virtual_size; "ovf:fileRef", fileref; "ovf:parentRef", ""; "ovf:vm_snapshot_id", uuidgen (); diff --git a/v2v/test-v2v-o-rhv.ovf.expected b/v2v/test-v2v-o-rhv.ovf.expected index 342eb99d3..1deec9c9d 100644 --- a/v2v/test-v2v-o-rhv.ovf.expe...
2020 Sep 01
0
Re: [PATCH v2v] v2v: Allow output to block devices (RHBZ#1868690).
...mats *) in > > > - let compat = > > > - match t.target_format with "qcow2" -> Some "1.1" | _ -> None in > > > - output#disk_create filename t.target_format > > > - t.target_overlay.ov_virtual_size > > > - ?preallocation ?compat > > > + if not (is_block_device filename) then ( > > > + (* It turns out that libguestfs's disk creation code is > > > + * considerably more flexible and easier to use...
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.
2018 Feb 22
0
[PATCH 5/5] v2v: Add -o rhv-upload output mode.
...n + sprintf "%s-%03d" source.s_name id in + + let disk_format = + match output_format with + | `Raw -> "types.DiskFormat.RAW" + | `COW -> "types.DiskFormat.COW" in + + (* This is the virtual size in bytes. *) + let disk_size = target.target_overlay.ov_virtual_size in + + let code = + python_imports ^ + python_connect tmpdir conn output_password ^ + python_create_one_disk disk_name disk_format + output_alloc output_storage disk_size in + match run_python code with + | [id] -> id + | _ -> error (f_"rhv-upload:...
2018 Jun 18
1
[PATCH] v2v: <File ovf:size> changed to the actual size (if known).
..._alloc sd_uuid image_uuids vol_uuids (* Add disk to <References/> node. *) let disk = - e "File" [ + let attrs = ref [ "ovf:href", fileref; "ovf:id", vol_uuid; - "ovf:size", Int64.to_string ov.ov_virtual_size; (* NB: in bytes *) "ovf:description", generated_by; - ] [] in + ] in + (match t.target_actual_size with + | None -> () + | Some actual_size -> + List.push_back attrs ("ovf:size", Int64.to_string actual_size) +...
2015 Nov 10
1
[PATCH] v2v: Add --compressed option to produce compressed qcow2 files (RHBZ#1279273).
...- else copy_targets targets input output output_alloc in + else copy_targets targets input output output_alloc compressed in (* Create output metadata. *) message (f_"Creating output metadata"); @@ -247,7 +248,7 @@ and create_overlays src_disks = ov_virtual_size = vsize; ov_source = source } ) src_disks -and init_targets overlays source output output_format = +and init_targets overlays source output output_format compressed = (* Work out where we will write the final output. Do this early * just so we can display errors to the user before doin...
2018 Mar 15
0
[PATCH 2/2] v2v: Add --print-target to display overlay and target information.
...rint_target : bool; root_choice : Types.root_choice; } diff --git a/v2v/types.ml b/v2v/types.ml index b89bd2fe2..c1f36fdb1 100644 --- a/v2v/types.ml +++ b/v2v/types.ml @@ -281,11 +281,10 @@ type overlay = { } let string_of_overlay ov = - sprintf "\ -ov_overlay_file = %s -ov_sd = %s -ov_virtual_size = %Ld -ov_source = %s + sprintf " overlay file: %s + overlay device name: %s +overlay virtual disk size: %Ld + overlay source qemu URI: %s " ov.ov_overlay_file ov.ov_sd @@ -304,12 +303,9 @@ and target_file = | TargetURI of string let string_of_target t...
2018 Feb 27
0
[PATCH v2 3/3] v2v: Add -o rhv-upload output mode.
...n + sprintf "%s-%03d" source.s_name id in + + let disk_format = + match output_format with + | `Raw -> "types.DiskFormat.RAW" + | `COW -> "types.DiskFormat.COW" in + + (* This is the virtual size in bytes. *) + let disk_size = target.target_overlay.ov_virtual_size in + + let code = + python_imports ^ + python_connect tmpdir conn output_password ^ + python_create_one_disk disk_name disk_format + output_alloc sd_id disk_size in + match run_python code with + | [id] -> id + | _ -> + error (f_"rhv-upload: cre...
2015 Nov 10
1
[PATCH] OCaml tools: use open_guestfs everywhere
...reate overlay with backing file"); let sd = "sd" ^ drive_name i in - let vsize = (new G.guestfs ())#disk_virtual_size overlay_file in + let vsize = (open_guestfs ())#disk_virtual_size overlay_file in { ov_overlay_file = overlay_file; ov_sd = sd; ov_virtual_size = vsize; ov_source = source } @@ -780,7 +780,7 @@ and copy_targets targets input output output_alloc = * backing file. Just sanity check this here. *) let overlay_file = t.target_overlay.ov_overlay_file in - if not ((new G.guestfs ())#disk_has_backing_file overlay_file)...