@@ -181,12 +181,14 @@ and check_guest_free_space inspect mpstats =
let needed_bytes = Int64.of_int needed_megabytes *^ 1024L *^ 1024L in
if free_bytes < needed_bytes then (
let mb i = Int64.to_float i /. 1024. /. 1024. in
- error (f_"not enough free space for conversion on filesystem ‘%s’. %.1f MB free < %d MB needed")
+ error (f_"not enough free space for conversion on filesystem ‘%s’. \
+ %.1f MB free < %d MB needed")
mp_path (mb free_bytes) needed_megabytes
);
(* Not all the filesystems have inode counts. *)
if files > 0L && ffree < needed_inodes then
- error (f_"not enough available inodes for conversion on filesystem ‘%s’. %Ld inodes available < %Ld inodes needed")
+ error (f_"not enough available inodes for conversion on \
+ filesystem ‘%s’. %Ld inodes available < %Ld inodes needed")
mp_path ffree needed_inodes
) mpstats
@@ -210,7 +212,10 @@ and do_fstrim g inspect =
if mounted then (
try g#fstrim "/"
with G.Error msg ->
- warning (f_"fstrim on guest filesystem %s failed. Usually you can ignore this message. To find out more read \"Trimming\" in virt-v2v(1).\n\nOriginal message: %s") dev msg
+ warning (f_"fstrim on guest filesystem %s failed. Usually you \
+ can ignore this message. To find out more read \
@@ -45,8 +45,13 @@ let rec inspect_source root_choice g =
(try g#mount dev mp
with G.Error msg ->
if mp = "/" then ( (* RHBZ#1145995 *)
- if String.find msg "Windows" >= 0 && String.find msg "NTFS partition is in an unsafe state" >= 0 then
- error (f_"unable to mount the disk image for writing. This has probably happened because Windows Hibernation or Fast Restart is being used in this guest. You have to disable this (in the guest) in order to use virt-v2v.\n\nOriginal error message: %s") msg
+ if String.find msg "Windows" >= 0 &&
+ String.find msg "NTFS partition is in an unsafe state" >= 0 then
+ error (f_"unable to mount the disk image for writing. This has \
+ probably happened because Windows Hibernation or \
+ Fast Restart is being used in this guest. You have \
+ to disable this (in the guest) in order to use \
+ virt-v2v.\n\nOriginal error message: %s") msg
else
error "%s" msg
)
@@ -63,7 +68,12 @@ let rec inspect_source root_choice g =
(try g#touch file
with G.Error msg ->
if g#last_errno () = G.Errno.errno_EROFS then
- error (f_"filesystem was mounted read-only, even though we asked for it to be mounted read-write. This usually means that the filesystem was not cleanly unmounted. Possible causes include trying to convert a guest which is running, or using Windows Hibernation or Fast Restart.\n\nOriginal error message: %s") msg
+ error (f_"filesystem was mounted read-only, even though we \
+ asked for it to be mounted read-write. This usually \
+ means that the filesystem was not cleanly unmounted. \
+ Possible causes include trying to convert a guest \
+ which is running, or using Windows Hibernation or \
+ Fast Restart.\n\nOriginal error message: %s") msg
else
error (f_"could not write to the guest filesystem: %s") msg
);
@@ -128,7 +138,12 @@ let rec inspect_source root_choice g =
and choose_root root_choice g = function
| [] ->
- error (f_"inspection could not detect the source guest (or physical machine).\n\nAssuming that you are running virt-v2v/virt-p2v on a source which is supported (and not, for example, a blank disk), then this should not happen.\n\nNo root device found in this operating system image.");
+ error (f_"inspection could not detect the source guest \
+ (or physical machine).\n\nAssuming that you are \
+ running virt-v2v/virt-p2v on a source which is \
+ supported (and not, for example, a blank disk), \
+ then this should not happen.\n\nNo root device \
+ found in this operating system image.");
| [root] -> root (* only one root, so return it *)
| roots ->
(* If there are multiple roots, use the [--root] option supplied
@@ -138,7 +153,9 @@ and choose_root root_choice g = function
| AskRoot ->
(* List out the roots and ask the user to choose. *)
printf "\n***\n";
- printf (f_"Dual- or multi-boot operating system detected. Choose the root filesystem\nthat contains the main operating system from the list below:\n");
+ printf (f_"Dual- or multi-boot operating system detected. \
+ Choose the root filesystem\nthat contains the main \
+ operating system from the list below:\n");
printf "\n";
List.iteri (
fun i root ->
@@ -165,7 +182,9 @@ and choose_root root_choice g = function
List.nth roots (!i - 1)
| SingleRoot ->
- error (f_"multi-boot operating systems are not supported by virt-v2v. Use the --root option to change how virt-v2v handles this.")
+ error (f_"multi-boot operating systems are not supported by \
+ virt-v2v. Use the --root option to change how virt-v2v \
+ handles this.")
| FirstRoot ->
let root = List.hd roots in
@@ -185,7 +204,10 @@ and choose_root root_choice g = function
and reject_if_not_installed_image g root =
let fmt = g#inspect_get_format root in
if fmt <> "installed" then
- error (f_"libguestfs thinks this is not an installed operating system (it might be, for example, an installer disk or live CD). If this is wrong, it is probably a bug in libguestfs. root=%s fmt=%s") root fmt
+ error (f_"libguestfs thinks this is not an installed operating \
+ system (it might be, for example, an installer disk \
+ or live CD). If this is wrong, it is probably a bug \
+ in libguestfs. root=%s fmt=%s") root fmt
(* Wrapper around g#inspect_list_applications2 which, for RPM
* guests, on failure tries to rebuild the RPM database before
@@ -275,5 +297,9 @@ and sanity_check_inspection inspect =
and error_if_unknown fieldname value =
if value = "unknown" then
- error (f_"inspection could not detect the source guest (or physical machine).\n\nAssuming that you are running virt-v2v/virt-p2v on a source which is supported (and not, for example, a blank disk), then this should not happen.\n\nInspection field ‘%s’ was ‘unknown’.")
+ error (f_"inspection could not detect the source guest (or \
+ physical machine).\n\nAssuming that you are running \
+ virt-v2v/virt-p2v on a source which is supported (and \
+ not, for example, a blank disk), then this should not \
+ happen.\n\nInspection field ‘%s’ was ‘unknown’.")
- warning (f_"removable %s device in slot %d clashes with another disk, so it has been moved to a higher numbered slot on the same bus. This may mean that this removable device has a different name inside the guest (for example a CD-ROM originally called /dev/hdc might move to /dev/hdd, or from D: to E: on a Windows guest).")
+ warning (f_"removable %s device in slot %d clashes with another \
+ disk, so it has been moved to a higher numbered slot \
+ on the same bus. This may mean that this removable \
+ device has a different name inside the guest (for \
+ example a CD-ROM originally called /dev/hdc might \
+ move to /dev/hdd, or from D: to E: on a Windows \
- error (f_"insufficient free space in the conversion server temporary directory %s (%s).\n\nEither free up space in that directory, or set the LIBGUESTFS_CACHEDIR environment variable to point to another directory with more than 1GB of free space.\n\nSee also the virt-v2v(1) manual, section \"Minimum free space check in the host\".")
+ error (f_"insufficient free space in the conversion server temporary \
+ directory %s (%s).\n\nEither free up space in that directory, \
+ or set the LIBGUESTFS_CACHEDIR environment variable to point \
+ to another directory with more than 1GB of free space.\n\n\
+ See also the virt-v2v(1) manual, section \"Minimum free \
+ space check in the host\".")
large_tmpdir (human_size free_space)
let () = run_main_and_handle_errors main
diff --git a/input/OVA.ml b/input/OVA.ml
index 09ceee98..e26059bf 100644
--- a/input/OVA.ml
+++ b/input/OVA.ml
@@ -118,11 +118,15 @@ let rec parse_ova ova =
untar ~format ova tmpdir;
tmpdir, Directory
| `Zip | `GZip | `XZ | `Unknown ->
- error (f_"%s: unsupported file format\n\nFormats which we currently understand for '-i ova' are: tar (uncompressed, compress with gzip or xz), zip") ova
+ error (f_"%s: unsupported file format\n\nFormats which we \
+ currently understand for '-i ova' are: tar \
+ (uncompressed, compress with gzip or xz), zip") ova
)
| `Unknown ->
- error (f_"%s: unsupported file format\n\nFormats which we currently understand for '-i ova' are: tar (uncompressed, compress with gzip or xz), zip") ova
+ error (f_"%s: unsupported file format\n\nFormats which we \
+ currently understand for '-i ova' are: tar (uncompressed, \
+ compress with gzip or xz), zip") ova
) in
(* Exploded path must be absolute (RHBZ#1155121). *)
@@ -140,7 +144,8 @@ let rec parse_ova ova =
* so it is readable by qemu.qemu. This is libvirt bug RHBZ#890291.
*)
if Unix.geteuid () = 0 && backend_is_libvirt () then (
- warning (f_"making OVA directory public readable to work around libvirt bug https://bugzilla.redhat.com/1045069");
+ warning (f_"making OVA directory public readable to work around \
@@ -95,14 +95,18 @@ information on these settings.
(* thumbprint is mandatory. *)
if not (List.mem_assoc "thumbprint" io_options) then
- error (f_"You must pass the ‘-io vddk-thumbprint’ option with the SSL thumbprint of the VMware server. To find the thumbprint, see the nbdkit-vddk-plugin(1) manual. See also the virt-v2v-input-vmware(1) manual.");
+ error (f_"You must pass the ‘-io vddk-thumbprint’ option with the \
+ SSL thumbprint of the VMware server. To find the thumbprint, \
+ see the nbdkit-vddk-plugin(1) manual. See also the \
+ virt-v2v-input-vmware(1) manual.");
(* Get the guest name. *)
let guest =
match args with
| [arg] -> arg
| _ ->
- error (f_"-i libvirt: expecting a libvirt guest name on the command line") in
+ error (f_"-i libvirt: expecting a libvirt guest name \
+ on the command line") in
(* -ic must be set and it must contain a server. This is
* enforced by virt-v2v.
@@ -111,7 +115,8 @@ information on these settings.
match options.input_conn with
| Some ic -> ic
| None ->
- error (f_"-i libvirt: expecting -ic parameter for vcenter connection") in
+ error (f_"-i libvirt: expecting -ic parameter \
+ for vcenter connection") in
if not options.read_only then
error (f_"in-place mode does not work with VDDK source");
@@ -143,7 +148,10 @@ information on these settings.
match xpath_string "/domain/vmware:moref" with
| Some moref -> moref
| None ->
- error (f_"<vmware:moref> was not found in the output of ‘virsh dumpxml \"%s\"’. The most likely reason is that libvirt is too old, try upgrading libvirt to ≥ 3.7.") guest in
+ error (f_"<vmware:moref> was not found in the output of \
+ ‘virsh dumpxml \"%s\"’. The most likely reason is that \
+ libvirt is too old, try upgrading \
+ libvirt to ≥ 3.7.") guest in
(* It probably never happens that the server name can be missing
* from the libvirt URI, but we need a server name to pass to
- error (f_"insufficient free space in the conversion server temporary directory %s (%s).\n\nEither free up space in that directory, or set the LIBGUESTFS_CACHEDIR environment variable to point to another directory with more than 1GB of free space.\n\nSee also the virt-v2v(1) manual, section \"Minimum free space check in the host\".")
- large_tmpdir (human_size free_space)
+ error (f_"insufficient free space in the conversion server \
+ temporary directory %s (%s).\n\nEither free up space \
+ in that directory, or set the LIBGUESTFS_CACHEDIR \
+ environment variable to point to another directory \
+ with more than 1GB of free space.\n\nSee also the \
- error (f_"RHV does not support the output format ‘%s’, only raw or qcow2") output_format in
+ error (f_"RHV does not support the output format ‘%s’, \
+ only raw or qcow2") output_format in
List.mapi (
fun i (virtual_size, image_uuid) ->
let size_in_sectors =
if virtual_size &^ 511L <> 0L then
- error (f_"the virtual size of the input disk %d 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 size of the input disk %d 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.")
i virtual_size;
virtual_size /^ 512L in
@@ -782,7 +786,10 @@ let rec create_ovf source inspect
*)
(match source with
| { s_display = Some { s_password = Some _ } } ->
- warning (f_"This guest required a password for connection to its display, but this is not supported by RHV. Therefore the converted guest’s display will not require a separate password to connect.");
+ warning (f_"This guest required a password for connection to its display, \
+ but this is not supported by RHV. Therefore the converted \
+ guest’s display will not require a separate password \
+ to connect.");
| _ -> ());
if verbose () then (
@@ -871,7 +878,8 @@ and add_disks sizes guestcaps output_alloc output_format
| "raw" -> "RAW"
| "qcow2" -> "COW"
| _ ->
- error (f_"RHV does not support the output format ‘%s’, only raw or qcow2") output_format in
+ error (f_"RHV does not support the output format ‘%s’, \
+ only raw or qcow2") output_format in
(* Note: Upper case in the .meta, mixed case in the OVF. *)
with Libvirt.Virterror { code = VIR_ERR_NO_STORAGE_POOL; message } ->
- error (f_"cannot find libvirt pool ‘%s’: %s\n\nUse ‘virsh pool-list --all’ to list all available pools, and ‘virsh pool-dumpxml <pool>’ to display details about a particular pool.\n\nTo set the pool which virt-v2v uses, add the ‘-os <pool>’ option.")
+ error (f_"cannot find libvirt pool ‘%s’: %s\n\nUse \
+ ‘virsh pool-list --all’ to list all available pools, \
+ and ‘virsh pool-dumpxml <pool>’ to display details \
+ about a particular pool.\n\nTo set the pool which \
+ virt-v2v uses, add the ‘-os <pool>’ option.")
name (Option.default "" message)
)
diff --git a/lib/networks.ml b/lib/networks.ml
index 93250fe4..c079814d 100644
--- a/lib/networks.ml
+++ b/lib/networks.ml
@@ -81,25 +81,30 @@ let create () = {
let add_mac t mac vnet_type vnet =
let mac = String.lowercase_ascii mac in
if StringMap.mem mac t.macs then
- error (f_"duplicate --mac parameter. Duplicate mappings specified for MAC address %s.") mac;
- error (f_"duplicate -b/--bridge parameter. Only one default mapping is allowed.");
+ error (f_"duplicate -b/--bridge parameter. Only one default mapping \
+ is allowed.");
t.default_bridge <- Some o
diff --git a/lib/types.ml b/lib/types.ml
index 7ffb868b..f21c30bd 100644
--- a/lib/types.ml
+++ b/lib/types.ml
@@ -248,7 +248,8 @@ and string_of_source_display { s_display_type = typ;
| LAddress a -> sprintf " listening on address %s" a
| LNetwork n -> sprintf " listening on network %s" n
| LSocket (Some s) -> sprintf " listening on Unix domain socket %s" s
- | LSocket None -> sprintf " listening on automatically created Unix domain socket"
+ | LSocket None ->
+ sprintf " listening on automatically created Unix domain socket"
| LNone -> " listening on private fd"
)
diff --git a/lib/utils.ml b/lib/utils.ml
index 26e7e259..281868b5 100644
--- a/lib/utils.ml
+++ b/lib/utils.ml
@@ -80,7 +80,8 @@ let find_uefi_firmware guest_arch =
guest_arch in
let rec loop = function
| [] ->
- error (f_"cannot find firmware for UEFI guests.\n\nYou probably need to install OVMF (x86-64), or AAVMF (aarch64)")
+ error (f_"cannot find firmware for UEFI guests.\n\nYou probably \
+ need to install OVMF (x86-64), or AAVMF (aarch64)")
| ({ Uefi.code; vars = vars_template } as ret) :: rest ->
if Sys.file_exists code && Sys.file_exists vars_template then ret
else loop rest
@@ -197,7 +198,9 @@ and libvirt_qemu_user =
let error_if_no_ssh_agent () =
try ignore (Sys.getenv "SSH_AUTH_SOCK")
with Not_found ->
- error (f_"ssh-agent authentication has not been set up ($SSH_AUTH_SOCK is not set). This is required by qemu to do passwordless ssh access. See the virt-v2v(1) man page for more information.")
+ error (f_"ssh-agent authentication has not been set up ($SSH_AUTH_SOCK \
+ is not set). This is required by qemu to do passwordless \
+ ssh access. See the virt-v2v(1) man page for more information.")
(* Create the directory containing inX and outX sockets. *)
@@ -392,7 +392,9 @@ let create_libvirt_xml ?pool source inspect
* so target_ide_bus must be empty, otherwise we give a warning.
*)
if Array.length target_buses.target_ide_bus > 0 then
- warning "machine type virt does not support IDE and SATA legacy devices, some legacy devices of this guest have been dropped from the libvirt output";
+ warning "machine type virt does not support IDE and SATA legacy \
+ devices, some legacy devices of this guest have been \
+ dropped from the libvirt output";
[] in
List.push_back_list devices ide_disks;
List.push_back_list devices
diff --git a/output/output.ml b/output/output.ml
index 6065e592..e419c13d 100644
--- a/output/output.ml
+++ b/output/output.ml
@@ -76,7 +76,8 @@ let output_to_local_file ?(changeuid = fun f -> f ()) ?(compressed = false)
output_alloc output_format filename size socket =
(* Check nbdkit is installed and has the required plugin. *)
if not (Nbdkit.is_installed ()) then
- error (f_"nbdkit is not installed or not working. It is required to use ‘-o disk’.");
+ error (f_"nbdkit is not installed or not working. It is required \
+ to use ‘-o disk’.");
if not (Nbdkit.probe_plugin "file") then
error (f_"nbdkit-file-plugin is not installed or not working");
if shell_command "glance image-list > /dev/null" <> 0 then
- error (f_"glance: glance client is not installed or set up correctly. You may need to set environment variables or source a script to enable authentication. See preceding messages for details.");
+ error (f_"glance: glance client is not installed or set up correctly. \
+ You may need to set environment variables or source a script \
+ to enable authentication. \
+ See preceding messages for details.");
(* When debugging, query the glance client for its version. *)
(* Does the domain already exist on the target? (RHBZ#889082) *)
if Libvirt_utils.domain_exists conn output_name then
- error (f_"a libvirt domain called ‘%s’ already exists on the target.\n\nIf using virt-v2v directly, use the ‘-on’ option to select a different name. Or delete the existing domain on the target using the ‘virsh undefine’ command.\n\nIf using virt-p2v, select a different ‘Name’ in the ‘Target properties’. Or delete the existing domain on the target using the ‘virsh undefine’ command.")
+ error (f_"a libvirt domain called ‘%s’ already exists on the \
+ target.\n\nIf using virt-v2v directly, use the ‘-on’ \
+ option to select a different name. Or delete the \
+ existing domain on the target using the ‘virsh undefine’ \
+ command.\n\nIf using virt-p2v, select a different ‘Name’ \
+ in the ‘Target properties’. Or delete the existing domain \
+ on the target using the ‘virsh undefine’ command.")
output_name;
(* Connect to output libvirt instance and check that the pool exists
@@ -112,9 +118,13 @@ module Libvirt_ = struct
let target_path =
match xpath_string "/pool/target/path/text()" with
| None ->
- error (f_"-o libvirt: output pool ‘%s’ does not have /pool/target/path element. See virt-v2v-output-local(1)") output_pool
+ error (f_"-o libvirt: output pool ‘%s’ does not have \
+ /pool/target/path element. See \
+ virt-v2v-output-local(1)") output_pool
| Some dir when not (is_directory dir) ->
- error (f_"-o libvirt: output pool ‘%s’ has type='dir' but the /pool/target/path element is not a local directory. See virt-v2v-output-local(1)") output_pool
+ error (f_"-o libvirt: output pool ‘%s’ has type='dir' but the \
+ /pool/target/path element is not a local directory. \
+ See virt-v2v-output-local(1)") output_pool
| Some dir -> dir in
(* Get the name of the pool, since we have to use that
@@ -194,7 +204,9 @@ module Libvirt_ = struct
(try Unix.unlink tmpfile with _ -> ())
with
Libvirt.Virterror { message } ->
- warning (f_"could not define libvirt domain: %s.\nThe libvirt XML is still available in ‘%s’. Try running ‘virsh -c %s define %s’ yourself instead.")
+ warning (f_"could not define libvirt domain: %s.\nThe libvirt XML \
debug "RHV: actual UID:GID of new files is %d:%d" actual_uid actual_gid;
if uid <> actual_uid || gid <> actual_gid then (
if running_as_root then
- warning (f_"cannot write files to the NFS server as %d:%d, even though we appear to be running as root. This probably means the NFS client or idmapd is not configured properly.\n\nYou will have to chown the files that virt-v2v creates after the run, otherwise RHV-M will not be able to import the VM.") uid gid
+ warning (f_"cannot write files to the NFS server as %d:%d, \
+ even though we appear to be running as root. This \
+ probably means the NFS client or idmapd is not \
+ configured properly.\n\nYou will have to chown \
+ the files that virt-v2v creates after the run, \
+ otherwise RHV-M will not be able to import the VM.")
+ uid gid
else
- warning (f_"cannot write files to the NFS server as %d:%d. You might want to stop virt-v2v (^C) and rerun it as root.") uid gid
+ warning (f_"cannot write files to the NFS server as %d:%d. \
+ You might want to stop virt-v2v (^C) and rerun it \
+ as root.") uid gid
) in
(* Create unique UUIDs for everything *)
@@ -209,7 +217,9 @@ module RHV = struct
(* Try mounting it. *)
let cmd = [ "mount"; sprintf "%s:%s" server export; mp ] in
if run_command cmd <> 0 then
- error (f_"mount command failed, see earlier errors.\n\nThis probably means you didn't specify the right %s path [-os %s], or else you need to rerun virt-v2v as root.") domain_class os;
+ error (f_"mount command failed, see earlier errors.\n\nThis probably \
+ means you didn't specify the right %s path [-os %s], or \
+ else you need to rerun virt-v2v as root.") domain_class os;
(* Make sure it is unmounted at exit, as late as possible (prio=9999) *)
On_exit.f ~prio:9999 (
@@ -232,7 +242,10 @@ module RHV = struct
let entries =
try Sys.readdir mp
with Sys_error msg ->
- error (f_"could not read the %s specified by the '-os %s' parameter on the command line. Is it really an OVirt or RHV-M %s? The original error is: %s") domain_class os domain_class msg in
+ error (f_"could not read the %s specified by the '-os %s' \
+ parameter on the command line. Is it really an \
+ OVirt or RHV-M %s? The original error is: %s")
+ domain_class os domain_class msg in
let entries = Array.to_list entries in
let uuids = List.filter (
fun entry ->
@@ -244,9 +257,12 @@ module RHV = struct
match uuids with
| [uuid] -> uuid
| [] ->
- error (f_"there are no UUIDs in the %s (%s). Is it really an OVirt or RHV-M %s?") domain_class os domain_class
+ error (f_"there are no UUIDs in the %s (%s). Is it really an \
+ OVirt or RHV-M %s?") domain_class os domain_class
| _::_ ->
- error (f_"there are multiple UUIDs in the %s (%s). This is unexpected, and may be a bug in virt-v2v or OVirt.") domain_class os in
+ error (f_"there are multiple UUIDs in the %s (%s). This is \
+ unexpected, and may be a bug in virt-v2v or OVirt.")
+ domain_class os in
(* Check that the domain has been attached to a Data Center by
* checking that the master/vms directory exists.
@@ -254,7 +270,13 @@ module RHV = struct
let () =
let master_vms_dir = mp // uuid // "master" // "vms" in
if not (is_directory master_vms_dir) then
- error (f_"%s does not exist or is not a directory.\n\nMost likely cause: Either the %s (%s) has not been attached to any Data Center, or the path %s is not an %s at all.\n\nYou have to attach the %s to a Data Center using the RHV-M / OVirt user interface first.\n\nIf you don’t know what the %s mount point should be then you can also find this out through the RHV-M user interface.")
+ error (f_"%s does not exist or is not a directory.\n\nMost likely \
+ cause: Either the %s (%s) has not been attached to any \
+ Data Center, or the path %s is not an %s at all.\n\n\
+ You have to attach the %s to a Data Center using the \
+ RHV-M / OVirt user interface first.\n\nIf you don’t \
+ know what the %s mount point should be then you can \
+ also find this out through the RHV-M user interface.")
@@ -65,13 +65,17 @@ after their uploads (if you do, you must supply one for each disk):
let output_conn =
match options.output_conn with
| None ->
- error (f_"-o rhv-upload: use ‘-oc’ to point to the oVirt or RHV server REST API URL, which is usually https://servername/ovirt-engine/api")
+ error (f_"-o rhv-upload: use ‘-oc’ to point to the oVirt \
+ or RHV server REST API URL, which is usually \
+ https://servername/ovirt-engine/api")
| Some oc -> oc in
(* In theory we could make the password optional in future. *)
let output_password =
match options.output_password with
| None ->
- error (f_"-o rhv-upload: output password file was not specified, use ‘-op’ to point to a file which contains the password used to connect to the oVirt or RHV server")
+ error (f_"-o rhv-upload: output password file was not specified, \
+ use ‘-op’ to point to a file which contains the password \
+ used to connect to the oVirt or RHV server")
| Some op -> op in
let output_storage =
match options.output_storage with
@@ -126,7 +130,8 @@ after their uploads (if you do, you must supply one for each disk):
let nil_uuid = "00000000-0000-0000-0000-000000000000" in
let rex_uuid = lazy (
let hex = "[a-fA-F0-9]" in
- let str = sprintf "^%s{8}-%s{4}-%s{4}-%s{4}-%s{12}$" hex hex hex hex hex in
+ let str = sprintf "^%s{8}-%s{4}-%s{4}-%s{4}-%s{12}$"
+ hex hex hex hex hex in
PCRE.compile str
) in
if uuid = nil_uuid then false
@@ -151,13 +156,16 @@ after their uploads (if you do, you must supply one for each disk):
let res = run_command [ Python_script.python; "-c";
"import ovirtsdk4" ] in
if res <> 0 then
- error (f_"the Python module ‘ovirtsdk4’ could not be loaded, is it installed? See previous messages for problems.")
+ error (f_"the Python module ‘ovirtsdk4’ could not be loaded, \
+ is it installed? See previous messages for problems.")
in
(* Check that nbdkit is available and new enough. *)
let error_unless_nbdkit_working () =
if not (Nbdkit.is_installed ()) then
- error (f_"nbdkit is not installed or not working. It is required to use ‘-o rhv-upload’. See the virt-v2v-output-rhv(1) manual.")
+ error (f_"nbdkit is not installed or not working. It is required \
+ to use ‘-o rhv-upload’. See the virt-v2v-output-rhv(1) \
+ manual.")
in
let error_unless_nbdkit_min_version config =
@@ -175,7 +183,8 @@ after their uploads (if you do, you must supply one for each disk):
(quote (Python_script.path plugin_script)) in
debug "%s" cmd;
if Sys.command cmd <> 0 then
- error (f_"nbdkit python plugin is not installed or not working. It is required if you want to use ‘-o rhv-upload’.
+ error (f_"nbdkit python plugin is not installed or not working. \
+ It is required if you want to use ‘-o rhv-upload’.
See also the virt-v2v-output-rhv(1) manual.");
in
@@ -187,7 +196,10 @@ See also the virt-v2v-output-rhv(1) manual.");
if have_selinux then (
let selinux = try List.assoc "selinux" config with Not_found -> "no" in
if selinux = "no" then
- error (f_"nbdkit was compiled without SELinux support. You will have to recompile nbdkit with libselinux-devel installed, or else set SELinux to Permissive mode while doing the conversion.")
+ error (f_"nbdkit was compiled without SELinux support. You will \
+ have to recompile nbdkit with libselinux-devel installed, \
+ or else set SELinux to Permissive mode while doing the \
+ conversion.")
)
in
@@ -280,8 +292,9 @@ See also the virt-v2v-output-rhv(1) manual.");
| Some uuids ->
let nr_disks = List.length disks in
if List.length uuids <> nr_disks then
- error (f_"the number of ‘-oo rhv-disk-uuid’ parameters passed on th
-e command line has to match the number of guest disk images (for this guest: %d)") nr_disks;
+ error (f_"the number of ‘-oo rhv-disk-uuid’ parameters passed on \
+ the command line has to match the number of guest \
+ disk images (for this guest: %d)") nr_disks;
uuids
| None -> List.map (fun _ -> uuidgen ()) disks in
@@ -357,7 +370,10 @@ e command line has to match the number of guest disk images (for this guest: %d)
| "raw" as fmt -> fmt
| "qcow2" as fmt -> fmt
| _ ->
- error (f_"rhv-upload: -of %s: Only output format ‘raw’ or ‘qcow2’ is supported. If the input is in a different format then force one of these output formats by adding either ‘-of raw’ or ‘-of qcow2’ on the command line.")
+ error (f_"rhv-upload: -of %s: Only output format ‘raw’ or ‘qcow2’ \
+ is supported. If the input is in a different format \
+ then force one of these output formats by adding \
+ either ‘-of raw’ or ‘-of qcow2’ on the command line.")
output_format in
let json_params =
("disk_format", JSON.String disk_format) :: json_params in
@@ -433,7 +449,8 @@ e command line has to match the number of guest disk images (for this guest: %d)
| None -> assert false
| Some arch ->
if arch <> target_meta.guestcaps.gcaps_arch then
- error (f_"the cluster ‘%s’ does not support the architecture %s but %s")
+ error (f_"the cluster ‘%s’ does not support the architecture %s \
@@ -94,7 +94,8 @@ For each disk you must supply one of each of these options:
let image_uuids = List.rev !image_uuids in
let vol_uuids = List.rev !vol_uuids in
if image_uuids = [] || vol_uuids = [] then
- error (f_"-o vdsm: either -oo vdsm-vol-uuid or -oo vdsm-vm-uuid was not specified");
+ error (f_"-o vdsm: either -oo vdsm-vol-uuid or \
+ -oo vdsm-vm-uuid was not specified");
let vm_uuid =
match !vm_uuid with
| None ->
@@ -108,7 +109,8 @@ For each disk you must supply one of each of these options:
match options.output_storage with
| None -> error (f_"-o vdsm: -os option was not specified")
| Some d when not (is_directory d) ->
- error (f_"-os %s: output directory does not exist or is not a directory") d
+ error (f_"-os %s: output directory does not exist \
+ or is not a directory") d
| Some d -> d in
let output_name = Option.default source.s_name options.output_name in
@@ -128,7 +130,9 @@ For each disk you must supply one of each of these options:
if List.length image_uuids <> List.length disks ||
List.length vol_uuids <> List.length disks then
- error (f_"the number of ‘-oo vdsm-image-uuid’ and ‘-oo vdsm-vol-uuid’ parameters passed on the command line has to match the number of guest disk images (for this guest: %d)")
+ error (f_"the number of ‘-oo vdsm-image-uuid’ and ‘-oo vdsm-vol-uuid’ \
+ parameters passed on the command line has to match the \
+ number of guest disk images (for this guest: %d)")
(List.length disks);
let dd_mp, dd_uuid =
@@ -141,7 +145,8 @@ For each disk you must supply one of each of these options:
let mp = String.concat "/" (List.rev rest) in
mp, uuid
| _ ->
- error (f_"vdsm: invalid -os parameter does not contain a valid UUID: %s")
- error (f_"insufficient free space in the conversion server temporary directory %s (%s).\n\nEither free up space in that directory, or set the LIBGUESTFS_CACHEDIR environment variable to point to another directory with more than 1GB of free space.\n\nSee also the virt-v2v(1) manual, section \"Minimum free space check in the host\".")
- large_tmpdir (human_size free_space)
+ error (f_"insufficient free space in the conversion server \
+ temporary directory %s (%s).\n\nEither free up space \
+ in that directory, or set the LIBGUESTFS_CACHEDIR \
+ environment variable to point to another directory \
+ with more than 1GB of free space.\n\nSee also the \
+ virt-v2v(1) manual, section \
+ \"Minimum free space check in the host\".")
+ large_tmpdir (human_size free_space)
and nbdcopy ?request_size output_alloc input_uri output_uri =
(* XXX It's possible that some output modes know whether