[PATCH p2v 1/2] make-disk: Don't upgrade the kernel to avoid kernel command line bug
by Richard W.M. Jones
There is some bug in recent Fedora which prevents the kernel from
being upgraded correctly from libguestfs. As an example of what
happens and how to reproduce it see:
https://bugzilla.redhat.com/show_bug.cgi?id=1945835#c24
This problem causes the kernel command line to be messed up (including
bits of the libguestfs appliance /proc/cmdline), and this prevents
virt-p2v from finding the root filesystem.
This patch is just a workaround for this bug. By preventing the
kernel* package from being upgraded we continue to use the working
kernel from the template. Userspace packages in the template get
updated as before.
---
virt-p2v-make-disk.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virt-p2v-make-disk.in b/virt-p2v-make-disk.in
index 132211d..ac477eb 100644
--- a/virt-p2v-make-disk.in
+++ b/virt-p2v-make-disk.in
@@ -243,7 +243,7 @@ virt-builder "$osversion" \
$preinstall_args \
--hostname p2v.local \
--run-command 'hostname p2v.local' \
- --update \
+ --run-command 'dnf -y update --exclude=kernel\*' \
--install "$install" \
--root-password password:p2v \
--upload "$datadir"/issue:/etc/issue \
--
2.35.1
2 years, 6 months
[v2v PATCH] nbdkit, qemuNBD: run_unix: formally require externally provided socket
by Laszlo Ersek
At this point, virt-v2v never relies on the Unix domain sockets created
inside the "run_unix" implementations. Simplify the code by removing this
option.
Consequently, the internally created temporary directory only holds the
NBD server's PID file, and never its UNIX domain socket. Therefore:
(1) we no longer need the libguestfs socket dir to be our temp dir,
(2) we need not change the file mode bits on the temp dir,
(3) we can rename "tmpdir" to the more specific "piddir".
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2066773
Signed-off-by: Laszlo Ersek <lersek(a)redhat.com>
---
Notes:
This patch depends on
[PATCH v2v v3]
lib: Improve security of in/out sockets when running virt-v2v as root
https://listman.redhat.com/archives/libguestfs/2022-March/028460.html
with or without the "chmod socket 0o700" suggested in
<https://listman.redhat.com/archives/libguestfs/2022-March/028463.html>.
lib/nbdkit.mli | 6 +----
lib/qemuNBD.mli | 6 +----
input/input_disk.ml | 4 ++--
input/input_libvirt.ml | 8 +++----
input/input_ova.ml | 2 +-
input/input_vddk.ml | 2 +-
input/input_vmx.ml | 4 ++--
input/input_xen_ssh.ml | 2 +-
input/vCenter.ml | 2 +-
lib/nbdkit.ml | 24 ++++---------------
lib/qemuNBD.ml | 25 ++++----------------
output/output.ml | 4 ++--
output/output_null.ml | 2 +-
output/output_rhv_upload.ml | 2 +-
14 files changed, 28 insertions(+), 65 deletions(-)
diff --git a/lib/nbdkit.mli b/lib/nbdkit.mli
index dc2fd04b2984..5ba83ab04540 100644
--- a/lib/nbdkit.mli
+++ b/lib/nbdkit.mli
@@ -92,14 +92,10 @@ val add_args : cmd -> (string * string) list -> unit
val add_env : cmd -> string -> string -> unit
(** Add name=value environment variable. *)
-val run_unix : ?socket:string -> cmd -> string * int
+val run_unix : string -> cmd -> string * int
(** Start nbdkit command listening on a Unix domain socket, waiting
for the process to start up.
- If optional [?socket] parameter is omitted, then a temporary
- Unix domain socket name is created. If [?socket] is present
- then this overrides the temporary name.
-
Returns the Unix domain socket name and the nbdkit process ID.
The --exit-with-parent, --foreground, --pidfile, --newstyle and
diff --git a/lib/qemuNBD.mli b/lib/qemuNBD.mli
index 83871c5bfb9e..e10d3106c7e7 100644
--- a/lib/qemuNBD.mli
+++ b/lib/qemuNBD.mli
@@ -43,12 +43,8 @@ val set_snapshot : cmd -> bool -> unit
val set_format : cmd -> string option -> unit
(** Set the format [--format] parameter. *)
-val run_unix : ?socket:string -> cmd -> string * int
+val run_unix : string -> cmd -> string * int
(** Start qemu-nbd command listening on a Unix domain socket,
waiting for the process to start up.
- If optional [?socket] parameter is omitted, then a temporary
- Unix domain socket name is created. If [?socket] is present
- then this overrides the temporary name.
-
Returns the Unix domain socket name and the qemu-nbd process ID. *)
diff --git a/input/input_disk.ml b/input/input_disk.ml
index bdb8a5103b93..508adf9dd634 100644
--- a/input/input_disk.ml
+++ b/input/input_disk.ml
@@ -110,7 +110,7 @@ module Disk = struct
Nbdkit.add_arg cmd "file" disk;
if Nbdkit.version nbdkit_config >= (1, 22, 0) then
Nbdkit.add_arg cmd "cache" "none";
- let _, pid = Nbdkit.run_unix ~socket cmd in
+ let _, pid = Nbdkit.run_unix socket cmd in
(* --exit-with-parent should ensure nbdkit is cleaned
* up when we exit, but it's not supported everywhere.
@@ -121,7 +121,7 @@ module Disk = struct
let cmd = QemuNBD.create disk in
QemuNBD.set_snapshot cmd options.read_only;
QemuNBD.set_format cmd (Some format);
- let _, pid = QemuNBD.run_unix ~socket cmd in
+ let _, pid = QemuNBD.run_unix socket cmd in
On_exit.kill pid
) args;
diff --git a/input/input_libvirt.ml b/input/input_libvirt.ml
index 2458d1b0eee7..9311e89a2cba 100644
--- a/input/input_libvirt.ml
+++ b/input/input_libvirt.ml
@@ -88,7 +88,7 @@ and setup_servers options dir disks =
Nbdkit.add_arg cmd "hostname" hostname;
Nbdkit.add_arg cmd "port" (string_of_int port);
Nbdkit.add_arg cmd "shared" "true";
- let _, pid = Nbdkit.run_unix ~socket cmd in
+ let _, pid = Nbdkit.run_unix socket cmd in
(* --exit-with-parent should ensure nbdkit is cleaned
* up when we exit, but it's not supported everywhere.
@@ -102,7 +102,7 @@ and setup_servers options dir disks =
let cor = dir // "convert" in
let cmd = Nbdkit_curl.create_curl ~cor url in
- let _, pid = Nbdkit.run_unix ~socket cmd in
+ let _, pid = Nbdkit.run_unix socket cmd in
(* --exit-with-parent should ensure nbdkit is cleaned
* up when we exit, but it's not supported everywhere.
@@ -118,7 +118,7 @@ and setup_servers options dir disks =
Nbdkit.add_arg cmd "file" filename;
if Nbdkit.version nbdkit_config >= (1, 22, 0) then
Nbdkit.add_arg cmd "cache" "none";
- let _, pid = Nbdkit.run_unix ~socket cmd in
+ let _, pid = Nbdkit.run_unix socket cmd in
(* --exit-with-parent should ensure nbdkit is cleaned
* up when we exit, but it's not supported everywhere.
@@ -130,7 +130,7 @@ and setup_servers options dir disks =
let cmd = QemuNBD.create filename in
QemuNBD.set_snapshot cmd options.read_only;
QemuNBD.set_format cmd format;
- let _, pid = QemuNBD.run_unix ~socket cmd in
+ let _, pid = QemuNBD.run_unix socket cmd in
On_exit.kill pid
) disks
diff --git a/input/input_ova.ml b/input/input_ova.ml
index 1b0e136723c3..8ec1f8026b19 100644
--- a/input/input_ova.ml
+++ b/input/input_ova.ml
@@ -192,7 +192,7 @@ module OVA = struct
let cmd = QemuNBD.create qemu_uri in
QemuNBD.set_snapshot cmd options.read_only; (* protective overlay *)
QemuNBD.set_format cmd None; (* auto-detect format *)
- let _, pid = QemuNBD.run_unix ~socket cmd in
+ let _, pid = QemuNBD.run_unix socket cmd in
On_exit.kill pid
) qemu_uris;
diff --git a/input/input_vddk.ml b/input/input_vddk.ml
index 23cfd529a2be..e48495d36d34 100644
--- a/input/input_vddk.ml
+++ b/input/input_vddk.ml
@@ -199,7 +199,7 @@ information on these settings.
?nfchostport ?password_file:options.input_password ?port
~server ?snapshot ~thumbprint ?transports ?user
path in
- let _, pid = Nbdkit.run_unix ~socket nbdkit in
+ let _, pid = Nbdkit.run_unix socket nbdkit in
On_exit.kill pid
) disks;
diff --git a/input/input_vmx.ml b/input/input_vmx.ml
index 8ceb0bb0d175..9921419b5a85 100644
--- a/input/input_vmx.ml
+++ b/input/input_vmx.ml
@@ -69,7 +69,7 @@ module VMX = struct
(absolute_path_from_other_file vmx_filename filename) in
QemuNBD.set_snapshot cmd true; (* protective overlay *)
QemuNBD.set_format cmd (Some "vmdk");
- let _, pid = QemuNBD.run_unix ~socket cmd in
+ let _, pid = QemuNBD.run_unix socket cmd in
On_exit.kill pid
) filenames
@@ -111,7 +111,7 @@ module VMX = struct
let bandwidth = options.bandwidth in
let nbdkit = Nbdkit_ssh.create_ssh ?bandwidth ~cor ~password
~server ?port ?user abs_path in
- let _, pid = Nbdkit.run_unix ~socket nbdkit in
+ let _, pid = Nbdkit.run_unix socket nbdkit in
On_exit.kill pid
) filenames
);
diff --git a/input/input_xen_ssh.ml b/input/input_xen_ssh.ml
index b154a1a5b6bd..0aad36a8befc 100644
--- a/input/input_xen_ssh.ml
+++ b/input/input_xen_ssh.ml
@@ -121,7 +121,7 @@ module XenSSH = struct
let bandwidth = options.bandwidth in
let nbdkit = Nbdkit_ssh.create_ssh ?bandwidth ~cor ~password
?port ~server ?user path in
- let _, pid = Nbdkit.run_unix ~socket nbdkit in
+ let _, pid = Nbdkit.run_unix socket nbdkit in
On_exit.kill pid
) disks;
diff --git a/input/vCenter.ml b/input/vCenter.ml
index 40d594f0d6ea..8a1a5655ec8a 100644
--- a/input/vCenter.ml
+++ b/input/vCenter.ml
@@ -117,7 +117,7 @@ let rec start_nbdkit_for_path ?bandwidth ?cor ?password_file
Nbdkit_curl.create_curl ?bandwidth ?cor
~cookie_script ~cookie_script_renew
~sslverify https_url in
- let _, pid = Nbdkit.run_unix ~socket nbdkit in
+ let _, pid = Nbdkit.run_unix socket nbdkit in
pid
and get_https_url dcPath uri server path =
diff --git a/lib/nbdkit.ml b/lib/nbdkit.ml
index 9ee6f39ce335..07896684e861 100644
--- a/lib/nbdkit.ml
+++ b/lib/nbdkit.ml
@@ -102,27 +102,13 @@ let add_env cmd name value = cmd.env <- (name, value) :: cmd.env
let add_filter_if_available cmd filter =
if probe_filter filter then add_filter cmd filter
-let run_unix ?socket cmd =
- (* Create a temporary directory where we place the socket and PID file.
- * Use the libguestfs socket directory, so it is more likely the full path
- * of the UNIX sockets will fit in the (limited) socket pathname.
- *)
- let tmpdir =
- let base_dir = (open_guestfs ())#get_sockdir () in
- let t = Mkdtemp.temp_dir ~base_dir "v2vnbdkit." in
- (* tmpdir must be readable (but not writable) by "other" so that
- * qemu can open the sockets.
- *)
- chmod t 0o755;
- On_exit.rmdir t;
- t in
+let run_unix socket cmd =
+ (* Create a temporary directory where we place the PID file. *)
+ let piddir = Mkdtemp.temp_dir "v2vnbdkit." in
+ On_exit.rmdir piddir;
let id = unique () in
- let pidfile = tmpdir // sprintf "nbdkit%d.pid" id in
- let socket =
- match socket with
- | None -> tmpdir // sprintf "nbdkit%d.sock" id
- | Some socket -> socket in
+ let pidfile = piddir // sprintf "nbdkit%d.pid" id in
(* Construct the final command line. *)
let add_arg, add_args_reversed, get_args =
diff --git a/lib/qemuNBD.ml b/lib/qemuNBD.ml
index 2c999b9f8f8b..ae21b17c7de2 100644
--- a/lib/qemuNBD.ml
+++ b/lib/qemuNBD.ml
@@ -62,30 +62,15 @@ let create disk = { disk; snapshot = false; format = None }
let set_snapshot cmd snap = cmd.snapshot <- snap
let set_format cmd format = cmd.format <- format
-let run_unix ?socket { disk; snapshot; format } =
+let run_unix socket { disk; snapshot; format } =
assert (disk <> "");
- (* Create a temporary directory where we place the socket and PID file.
- * Use the libguestfs socket directory, so it is more likely the full path
- * of the UNIX sockets will fit in the (limited) socket pathname.
- *)
- let tmpdir =
- let base_dir = (open_guestfs ())#get_sockdir () in
- let t = Mkdtemp.temp_dir ~base_dir "v2vqemunbd." in
- (* tmpdir must be readable (but not writable) by "other" so that
- * qemu can open the sockets.
- *)
- chmod t 0o755;
- On_exit.rmdir t;
- t in
+ (* Create a temporary directory where we place the PID file. *)
+ let piddir = Mkdtemp.temp_dir "v2vqemunbd." in
+ On_exit.rmdir piddir;
let id = unique () in
- let pidfile = tmpdir // sprintf "qemunbd%d.pid" id in
-
- let socket =
- match socket with
- | Some socket -> socket
- | None -> tmpdir // sprintf "qemunbd%d.sock" id in
+ let pidfile = piddir // sprintf "qemunbd%d.pid" id in
(* Construct the qemu-nbd command line. *)
let args = ref [] in
diff --git a/output/output.ml b/output/output.ml
index 7256b547e080..10e685c46926 100644
--- a/output/output.ml
+++ b/output/output.ml
@@ -90,7 +90,7 @@ let output_to_local_file ?(changeuid = fun f -> f ())
let cmd = Nbdkit.add_arg cmd "cache" "none" in
cmd
);
- let _, pid = Nbdkit.run_unix ~socket cmd in
+ let _, pid = Nbdkit.run_unix socket cmd in
(* --exit-with-parent should ensure nbdkit is cleaned
* up when we exit, but it's not supported everywhere.
@@ -101,7 +101,7 @@ let output_to_local_file ?(changeuid = fun f -> f ())
let cmd = QemuNBD.create filename in
QemuNBD.set_snapshot cmd false;
QemuNBD.set_format cmd (Some "qcow2");
- let _, pid = QemuNBD.run_unix ~socket cmd in
+ let _, pid = QemuNBD.run_unix socket cmd in
On_exit.kill pid
| _ ->
diff --git a/output/output_null.ml b/output/output_null.ml
index 86d81eaa7b64..c8e27c0b0aaf 100644
--- a/output/output_null.ml
+++ b/output/output_null.ml
@@ -70,7 +70,7 @@ module Null = struct
let () =
let cmd = Nbdkit.create ~quiet:true "null" in
Nbdkit.add_arg cmd "size" "7E";
- let _, pid = Nbdkit.run_unix ~socket cmd in
+ let _, pid = Nbdkit.run_unix socket cmd in
(* --exit-with-parent should ensure nbdkit is cleaned
* up when we exit, but it's not supported everywhere.
diff --git a/output/output_rhv_upload.ml b/output/output_rhv_upload.ml
index 72463e572f6d..828996b36261 100644
--- a/output/output_rhv_upload.ml
+++ b/output/output_rhv_upload.ml
@@ -398,7 +398,7 @@ e command line has to match the number of guest disk images (for this guest: %d)
Nbdkit.add_arg cmd "insecure" "true";
if is_ovirt_host then
Nbdkit.add_arg cmd "is_ovirt_host" "true";
- let _, pid = Nbdkit.run_unix ~socket cmd in
+ let _, pid = Nbdkit.run_unix socket cmd in
List.push_front pid nbdkit_pids
) (List.combine disks disk_uuids);
--
2.19.1.3.g30247aa5d201
2 years, 6 months
[PATCH v2v v3] lib: Improve security of in/out sockets when running virt-v2v as root
by Richard W.M. Jones
When using the libvirt backend and running as root, libvirt will run
qemu as a non-root user (eg. qemu:qemu). The v2v directory stores NBD
endpoints that qemu must be able to open and so we set the directory
to mode 0711. Unfortunately this permits any non-root user to open
the sockets (since, by design, they have predictable names within the
directory).
Additionally we were setting the sockets themselves to 0777 mode.
Instead of using directory permissions, change the owner of the
directory and sockets to precisely give access to the qemu user and no
one else.
Reported-by: Xiaodai Wang
Thanks: Dr David Gilbert, Daniel Berrangé, Laszlo Ersek
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2066773
---
lib/nbdkit.ml | 4 ++--
lib/qemuNBD.ml | 2 +-
lib/utils.ml | 47 +++++++++++++++++++++++++++++++++++++++++++++--
lib/utils.mli | 11 +++++++++++
4 files changed, 59 insertions(+), 5 deletions(-)
diff --git a/lib/nbdkit.ml b/lib/nbdkit.ml
index 6787fbb083..9bd7963d0f 100644
--- a/lib/nbdkit.ml
+++ b/lib/nbdkit.ml
@@ -202,9 +202,9 @@ If the messages above are not sufficient to diagnose the problem then add the
socket]);
);
- (* Set the regular Unix permissions, in case qemu is
+ (* Set the regular Unix permissions, in case nbdkit is
* running as another user.
*)
- chmod socket 0o777;
+ chown_for_libvirt_rhbz_1045069 socket;
socket, pid
diff --git a/lib/qemuNBD.ml b/lib/qemuNBD.ml
index 54139ce0b4..a5d3f03ba1 100644
--- a/lib/qemuNBD.ml
+++ b/lib/qemuNBD.ml
@@ -150,7 +150,7 @@ If the messages above are not sufficient to diagnose the problem then add the
(* Set the regular Unix permissions, in case qemu is
* running as another user.
*)
- chmod socket 0o777;
+ chown_for_libvirt_rhbz_1045069 socket;
(* We don't need the PID file any longer. *)
unlink pidfile;
diff --git a/lib/utils.ml b/lib/utils.ml
index 757bc73c8e..40aa1545bf 100644
--- a/lib/utils.ml
+++ b/lib/utils.ml
@@ -146,6 +146,50 @@ let backend_is_libvirt () =
let backend = fst (String.split ":" backend) in
backend = "libvirt"
+let rec chown_for_libvirt_rhbz_1045069 file =
+ let running_as_root = Unix.geteuid () = 0 in
+ if running_as_root && backend_is_libvirt () then (
+ try
+ let user = Option.default "qemu" (libvirt_qemu_user ()) in
+ let uid =
+ if String.is_prefix user "+" then
+ int_of_string (String.sub user 1 (String.length user - 1))
+ else
+ (Unix.getpwnam user).pw_uid in
+ debug "setting owner of %s to %d:root" file uid;
+ Unix.chown file uid 0
+ with
+ | exn -> (* Print exception, but continue. *)
+ debug "could not set owner of %s: %s"
+ file (Printexc.to_string exn)
+ )
+
+and libvirt_qemu_user () =
+(* Get the local user that libvirt uses to run qemu when we are
+ * running as root. This is returned as an optional string
+ * containing the username. The username might be "+NNN"
+ * meaning a numeric UID.
+ * https://listman.redhat.com/archives/libguestfs/2022-March/028450.html
+ *)
+ let uid =
+ lazy (
+ let conn = Libvirt.Connect.connect_readonly () in
+ let xml = Libvirt.Connect.get_capabilities conn in
+ let doc = Xml.parse_memory xml in
+ let xpathctx = Xml.xpath_new_context doc in
+ let expr =
+ "//secmodel[./model=\"dac\"]/baselabel[@type=\"kvm\"]/text()" in
+ let uid_gid = Xpath_helpers.xpath_string xpathctx expr in
+ match uid_gid with
+ | None -> None
+ | Some uid_gid ->
+ (* The string will be something like "+107:+107", return the
+ * UID part.
+ *)
+ Some (fst (String.split ":" uid_gid))
+ ) in
+ Lazy.force uid
+
(* When using the SSH driver in qemu (currently) this requires
* ssh-agent authentication. Give a clear error if this hasn't been
* set up (RHBZ#1139973). This might improve if we switch to libssh1.
@@ -158,8 +202,7 @@ let error_if_no_ssh_agent () =
(* Create the directory containing inX and outX sockets. *)
let create_v2v_directory () =
let d = Mkdtemp.temp_dir "v2v." in
- let running_as_root = Unix.geteuid () = 0 in
- if running_as_root then Unix.chmod d 0o711;
+ chown_for_libvirt_rhbz_1045069 d;
On_exit.rmdir d;
d
diff --git a/lib/utils.mli b/lib/utils.mli
index c571cca5db..d431e21f5c 100644
--- a/lib/utils.mli
+++ b/lib/utils.mli
@@ -61,6 +61,17 @@ val qemu_img_supports_offset_and_size : unit -> bool
val backend_is_libvirt : unit -> bool
(** Return true iff the current backend is libvirt. *)
+val chown_for_libvirt_rhbz_1045069 : string -> unit
+(** If running and root, and if the backend is libvirt, libvirt
+ will run qemu as a non-root user. This prevents access
+ to root-owned files and directories. To fix this, provide
+ a function to chown things we might need to qemu:root so
+ qemu can access them. Note that root normally ignores
+ permissions so can still access the resource.
+
+ This is best-effort. If something fails then we carry
+ on and hope for the best. *)
+
val error_if_no_ssh_agent : unit -> unit
val create_v2v_directory : unit -> string
--
2.35.1
2 years, 6 months
[PATCH v2v v2] lib: Use an ACL to allow qemu to access the v2v directory
by Richard W.M. Jones
When using the libvirt backend and running as root, libvirt will run
qemu as a non-root user (eg. qemu:qemu). The v2v directory stores NBD
endpoints that qemu must be able to open and so we set the directory
to mode 0711. Unfortunately this permits any non-root user to open
the sockets (since, by design, they have predictable names within the
directory).
So instead of using directory permissions, use an ACL which allows us
to precisely give access to the qemu user and no one else.
Reported-by: Xiaodai Wang
Thanks: Dr David Gilbert
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2066773
---
lib/utils.ml | 34 +++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/lib/utils.ml b/lib/utils.ml
index 757bc73c8e..48e6b6c82d 100644
--- a/lib/utils.ml
+++ b/lib/utils.ml
@@ -146,6 +146,26 @@ let backend_is_libvirt () =
let backend = fst (String.split ":" backend) in
backend = "libvirt"
+(* Get the local user that libvirt uses to run qemu when we are
+ * running as root. This is returned as an optional string
+ * containing either the UID or username.
+ * https://listman.redhat.com/archives/libguestfs/2022-March/028450.html
+ *)
+let libvirt_qemu_uid () =
+ let conn = Libvirt.Connect.connect_readonly () in
+ let xml = Libvirt.Connect.get_capabilities conn in
+ let doc = Xml.parse_memory xml in
+ let xpathctx = Xml.xpath_new_context doc in
+ let expr = "//secmodel[./model=\"dac\"]/baselabel[@type=\"kvm\"]/text()" in
+ let uid_gid = Xpath_helpers.xpath_string xpathctx expr in
+ match uid_gid with
+ | None -> None
+ | Some uid_gid ->
+ (* The string will be something like "+107:+107", return
+ * just the UID part.
+ *)
+ Some (fst (String.split ":" uid_gid))
+
(* When using the SSH driver in qemu (currently) this requires
* ssh-agent authentication. Give a clear error if this hasn't been
* set up (RHBZ#1139973). This might improve if we switch to libssh1.
@@ -158,8 +178,20 @@ let error_if_no_ssh_agent () =
(* Create the directory containing inX and outX sockets. *)
let create_v2v_directory () =
let d = Mkdtemp.temp_dir "v2v." in
+ (* If running as root, and if the backend is libvirt, libvirt
+ * will run qemu as a non-root user. Allow qemu to open the directory.
+ *)
let running_as_root = Unix.geteuid () = 0 in
- if running_as_root then Unix.chmod d 0o711;
+ if running_as_root && backend_is_libvirt () then (
+ try
+ let uid = Option.default "qemu" (libvirt_qemu_uid ()) in
+ let cmd = sprintf "setfacl -m user:%s:rwx %s" (quote uid) (quote d) in
+ debug "%s" cmd;
+ ignore (Sys.command cmd)
+ with
+ | exn -> (* Print exception, but continue. *)
+ debug "could not set ACL on v2v directory: %s" (Printexc.to_string exn)
+ );
On_exit.rmdir d;
d
--
2.35.1
2 years, 6 months
[p2v PATCH] build: remove gnulib
by Laszlo Ersek
It turns out that all we need from gnulib @ 253f29d8b391 is xstrtoull(),
ignore_value(), and assure(), when building on Fedora 35 anyway.
Constructing this patch must be the most arbitrary "programming" I've ever
done. It started with capturing the output of "gnulib-tool" (invoked
through "autogen.sh" -> "bootstrap"), then trimming it as much as
possible, guided by libguestfs commit 0f54df53d26e ("build: Remove
gnulib.", 2021-04-08), then filling in any new gaps.
(The "manywarnings" functionality falls victim to this patch as well -- if
that change was good enough for libguestfs, then so should it be for
virt-p2v.)
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1945835
Suggested-by: Richard W.M. Jones <rjones(a)redhat.com>
Signed-off-by: Laszlo Ersek <lersek(a)redhat.com>
---
configure.ac | 14 +-
Makefile.am | 8 +-
gnulib/lib/Makefile.am | 32 +++
gnulib/lib/assure.h | 37 +++
gnulib/lib/ignore-value.h | 50 +++++
gnulib/lib/xstrtol.h | 53 +++++
gnulib/lib/xstrtol.c | 237 ++++++++++++++++++++
gnulib/lib/xstrtoull.c | 6 +
.gitignore | 12 +-
.gitmodules | 3 -
.gnulib | 1 -
autogen.sh | 50 -----
bootstrap | 122 ----------
docs/p2v-building.pod | 8 +-
docs/p2v-hacking.pod | 5 -
m4/p2v-c.m4 | 98 ++------
m4/p2v-tests.m4 | 10 -
17 files changed, 446 insertions(+), 300 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5486e47b7a1f..cbafcb4cb986 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,9 @@ AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
AC_CONFIG_MACRO_DIR([m4])
+dnl Initialize libtool.
+LT_INIT
+
dnl Extra string, a freeform string defined by packagers.
AC_ARG_WITH([extra],
[AS_HELP_STRING([--with-extra],
@@ -59,11 +62,6 @@ PACKAGE_VERSION_FULL="p2v_major.p2v_minor.p2v_release${p2v_extra}"
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_FULL],["$PACKAGE_VERSION_FULL"],[Full version string.])
AC_SUBST([PACKAGE_VERSION_FULL])
-dnl Early gnulib initialization.
-HEADING([Configuring Gnulib])
-gl_EARLY
-gl_INIT
-
dnl Check for external programs required to either build or run
dnl virt-p2v.
HEADING([Checking for external programs])
@@ -105,10 +103,12 @@ AC_CONFIG_FILES([run],
AC_CONFIG_FILES([Makefile
bash/Makefile
docs/Makefile
- gnulib/lib/Makefile
- gnulib/tests/Makefile])
+ gnulib/lib/Makefile])
AC_CONFIG_COMMANDS([p2v-config.h],
[${ac_srcdir}/generate-p2v-config.pl --file=p2v-config.h --output=p2v-config.h])
+dnl gnulib embedding hacks
+AC_TYPE_LONG_LONG_INT
+
AC_OUTPUT
diff --git a/Makefile.am b/Makefile.am
index cc864636f039..a5742b0dc5d3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,10 +19,6 @@ include $(top_srcdir)/subdir-rules.mk
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = gnulib/lib
-if ENABLE_GNULIB_TESTS
-SUBDIRS += gnulib/tests
-endif
-
SUBDIRS += docs
# bash-completion
@@ -32,8 +28,6 @@ EXTRA_DIST = \
$(BUILT_SOURCES) \
$(TESTS) $(LIBGUESTFS_TESTS) $(SLOW_TESTS) \
AUTHORS \
- autogen.sh \
- bootstrap \
contrib/aux-scripts/do-build.sh \
contrib/build-p2v-iso.sh \
contrib/patches/0001-RHEL-5-ONLY-DISABLE-AUTOMATIC-REMOTE-PORT-ALLOCATION.patch \
@@ -155,7 +149,7 @@ virt_p2v_LDADD = \
$(LIBXML2_LIBS) \
$(GTK_LIBS) \
$(DBUS_LIBS) \
- gnulib/lib/libgnu.a \
+ gnulib/lib/libgnu.la \
-lm
$(generated_sources) virt-p2v-kernel-config.pod: $(srcdir)/generate-p2v-config.pl
diff --git a/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am
new file mode 100644
index 000000000000..787fa350345a
--- /dev/null
+++ b/gnulib/lib/Makefile.am
@@ -0,0 +1,32 @@
+# libguestfs
+# Copyright (C) 2017-2022 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+# This directory contains some dependencies originally from gnulib.
+# The aim is for everything in this directory to eventually go away.
+
+include $(top_srcdir)/subdir-rules.mk
+
+noinst_LTLIBRARIES = libgnu.la
+libgnu_la_SOURCES = \
+ assure.h \
+ ignore-value.h \
+ xstrtol.c \
+ xstrtol.h \
+ xstrtoull.c
+libgnu_la_CFLAGS = \
+ $(WARN_CFLAGS) $(WERROR_CFLAGS) \
+ $(GCC_VISIBILITY_HIDDEN)
diff --git a/gnulib/lib/assure.h b/gnulib/lib/assure.h
new file mode 100644
index 000000000000..c21b6a6b806f
--- /dev/null
+++ b/gnulib/lib/assure.h
@@ -0,0 +1,37 @@
+/* Run-time assert-like macros.
+
+ Copyright (C) 2014-2019 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#ifndef _GL_ASSURE_H
+#define _GL_ASSURE_H
+
+#include <assert.h>
+
+/* Check E's value at runtime, and report an error and abort if not.
+ However, do nothing if NDEBUG is defined.
+
+ Unlike standard 'assert', this macro always compiles E even when NDEBUG
+ is defined, so as to catch typos and avoid some GCC warnings. */
+
+#ifdef NDEBUG
+# define assure(E) ((void) (0 && (E)))
+#else
+# define assure(E) assert (E)
+#endif
+
+#endif
diff --git a/gnulib/lib/ignore-value.h b/gnulib/lib/ignore-value.h
new file mode 100644
index 000000000000..7e3b4c1f0f7a
--- /dev/null
+++ b/gnulib/lib/ignore-value.h
@@ -0,0 +1,50 @@
+/* ignore a function return without a compiler warning. -*- coding: utf-8 -*-
+
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering, Eric Blake and Pádraig Brady. */
+
+/* Use "ignore_value" to avoid a warning when using a function declared with
+ gcc's warn_unused_result attribute, but for which you really do want to
+ ignore the result. Traditionally, people have used a "(void)" cast to
+ indicate that a function's return value is deliberately unused. However,
+ if the function is declared with __attribute__((warn_unused_result)),
+ gcc issues a warning even with the cast.
+
+ Caution: most of the time, you really should heed gcc's warning, and
+ check the return value. However, in those exceptional cases in which
+ you're sure you know what you're doing, use this function.
+
+ For the record, here's one of the ignorable warnings:
+ "copy.c:233: warning: ignoring return value of 'fchown',
+ declared with attribute warn_unused_result". */
+
+#ifndef _GL_IGNORE_VALUE_H
+#define _GL_IGNORE_VALUE_H
+
+/* Normally casting an expression to void discards its value, but GCC
+ versions 3.4 and newer have __attribute__ ((__warn_unused_result__))
+ which may cause unwanted diagnostics in that case. Use __typeof__
+ and __extension__ to work around the problem, if the workaround is
+ known to be needed. */
+#if 3 < __GNUC__ + (4 <= __GNUC_MINOR__)
+# define ignore_value(x) \
+ (__extension__ ({ __typeof__ (x) __x = (x); (void) __x; }))
+#else
+# define ignore_value(x) ((void) (x))
+#endif
+
+#endif
diff --git a/gnulib/lib/xstrtol.h b/gnulib/lib/xstrtol.h
new file mode 100644
index 000000000000..d888120e6bae
--- /dev/null
+++ b/gnulib/lib/xstrtol.h
@@ -0,0 +1,53 @@
+/* A more useful interface to strtol.
+
+ Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2019 Free Software
+ Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#ifndef XSTRTOL_H_
+# define XSTRTOL_H_ 1
+
+# include <inttypes.h>
+
+# ifndef _STRTOL_ERROR
+enum strtol_error
+ {
+ LONGINT_OK = 0,
+
+ /* These two values can be ORed together, to indicate that both
+ errors occurred. */
+ LONGINT_OVERFLOW = 1,
+ LONGINT_INVALID_SUFFIX_CHAR = 2,
+
+ LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW = (LONGINT_INVALID_SUFFIX_CHAR
+ | LONGINT_OVERFLOW),
+ LONGINT_INVALID = 4
+ };
+typedef enum strtol_error strtol_error;
+# endif
+
+# define _DECLARE_XSTRTOL(name, type) \
+ strtol_error name (const char *, char **, int, type *, const char *);
+_DECLARE_XSTRTOL (xstrtol, long int)
+_DECLARE_XSTRTOL (xstrtoul, unsigned long int)
+_DECLARE_XSTRTOL (xstrtoimax, intmax_t)
+_DECLARE_XSTRTOL (xstrtoumax, uintmax_t)
+
+#if HAVE_LONG_LONG_INT
+_DECLARE_XSTRTOL (xstrtoll, long long int)
+_DECLARE_XSTRTOL (xstrtoull, unsigned long long int)
+#endif
+
+#endif /* not XSTRTOL_H_ */
diff --git a/gnulib/lib/xstrtol.c b/gnulib/lib/xstrtol.c
new file mode 100644
index 000000000000..ab73d0403f13
--- /dev/null
+++ b/gnulib/lib/xstrtol.c
@@ -0,0 +1,237 @@
+/* A more useful interface to strtol.
+
+ Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2019 Free Software
+ Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering. */
+
+#ifndef __strtol
+# define __strtol strtol
+# define __strtol_t long int
+# define __xstrtol xstrtol
+# define STRTOL_T_MINIMUM LONG_MIN
+# define STRTOL_T_MAXIMUM LONG_MAX
+#endif
+
+#include <config.h>
+
+#include "xstrtol.h"
+
+/* Some pre-ANSI implementations (e.g. SunOS 4)
+ need stderr defined if assertion checking is enabled. */
+#include <stdio.h>
+
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "assure.h"
+
+#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+static strtol_error
+bkm_scale (__strtol_t *x, int scale_factor)
+{
+ if (TYPE_SIGNED (__strtol_t) && *x < STRTOL_T_MINIMUM / scale_factor)
+ {
+ *x = STRTOL_T_MINIMUM;
+ return LONGINT_OVERFLOW;
+ }
+ if (STRTOL_T_MAXIMUM / scale_factor < *x)
+ {
+ *x = STRTOL_T_MAXIMUM;
+ return LONGINT_OVERFLOW;
+ }
+ *x *= scale_factor;
+ return LONGINT_OK;
+}
+
+static strtol_error
+bkm_scale_by_power (__strtol_t *x, int base, int power)
+{
+ strtol_error err = LONGINT_OK;
+ while (power--)
+ err |= bkm_scale (x, base);
+ return err;
+}
+
+/* FIXME: comment. */
+
+strtol_error
+__xstrtol (const char *s, char **ptr, int strtol_base,
+ __strtol_t *val, const char *valid_suffixes)
+{
+ char *t_ptr;
+ char **p;
+ __strtol_t tmp;
+ strtol_error err = LONGINT_OK;
+
+ assure (0 <= strtol_base && strtol_base <= 36);
+
+ p = (ptr ? ptr : &t_ptr);
+
+ errno = 0;
+
+ if (! TYPE_SIGNED (__strtol_t))
+ {
+ const char *q = s;
+ unsigned char ch = *q;
+ while (isspace (ch))
+ ch = *++q;
+ if (ch == '-')
+ return LONGINT_INVALID;
+ }
+
+ tmp = __strtol (s, p, strtol_base);
+
+ if (*p == s)
+ {
+ /* If there is no number but there is a valid suffix, assume the
+ number is 1. The string is invalid otherwise. */
+ if (valid_suffixes && **p && strchr (valid_suffixes, **p))
+ tmp = 1;
+ else
+ return LONGINT_INVALID;
+ }
+ else if (errno != 0)
+ {
+ if (errno != ERANGE)
+ return LONGINT_INVALID;
+ err = LONGINT_OVERFLOW;
+ }
+
+ /* Let valid_suffixes == NULL mean "allow any suffix". */
+ /* FIXME: update all callers except the ones that allow suffixes
+ after the number, changing last parameter NULL to "". */
+ if (!valid_suffixes)
+ {
+ *val = tmp;
+ return err;
+ }
+
+ if (**p != '\0')
+ {
+ int base = 1024;
+ int suffixes = 1;
+ strtol_error overflow;
+
+ if (!strchr (valid_suffixes, **p))
+ {
+ *val = tmp;
+ return err | LONGINT_INVALID_SUFFIX_CHAR;
+ }
+
+ switch (**p)
+ {
+ case 'E': case 'G': case 'g': case 'k': case 'K': case 'M': case 'm':
+ case 'P': case 'T': case 't': case 'Y': case 'Z':
+
+ /* The "valid suffix" '0' is a special flag meaning that
+ an optional second suffix is allowed, which can change
+ the base. A suffix "B" (e.g. "100MB") stands for a power
+ of 1000, whereas a suffix "iB" (e.g. "100MiB") stands for
+ a power of 1024. If no suffix (e.g. "100M"), assume
+ power-of-1024. */
+
+ if (strchr (valid_suffixes, '0'))
+ switch (p[0][1])
+ {
+ case 'i':
+ if (p[0][2] == 'B')
+ suffixes += 2;
+ break;
+
+ case 'B':
+ case 'D': /* 'D' is obsolescent */
+ base = 1000;
+ suffixes++;
+ break;
+ }
+ }
+
+ switch (**p)
+ {
+ case 'b':
+ overflow = bkm_scale (&tmp, 512);
+ break;
+
+ case 'B':
+ /* This obsolescent first suffix is distinct from the 'B'
+ second suffix above. E.g., 'tar -L 1000B' means change
+ the tape after writing 1000 KiB of data. */
+ overflow = bkm_scale (&tmp, 1024);
+ break;
+
+ case 'c':
+ overflow = LONGINT_OK;
+ break;
+
+ case 'E': /* exa or exbi */
+ overflow = bkm_scale_by_power (&tmp, base, 6);
+ break;
+
+ case 'G': /* giga or gibi */
+ case 'g': /* 'g' is undocumented; for compatibility only */
+ overflow = bkm_scale_by_power (&tmp, base, 3);
+ break;
+
+ case 'k': /* kilo */
+ case 'K': /* kibi */
+ overflow = bkm_scale_by_power (&tmp, base, 1);
+ break;
+
+ case 'M': /* mega or mebi */
+ case 'm': /* 'm' is undocumented; for compatibility only */
+ overflow = bkm_scale_by_power (&tmp, base, 2);
+ break;
+
+ case 'P': /* peta or pebi */
+ overflow = bkm_scale_by_power (&tmp, base, 5);
+ break;
+
+ case 'T': /* tera or tebi */
+ case 't': /* 't' is undocumented; for compatibility only */
+ overflow = bkm_scale_by_power (&tmp, base, 4);
+ break;
+
+ case 'w':
+ overflow = bkm_scale (&tmp, 2);
+ break;
+
+ case 'Y': /* yotta or 2**80 */
+ overflow = bkm_scale_by_power (&tmp, base, 8);
+ break;
+
+ case 'Z': /* zetta or 2**70 */
+ overflow = bkm_scale_by_power (&tmp, base, 7);
+ break;
+
+ default:
+ *val = tmp;
+ return err | LONGINT_INVALID_SUFFIX_CHAR;
+ }
+
+ err |= overflow;
+ *p += suffixes;
+ if (**p)
+ err |= LONGINT_INVALID_SUFFIX_CHAR;
+ }
+
+ *val = tmp;
+ return err;
+}
diff --git a/gnulib/lib/xstrtoull.c b/gnulib/lib/xstrtoull.c
new file mode 100644
index 000000000000..10dda504445c
--- /dev/null
+++ b/gnulib/lib/xstrtoull.c
@@ -0,0 +1,6 @@
+#define __strtol strtoull
+#define __strtol_t unsigned long long int
+#define __xstrtol xstrtoull
+#define STRTOL_T_MINIMUM 0
+#define STRTOL_T_MAXIMUM ULLONG_MAX
+#include "xstrtol.c"
diff --git a/.gitignore b/.gitignore
index 459c9a05ff9c..a870e2b6186b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
*~
+*.la
+*.lo
*.log
*.o
*.trs
@@ -8,7 +10,6 @@
Makefile
Makefile.in
-/.git-module-status
/about-authors.c
/aclocal.m4
/autom4te.cache/
@@ -32,10 +33,13 @@ Makefile.in
/docs/stamp-p2v-hacking.pod
/docs/stamp-p2v-release-notes.pod
/fedora.img
-/gnulib/
/kernel-config.c
-/m4/.gitignore
-/m4/gnulib-cache.m4
+/libtool
+/m4/libtool.m4
+/m4/lt~obsolete.m4
+/m4/ltoptions.m4
+/m4/ltsugar.m4
+/m4/ltversion.m4
/p2v-config.h
/podwrapper.pl
/run
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index f8d0cf321d35..000000000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "gnulib"]
- path = .gnulib
- url = https://git.savannah.gnu.org/git/gnulib.git
diff --git a/.gnulib b/.gnulib
deleted file mode 160000
index 253f29d8b391..000000000000
--- a/.gnulib
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 253f29d8b391ebe8cea50355eda351bb7962e160
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index f055ffcbc7cf..000000000000
--- a/autogen.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash -
-# libguestfs
-# Copyright (C) 2009 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <https://www.gnu.org/licenses/>.
-#
-# Rebuild the autotools environment.
-
-set -e
-set -v
-
-# Ensure that whenever we pull in a gnulib update or otherwise change to a
-# different version (i.e., when switching branches), we also rerun ./bootstrap.
-curr_status=.git-module-status
-t=$(git submodule status|sed 's/^[ +-]//;s/ .*//')
-if test "$t" = "$(cat $curr_status 2>/dev/null)"; then
- : # good, it's up to date
-else
- echo running bootstrap...
- ./bootstrap && echo "$t" > $curr_status
-fi
-
-CONFIGUREDIR=.
-
-# Run configure in BUILDDIR if it's set
-if [ ! -z "$BUILDDIR" ]; then
- mkdir -p $BUILDDIR
- cd $BUILDDIR
-
- CONFIGUREDIR=..
-fi
-
-# If no arguments were specified and configure has run before, use the previous
-# arguments
-if test $# -eq 0 && test -x ./config.status; then
- ./config.status --recheck
-else
- $CONFIGUREDIR/configure "$@"
-fi
diff --git a/bootstrap b/bootstrap
deleted file mode 100755
index 565d50450c96..000000000000
--- a/bootstrap
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/bin/sh
-
-usage() {
- echo >&2 "\
-Usage: $0 [OPTION]...
-Bootstrap this package from the checked-out sources.
-
-Options:
- --gnulib-srcdir=DIRNAME specify the local directory where gnulib
- sources reside. Use this if you already
- have gnulib sources on your machine, and
- do not want to waste your bandwidth downloading
- them again. Defaults to \$GNULIB_SRCDIR
-"
-}
-
-for option
-do
- case $option in
- --help)
- usage
- exit;;
- --gnulib-srcdir=*)
- GNULIB_SRCDIR=${option#--gnulib-srcdir=};;
- *)
- echo >&2 "$0: $option: unknown option"
- exit 1;;
- esac
-done
-
-cleanup_gnulib() {
- status=$?
- rm -fr "$gnulib_path"
- exit $status
-}
-
-git_modules_config () {
- test -f .gitmodules && git config --file .gitmodules "$@"
-}
-
-gnulib_path=$(git_modules_config submodule.gnulib.path)
-test -z "$gnulib_path" && gnulib_path=gnulib
-
-# Get gnulib files. Populate $GNULIB_SRCDIR, possibly updating a
-# submodule, for use in the rest of the script.
-
-case ${GNULIB_SRCDIR--} in
--)
- if git_modules_config submodule.gnulib.url >/dev/null; then
- echo "$0: getting gnulib files..."
- git submodule init -- "$gnulib_path" || exit $?
- git submodule update -- "$gnulib_path" || exit $?
-
- elif [ ! -d "$gnulib_path" ]; then
- echo "$0: getting gnulib files..."
-
- trap cleanup_gnulib 1 2 13 15
-
- shallow=
- git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
- git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
- cleanup_gnulib
-
- trap - 1 2 13 15
- fi
- GNULIB_SRCDIR=$gnulib_path
- ;;
-*)
- # Use GNULIB_SRCDIR directly or as a reference.
- if test -d "$GNULIB_SRCDIR"/.git && \
- git_modules_config submodule.gnulib.url >/dev/null; then
- echo "$0: getting gnulib files..."
- if git submodule -h|grep -- --reference > /dev/null; then
- # Prefer the one-liner available in git 1.6.4 or newer.
- git submodule update --init --reference "$GNULIB_SRCDIR" \
- "$gnulib_path" || exit $?
- else
- # This fallback allows at least git 1.5.5.
- if test -f "$gnulib_path"/gnulib-tool; then
- # Since file already exists, assume submodule init already complete.
- git submodule update -- "$gnulib_path" || exit $?
- else
- # Older git can't clone into an empty directory.
- rmdir "$gnulib_path" 2>/dev/null
- git clone --reference "$GNULIB_SRCDIR" \
- "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
- && git submodule init -- "$gnulib_path" \
- && git submodule update -- "$gnulib_path" \
- || exit $?
- fi
- fi
- GNULIB_SRCDIR=$gnulib_path
- fi
- ;;
-esac
-
-gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
-<$gnulib_tool || exit
-
-modules='
-error
-ignore-value
-manywarnings
-ptsname_r
-sys_types
-xstrtoll
-'
-
-# If any tests fail, avoid including them by adding them to
-# this list.
-avoid=""
-
-$gnulib_tool \
- $avoid \
- --with-tests \
- --m4-base=m4 \
- --source-base=gnulib/lib \
- --tests-base=gnulib/tests \
- --import $modules
-
-# Disable autopoint, since it was already done above.
-AUTOPOINT=true autoreconf --verbose --install
diff --git a/docs/p2v-building.pod b/docs/p2v-building.pod
index 0e3df94b4a1a..f249f742554a 100644
--- a/docs/p2v-building.pod
+++ b/docs/p2v-building.pod
@@ -119,7 +119,8 @@ and C<automake> when building from git.
git clone https://github.com/libguestfs/virt-p2v
cd virt-p2v
- ./autogen.sh
+ autoreconf -i
+ ./configure
make
=head1 BUILDING FROM TARBALLS
@@ -184,11 +185,6 @@ ones.
=over 4
-=item B<--disable-gnulib-tests>
-
-On some platforms the GNUlib test suite can be flaky. This disables
-it, since errors in the GNUlib test suite are often not important.
-
=item B<--enable-werror>
This turns compiler warnings into errors (ie. C<-Werror>). Use this
diff --git a/docs/p2v-hacking.pod b/docs/p2v-hacking.pod
index cdc6c89eb16c..2c0a14c093a3 100644
--- a/docs/p2v-hacking.pod
+++ b/docs/p2v-hacking.pod
@@ -52,11 +52,6 @@ Outside contributions, experimental parts.
Miscellaneous manual pages.
-=item F<gnulib>
-
-Gnulib is used as a portability library. A copy of gnulib is included
-under here.
-
=item F<libguestfs>
Some sources (mostly with utilities) copied from libguestfs. Changes
diff --git a/m4/p2v-c.m4 b/m4/p2v-c.m4
index 772e48d67d5a..bbf48625ae05 100644
--- a/m4/p2v-c.m4
+++ b/m4/p2v-c.m4
@@ -23,99 +23,27 @@ AC_PROG_CC_STDC
AC_PROG_INSTALL
AC_PROG_CPP
+AC_C_PROTOTYPES
+test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
+
+AM_PROG_CC_C_O
+
AC_ARG_ENABLE([werror],
[AS_HELP_STRING([--enable-werror],
- [turn GCC warnings into errors (for developers)])],
+ [turn on lots of GCC warnings (for developers)])],
[case $enableval in
yes|no) ;;
*) AC_MSG_ERROR([bad value $enableval for werror option]) ;;
esac
- gl_gcc_werror=$enableval],
- [gl_gcc_werror=no]
+ gcc_warnings=$enableval],
+ [gcc_warnings=no]
)
-
-if test "$gl_gcc_werror" = yes; then
- gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
- AC_SUBST([WERROR_CFLAGS])
-fi
-
-dnl This, $nw, is the list of warnings we disable.
-nw=
-nw="$nw -Waggregate-return" # anachronistic
-nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
-nw="$nw -Wtraditional" # Warns on #elif which we use often
-nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
-nw="$nw -Wpadded" # Our structs are not padded
-nw="$nw -Wvla" # Allow variable length arrays.
-nw="$nw -Wvla-larger-than=4031"
-nw="$nw -Winline" # inline functions in Python binding
-nw="$nw -Wshadow" # Not useful, as it applies to global vars
-nw="$nw -Wunsafe-loop-optimizations" # just a warning that an optimization
- # was not possible, safe to ignore
-nw="$nw -Wstack-protector" # Useless warning when stack protector
- # cannot being used in a function.
-nw="$nw -Wcast-align" # Useless warning on arm >= 7, intel
-nw="$nw -Wabi" # Broken in GCC 8.1.
-dnl things I might fix soon:
-nw="$nw -Wpacked" # Allow attribute((packed)) on structs
-nw="$nw -Wlong-long" # Allow long long since it's required
- # by Python, Ruby and xstrtoll.
-nw="$nw -Wsuggest-attribute=pure" # Don't suggest pure functions.
-nw="$nw -Wsuggest-attribute=const" # Don't suggest const functions.
-nw="$nw -Wsuggest-attribute=malloc" # Don't suggest malloc functions.
-nw="$nw -Wunsuffixed-float-constants" # Don't care about these.
-nw="$nw -Wswitch-default" # This warning is actively dangerous.
-nw="$nw -Woverlength-strings" # Who cares about stupid ISO C99 limit.
-
-gl_MANYWARN_ALL_GCC([ws])
-gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
-for w in $ws; do
- gl_WARN_ADD([$w])
-done
-
-dnl Normally we disable warnings in $nw above. However $nw only
-dnl filters out exact matching warning strings from a list inside
-dnl gnulib (see m4/manywarnings.m4). So we need to explicitly list a
-dnl few disabled warnings below.
-
-dnl Unused parameters are not a bug.
-gl_WARN_ADD([-Wno-unused-parameter])
-
-dnl Missing field initializers is not a bug in C.
-gl_WARN_ADD([-Wno-missing-field-initializers])
-
-dnl Display the name of the warning option with the warning.
-gl_WARN_ADD([-fdiagnostics-show-option])
-
-dnl Now some warnings we want to enable and/or customize ...
-
-dnl Warn about large stack frames. This does not include alloca and
-dnl variable length arrays. Coverity warns about 10000 byte frames.
-gl_WARN_ADD([-Wframe-larger-than=5000])
-
-dnl Warn about large stack frames, including estimates for alloca
-dnl and variable length arrays.
-dnl gl_WARN_ADD([-Wstack-usage=10000])
-
-dnl Warn about implicit fallthrough in case statements, but suppress
-dnl the warning if /*FALLTHROUGH*/ comment is used.
-gl_WARN_ADD([-Wimplicit-fallthrough=4])
-
-dnl GCC level 2 gives incorrect warnings, so use level 1.
-gl_WARN_ADD([-Wformat-truncation=1])
-
-dnl GCC 9 at level 2 gives apparently bogus errors when %.*s is used.
-gl_WARN_ADD([-Wformat-overflow=1])
-
+WARN_CFLAGS="-Wall"
AC_SUBST([WARN_CFLAGS])
-
-AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
-AC_DEFINE([GNULIB_PORTCHECK], [1], [Enable some gnulib portability checks.])
-
-AC_C_PROTOTYPES
-test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
-
-AM_PROG_CC_C_O
+if test "x$gcc_warnings" = "xyes"; then
+ WERROR_CFLAGS="-Werror"
+fi
+AC_SUBST([WERROR_CFLAGS])
# Provide a global place to set CFLAGS. (Note that setting AM_CFLAGS
# is no use because it doesn't override target_CFLAGS).
diff --git a/m4/p2v-tests.m4 b/m4/p2v-tests.m4
index 9b4a77fb22cb..291755af4156 100644
--- a/m4/p2v-tests.m4
+++ b/m4/p2v-tests.m4
@@ -14,16 +14,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-dnl Should we run the gnulib tests?
-AC_MSG_CHECKING([if we should run the GNUlib tests])
-AC_ARG_ENABLE([gnulib-tests],
- [AS_HELP_STRING([--disable-gnulib-tests],
- [disable running GNU Portability library tests @<:@default=yes@:>@])],
- [ENABLE_GNULIB_TESTS="$enableval"],
- [ENABLE_GNULIB_TESTS=yes])
-AM_CONDITIONAL([ENABLE_GNULIB_TESTS],[test "x$ENABLE_GNULIB_TESTS" = "xyes"])
-AC_MSG_RESULT([$ENABLE_GNULIB_TESTS])
-
dnl Check libguestfs tools.
AC_CHECK_PROG([GUESTFISH],[guestfish],[guestfish],[no])
AC_CHECK_PROG([VIRT_BUILDER],[virt-builder],[virt-builder],[no])
base-commit: 442cd286614fc4975d6956a8c7cce7edf63375d0
--
2.19.1.3.g30247aa5d201
2 years, 6 months
[p2v PATCH] virt-p2v.pod: fix typo in paragraph about virt-v2v log capture
by Laszlo Ersek
Commit 9b057cc1ac5f ("p2v: Don't display debugging messages in the run
dialog.", 2016-06-18) contained the following hunk:
> @@ -749,8 +749,9 @@ file (see above), which in turn references the NBD listening port(s)
> of the data connection(s).
>
> Output from the virt-v2v command (messages, debugging etc) is saved
> -both in the log file on the conversion server, and sent over the
> -control connection to be displayed in the graphical UI.
> +both in the log file on the conversion server. Only informational
> +messages are sent back over the control connection to be displayed in
> +the graphical UI.
>
> =head1 SEE ALSO
>
The word "both" no longer makes sense; remove it.
Fixes: 9b057cc1ac5f56d5f93b33c705d153b7ce01e628
Signed-off-by: Laszlo Ersek <lersek(a)redhat.com>
---
virt-p2v.pod | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/virt-p2v.pod b/virt-p2v.pod
index 758021134958..5f4aa5763524 100644
--- a/virt-p2v.pod
+++ b/virt-p2v.pod
@@ -720,10 +720,10 @@ virt-v2v command. The virt-v2v command references the F<physical.xml>
file (see above), which in turn references the NBD listening port(s)
of the data connection(s).
-Output from the virt-v2v command (messages, debugging etc) is saved
-both in the log file on the conversion server. Only informational
-messages are sent back over the control connection to be displayed in
-the graphical UI.
+Output from the virt-v2v command (messages, debugging etc) is saved in
+the log file on the conversion server. Only informational messages are
+sent back over the control connection to be displayed in the graphical
+UI.
=head1 SEE ALSO
--
2.19.1.3.g30247aa5d201
2 years, 6 months
[PATCH] daemon/rpm-c.c: Disable signature checking in librpm
by Richard W.M. Jones
Older distros (eg RHEL 6) used SHA-1 signatures which some newer
distros now prevent us from verifying. Since verifying package
signatures is not essential for inspection, switch the feature off in
librpm.
Reported-by: Xiaodai Wang
Thanks: Panu Matilainen
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2064182
Signed-off-by: Richard W.M. Jones <rjones(a)redhat.com>
---
daemon/rpm-c.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/daemon/rpm-c.c b/daemon/rpm-c.c
index be0e81e22..f6a7067e1 100644
--- a/daemon/rpm-c.c
+++ b/daemon/rpm-c.c
@@ -89,8 +89,15 @@ static rpmdbMatchIterator iter;
value
guestfs_int_daemon_rpm_start_iterator (value unitv)
{
+ rpmVSFlags oflags;
+
CAMLparam1 (unitv);
ts = rpmtsCreate ();
+
+ /* Disable signature checking (RHBZ#2064182). */
+ oflags = rpmtsVSFlags (ts);
+ rpmtsSetVSFlags (ts, oflags | RPMVSF_MASK_NOSIGNATURES);
+
iter = rpmtsInitIterator (ts, RPMDBI_PACKAGES, NULL, 0);
CAMLreturn (Val_unit);
}
--
2.31.1
2 years, 6 months
Real size vs virtual size image question?
by Lonnie Cumberland
Hello All,
I have been doing some reading and it seems that for some images created
that the "real" size is not the same as the reported "virtual" size to the
filesystem. There actually is a name for this, but I cannot remember what
it was now and think that I ran across it in my reading on the Libguestfs
site somewhere.
Anyway, I have some images that have actual sizes around 4 MB but are
reporting sizes of 1 TB.
I would like to compress and zip up these images but based upon the 4 MB
size and not the 1 TB size.
Is there any simple tool that will do this, or perhaps some source code
that I can compile into a tool or library that will do this as I ultimately
need some simple C/C++ or Golang solution to compress and decompress these
files properly?
Any ideas or suggestions would be greatly appreciated.
Best Regards,
Lonnie
Email: Lonnie.Cumberland(a)Outstep.com
2 years, 7 months
ANNOUNCE: virt-v2v 2.0 released
by Richard W.M. Jones
I'm pleased to announce the release of virt-v2v 2.0. This is a major
revision of our tool for converting guests from foreign hypervisors
(VMware, Xen) to run on KVM-based hypervisors. A great deal of
architectural change has been done to ensure we're in a better place
with performance and future enhancements, and at the same time many
bugs have been fixed.
You can download virt-v2v 2.0 source from:
https://download.libguestfs.org/virt-v2v/2.0-stable/
Please note if building from source that the build requirements have
changed quite a bit. See the "Build changes" section of the release
notes.
Release notes are attached below or you can be read them online here:
https://libguestfs.org/virt-v2v-release-notes-2.0.1.html
Rich.
----------------------------------------------------------------------
These are the release notes for virt-v2v 2.0. This describes the major
changes since 1.42.
No release notes were published for 1.44, so that release is covered
here.
Virt-v2v 2.0.0 was released on 14 March 2022.
Security
There were no security-related bugs found in this release.
New features
Virt-v2v has been modularised allowing external programs to examine the
state of the conversion and inject their own copying step. Further
enhancements will be made to this new architecture in forthcoming
releases.
The command line is almost identical apart from some debugging features
that were removed (see below). The only significant difference is that
the output format (-of) now has to be specified if it is different from
the input format, whereas previous versions of virt-v2v would use the
same output format as input format automatically.
A lot of time was spent improving the performance of virt-v2v in common
cases.
Implement conversion of ALT Linux guests (Mikhail Gordeev).
Many bug fixes and performance enhancements were made to oVirt imageio
output (Nir Soffer).
There is a new virt-v2v-in-place(1) tool which replaces the existing
virt-v2v --in-place option.
Virt-v2v can now convert guests which use LUKS encrypted logical
volumes (Laszlo Ersek).
Option -oo rhv-direct has been replaced by -oo rhv-proxy, and direct
mode (which is much faster) is now the default when writing to oVirt,
with proxy mode available for restricted network configurations
(thanks: Nir Soffer).
The following command line options were removed: --print-estimate,
--debug-overlays, --no-copy.
Virt-v2v no longer installs the RHEV-APT tool in Windows guests. This
tool was deprecated and then removed in oVirt 4.3.
Deprecated tool virt-v2v-copy-to-local has been removed. This was
deprecated in November 2018.
Other fixes
Remove reference to prl_strg driver in Windows guests to avoid BSOD
(Denis Plotnikov).
Fix conversions of UEFI Linux guests that don't provide their own
fallback bootloader (Denis Plotnikov).
Remove use of nbdkit-readahead-filter(1). This filter uses a naive
strategy and it had several negative effects on conversions.
Remove prompts for interactive passwords. Normally you should try to
use the -ip and/or -op options to supply passwords.
For Windows guests, we insert a schtasks command. However the
parameters of this command are timezone dependent and so it failed in
non-European timezones. (Thanks: Dinesh Herath, Tomáš Golembiovský,
Bryan Kinney, Mark Zealey, Xiaodai Wang)
Virt-v2v will reauthenticate with vCenter servers periodically when
copying guests over HTTPS which stops large guests and/or slow copies
taking longer than about 30 minutes from failing.
Virt-v2v now sets libguestfs SMP to match number of physical host CPUs,
which helps performance of certain conversion steps.
Virt-v2v output to oVirt now attempts to set the machine and firmware
type correctly. Note an exact mapping is not always possible and oVirt
may ignore our recommendations (incorrectly) sometimes.
Virt-v2v now generates a virtio-vsock device for guests which support
it (Valeriy Vdovin).
All guests now need at least 100 MB of free space for conversion to
succeed (Ming Xie).
Standard VGA instead of QXL is now used as the video type for converted
guests (Laszlo Ersek).
Older guests (eg RHEL 6) will use the virtio-transitional model after
conversion. This feature and the machine type are now usually
determined from the libosinfo database, falling back to hard-coded
values if libosinfo is not available (Laszlo Ersek).
When virt-v2v prints messages to a pipe or file it no longer wraps
them, making parsing simpler. You can enable wrapping in this mode
using --wrap (Laszlo Ersek).
Windows guest firstboot scripts installed by virt-v2v now run in the
right order, making network configuration happen earlier (Laszlo
Ersek).
Build changes
libguestfs ≥ 1.44 is now required.
nbdcopy(1) and OCaml NBD bindings, both from libnbd ≥ 1.10, are now
required.
nbdkit ≥ 1.22 is now required (Nir Soffer).
pcre2 (instead of pcre) is now required.
gnulib is no longer bundled or used by virt-v2v.
OCaml ≥ 4.04 is now required. OCaml 4.13 support has been added in
this release.
OpenSSH scp ≥ 8.8 is now required. Earlier versions will fail because
the command line syntax was changed incompatibly.
Internals
Weblate instead of Zanata is now used for translations (Pino Toscano).
Bugs fixed
https://bugzilla.redhat.com/2051394
Missing error message of 'insufficient free space in the conversion
server temporary directory'
https://bugzilla.redhat.com/2044922
nbdinfo output to stdout instead of stderr during virt-v2v
conversion
https://bugzilla.redhat.com/2044911
virt-p2v conversion hangs with RHEL9 virt-v2v
https://bugzilla.redhat.com/2043333
'model='virtio-transitional' is wrongly added when converting
windows guest to local by rhel9 v2v
https://bugzilla.redhat.com/2041886
virt-v2v hangs for several minutes when using -ic vpx://... -it
vddk with incorrect IP address
https://bugzilla.redhat.com/2041852
Improve the unclear assertion failure at input_xen_ssh.ml
https://bugzilla.redhat.com/2041850
Can not specify '-oo json-disks-pattern' in '-o json' mode
https://bugzilla.redhat.com/2039597
Failed to import VM when selecting OVA as a source on RHV webadmin
https://bugzilla.redhat.com/2039255
Conversion performance is not good when convert guest by modular
virt-v2v
https://bugzilla.redhat.com/2034240
calling "get_disk_allocated" in "create_ovf" breaks the rhv-upload
output plugin
https://bugzilla.redhat.com/2033096
RFE: Remove -oo rhv-direct and add -oo rhv-proxy option
https://bugzilla.redhat.com/2032324
nbdcopy command failed when using v2v to convert guest from ESXi6.5
via vddk > 6.5 + rhv-upload to rhv4.4
https://bugzilla.redhat.com/2032112
Add virt-v2v and libvirt version to the beginning of v2v debug log
https://bugzilla.redhat.com/2027673
V2V can't convert guest from VMware via vmx+ssh when openssh
version is 8.7p1-5
https://bugzilla.redhat.com/2027598
There is no guest listed in export domain if use v2v to convert
guest to rhv via -o rhv
https://bugzilla.redhat.com/1994984
virt-v2v can't convert bitblocker windows guest with libguestfs
error: /dev/mapper/cryptsda: No such file or directory
https://bugzilla.redhat.com/1977681
The usage description of '-oo rhv-disk-uuid=UUID' in man virt-v2v
should be updated
https://bugzilla.redhat.com/1976607
[RFE] Drop QXL for guests on CentOS 9 clusters
https://bugzilla.redhat.com/1976024
[RFE][v2v] [upload/download disk/CBT] Failed to attach disk to the
VM - disk is OK but image transfer still holds a lock on the disk
https://bugzilla.redhat.com/1972125
Update privileges for Non-admin vmware role when ESXi host has
enabled host encryption mode in virt-v2v-input-vmware man page
https://bugzilla.redhat.com/1967941
virt-v2v can't install qemu-guest-agent for rhel9 guest during
conversion
https://bugzilla.redhat.com/1964324
assertion failed at parse_ova.ml when ova directory ends with '/'
https://bugzilla.redhat.com/1961107
Change video type from qxl to vga after v2v conversion
https://bugzilla.redhat.com/1960087
v2v import from vCenter fails when using interactive password
because cookie-script tries to be interactive
https://bugzilla.redhat.com/1949147
Should improve the minimum free space for windows guest in v2v man
page and better to improve v2v error message about no space left
for windows guest
https://bugzilla.redhat.com/1945549
Delete or improve the warning info about rhev-apt during v2v
converting windows guest on rhel9
https://bugzilla.redhat.com/1942325
Virt-v2v should add 'model='virtio-transitional' to RHEL <=6 guest
virtio devices during conversion if target is rhel9 system
https://bugzilla.redhat.com/1926102
"virt-v2v: warning: there is no QXL driver for this version of
Windows" still shows, even though we copied qxldod driver to the
guest
https://bugzilla.redhat.com/1917760
VMware tools not getting uninstalled as part of IMS
https://bugzilla.redhat.com/1903960
Should hidden "virt-v2v: warning:
/usr/share/virt-tools/pnp_wait.exe is missing.."during conversion
https://bugzilla.redhat.com/1901489
VDDK 6.7 repeatedly reconnects with nbdkit: vddk[1]: debug:
NBD_ClientOpen: attempting to create connection to vpxa-nfc://
followed by virt-v2v failure
https://bugzilla.redhat.com/1895323
After virt-v2v, qemu-ga does not run at Windows firstboot if the
timezone is not M/d/yyyy format
https://bugzilla.redhat.com/1872100
Should correct info about 'UEFI on OpenStack' in virt-v2v-support
man page
https://bugzilla.redhat.com/1872094
Virt-v2v should convert UEFI guest to openstack via openstack
option successfully
https://bugzilla.redhat.com/1871754
RFE: Should clarify which file is correct authentication file for
openstack/glance conversion in virt-v2v-output-openstack man page
https://bugzilla.redhat.com/1868690
Ceph block device will be destroyed if v2v convert guest to ceph
block device and guest disk size is greater than ceph block device
https://bugzilla.redhat.com/1858775
RFE: virt-v2v should check the ip info when specify guest's ip
https://bugzilla.redhat.com/1858765
V2V option --keys-from-stdin gives error: getline: Inappropriate
ioctl for device
https://bugzilla.redhat.com/1854275
document that vmx+ssh "-ip" auth doesn't cover ssh / scp shell
commands
https://bugzilla.redhat.com/1842440
nbdkit cannot read the password interactively when started from
virt-v2v
https://bugzilla.redhat.com/1841096
Option --bandwidth and --bandwidth-file isn't working as expected
during v2v conversion
https://bugzilla.redhat.com/1839917
There is no info "Opening the source -i libvirt -ic vpx://..."
shown if any IP is wrong in vpx:// URL during v2v conversion
https://bugzilla.redhat.com/1838425
V2V doesn't ask password if there is no option about password file
in v2v command line
https://bugzilla.redhat.com/1837453
[RFE]Remove cache=none for guest after v2v converting to libvirt
https://bugzilla.redhat.com/1837328
Virt-v2v cannot convert guest from ESXI7.0 server without vddk
https://bugzilla.redhat.com/1832805
v2v conversion will be failed because of memory allocation failure
if convert guest from ESXi6.0 or ESXi6.5 via vddk, or use vddk6.5
to convert guest from VMware
https://bugzilla.redhat.com/1789279
virt-v2v should give more clear error info when use some special
invalid uuids for disks
https://bugzilla.redhat.com/1788823
Virt-v2v firstboot scripts should run in order, with v2v network
configuration happening first
https://bugzilla.redhat.com/1764569
V2V conversion fails when a filesystem has no free inodes
https://bugzilla.redhat.com/1658126
Virt-v2v can't convert guest using LUKS-on-LV
https://bugzilla.redhat.com/1637857
q35 switch caused: error: unsupported configuration: IDE
controllers are unsupported for this QEMU binary or machine type
https://bugzilla.redhat.com/1581428
virt-v2v use Q35 as default machine-type
https://bugzilla.redhat.com/1534644
New way of parsing OVF from OVA that was created by VMware fails.
SEE ALSO
virt-v2v(1), virt-v2v-release-notes-1.42(1),
guestfs-release-notes-1.40(1).
AUTHORS
Authors of virt-v2v 2.0:
Denis Plotnikov
Kevin Locke
Laszlo Ersek
Martin Kletzander
Mikhail Gordeev
Nir Soffer
Pino Toscano
Richard W.M. Jones
Valeriy Vdovin
COPYRIGHT
Copyright (C) 2009-2022 Red Hat Inc.
LICENSE
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
BUGS
To get a list of bugs against libguestfs, use this link:
https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virt...
To report a new bug against libguestfs, use this link:
https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Vi...
When reporting a bug, please supply:
• The version of libguestfs.
• Where you got libguestfs (eg. which Linux distro, compiled from
source, etc)
• Describe the bug accurately and give a way to reproduce it.
• Run libguestfs-test-tool(1) and paste the complete, unedited output
into the bug report.
virt-v2v-2.0.0 2022-03-10 virt-v2v-release-notes-2.0(1)
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
2 years, 7 months