[PATCH nbdkit 1/3] configure: Report --enable-libfuzzer flag in summary output
by Richard W.M. Jones
This changes the summary output to report whether or not the
./configure --enable-libfuzzer flag was set:
libfuzzer .............................. yes
or for --disable-libfuzzer / the default of not set:
libfuzzer .............................. no
---
configure.ac | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configure.ac b/configure.ac
index 6a3be4ec..f86215d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1417,6 +1417,8 @@ echo "Optional server features:"
echo
feature "bash-completion ........................ " \
test "x$HAVE_BASH_COMPLETION_TRUE" = "x"
+feature "libfuzzer .............................. " \
+ test "x$ENABLE_LIBFUZZER_TRUE" = "x"
feature "manual pages ........................... " \
test "x$HAVE_POD_TRUE" = "x"
feature "SELinux ................................ " \
--
2.35.1
2 years, 7 months
[supermin PATCH 0/1] Fix for missing /lib/modules.
by George Prekas
When running guestfish without a /lib/modules directory, the following
error message appears:
supermin: ext2: populating from base image
supermin: ext2: copying files from host filesystem
supermin: ext2: copying kernel modules
supermin: error: lstat: No such file or directory: /lib/modules
libguestfs: error: /usr/bin/supermin exited with error status 1, see debug messages above
Even though I set the environment variable $SUPERMIN_MODULES, supermin
expects to find the /lib/modules directory.
Note: I tried to use ext2fs_mkdir, but an error message that I didn't know how to fix:
File "ext2fs.ml", line 29, characters 24-93:
29 | external ext2fs_mkdir : t -> string -> string -> int -> int-> int -> int-> int -> int -> unit = "supermin_ext2fs_mkdir"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: An external function with more than 5 arguments requires a second stub function
George Prekas (1):
Fix for missing /lib/modules.
src/format_ext2.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.35.1
2 years, 7 months
[p2v PATCH v2 00/11] Simplify NBD server management
by Laszlo Ersek
Repo: https://github.com/lersek/virt-p2v.git
Branch: nbd-servers-simplification-v2
v1: https://listman.redhat.com/archives/libguestfs/2022-March/028498.html
V2 addresses feedback from Rich, under v1. Please look for the "Notes:"
section on each patch for any changes to that patch.
Retested with "make check" / "make run-virt-p2v-in-an-nvme-vm".
Thanks,
Laszlo
Laszlo Ersek (11):
remove qemu-nbd support
remove "--nbd=nbdkit-no-sa" option parsing
nbd.c: simplify start_nbdkit()
open-code "localhost" as the listen hostname for nbdkit
nbd.c: remove bind_source_port()
remove "--nbd" option parsing
nbd.c: remove nbd_server_string()
nbd.c: remove "enum nbd_server"
nbd.c: pass "--exit-with-parent" to nbdkit if nbdkit supports it
nbd.c: bind listening socket without AI_ADDRCONFIG
do not connect to nbdkit after starting it
Makefile.am | 2 -
contrib/aux-scripts/do-build.sh | 7 +-
contrib/patches/0002-RHEL-5-ONLY-QEMU-NBD-1.4-HAS-NO-f-OPTION.patch | 34 --
conversion.c | 17 +-
dependencies.m4 | 13 +-
docs/p2v-building.pod | 9 +-
main.c | 7 +-
nbd.c | 611 +++-----------------
p2v.h | 8 +-
ssh.c | 6 +-
test-virt-p2v-nbdkit.sh | 5 +-
test-virt-p2v-scp.sh | 2 +-
test-virt-p2v-ssh.sh | 4 +-
test-virt-p2v.sh | 56 --
virt-p2v.pod | 49 +-
15 files changed, 108 insertions(+), 722 deletions(-)
delete mode 100644 contrib/patches/0002-RHEL-5-ONLY-QEMU-NBD-1.4-HAS-NO-f-OPTION.patch
delete mode 100755 test-virt-p2v.sh
base-commit: c1a4bd83a8bba5959470ef1f6deb06dc61587112
--
2.19.1.3.g30247aa5d201
2 years, 7 months
[PATCH v2v] input: -i ova: Handle OVAs which contain user/group names with spaces
by Richard W.M. Jones
If importing an OVA that has user/group names with spaces then the
plain tar -tRvf command would print them without any quoting. Our
simple strategy of splitting on spaces resulted in an "extra field"
being parsed. This is an example from a real OVA (note "Domain Users"
is the group name):
$ tar --quoting-style=literal -tRvf protect_appliance.ova
block 0: -rw-r--r-- eraautobuilds/Domain Users 33508 2021-11-04 17:48 PROTECT_Appliance.ovf
Luckily this is fairly simple to fix. We don't care about the
original user/group name, and using --numeric-owner causes tar to
print the UID/GID instead:
$ tar --quoting-style=literal --numeric-owner -tRvf protect_appliance.ova
block 0: -rw-r--r-- 1074101/1049089 33508 2021-11-04 17:48 PROTECT_Appliance.ovf
I also added --quoting-style=literal to deal with possible future
cases where the filename contains spaces. Because we use
nsplit ~max:8 these should now be handled correctly too, although I
didn't test this.
Reported-by: Jiří Sléžka
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2069768
---
input/OVA.ml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/input/OVA.ml b/input/OVA.ml
index 36bb4fd043..9e9c371285 100644
--- a/input/OVA.ml
+++ b/input/OVA.ml
@@ -394,7 +394,10 @@ let re_tar_message = PCRE.compile "\\*\\* [^*]+ \\*\\*$"
let get_tar_offet_and_size tar filename =
let cmd =
- sprintf "LANG=C tar --no-auto-compress -tRvf %s" (Filename.quote tar) in
+ sprintf "LANG=C tar \
+ --no-auto-compress --quoting-style=literal --numeric-owner \
+ -tRvf %s"
+ (Filename.quote tar) in
let lines = external_command cmd in
let rec loop lines =
match lines with
--
2.35.1
2 years, 7 months
[PATCH v2v] docs: Mention pnp_wait.exe and refine pvvxsvc.exe documentation
by Richard W.M. Jones
Virt-v2v can use pnp_wait.exe to wait for new Windows devices to
activate. However this was not mentioned in the existing
documentation.
Also refine the documentation for pvvxsvc.exe (used only by SUSE
hosts) so that we don't mention the non-existent --firstboot* options.
This was incorrect documentation copied from virt-customize. Just say
that it's an alternative to RHSrvAny.
Reported-by: Ming Xie
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2059287#c6
Fixes: commit ee78c06b7f ("customize: add support for pvvxsvc")
---
docs/virt-v2v.pod | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 60305397bf..69bdbbd462 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -1552,11 +1552,19 @@ script in the guest during conversion of Windows guests.
See also: C<https://github.com/rwmjones/rhsrvany>
+=item F<pnp_wait.exe>
+
+(Recommended when doing conversions of Windows guests)
+
+This tool waits for newly installed Windows devices to become
+available before trying to configure them, for example to set network
+configuration. It is part of the RHSrvAny project.
+
=item F<pvvxsvc.exe>
-This is a Windows binary shipped with SUSE VMDP, used to install a "firstboot"
-script in Windows guests. It is required if you intend to use the
-I<--firstboot> or I<--firstboot-command> options with Windows guests.
+This is a Windows binary shipped with SUSE VMDP, used to install a
+"firstboot" script in Windows guests. It is an alternative to
+RHSrvAny.
=back
--
2.35.1
2 years, 7 months
[PATCH nbdkit] tests: Skip vsock tests unless the vsock_loopback module is loaded
by Richard W.M. Jones
It's unfortunate that vsock in Linux can be broken if some but not all
vsock modules needed are loaded. As we are testing loopback
(VMADDR_CID_LOCAL), require that vsock_loopback is loaded.
Linux is able to autoload the correct module(s) if vsock.ko is _not_
loaded. We could in theory enhance the test to check this, but that
leaves us with uncertainty about whether the test could work (eg. Is
vsock available as a module in this kernel? Is this even Linux?)
Reported-by: Ming Xie
Thanks: Stefano Garzarella
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2069558
---
tests/functions.sh.in | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tests/functions.sh.in b/tests/functions.sh.in
index 6d41f683..7877c84d 100644
--- a/tests/functions.sh.in
+++ b/tests/functions.sh.in
@@ -240,11 +240,13 @@ requires_non_root ()
}
# Tests that use the vsock interface will fail if vsock is not
-# supported. On Linux you have to load the kernel modules: vsockmon
-# and vsock_loopback.
+# supported. On Linux you have to load the kernel module
+# vsock_loopback. See also
+# https://bugzilla.redhat.com/show_bug.cgi?id=2069558
requires_vsock_support ()
{
- if ! grep -q ^AF_VSOCK /proc/net/protocols; then
+ if ! grep -q ^AF_VSOCK /proc/net/protocols ||
+ ! lsmod | grep ^vsock_loopback; then
echo "$0: test skipped because AF_VSOCK is not supported."
exit 77
fi
--
2.35.1
2 years, 7 months
[p2v PATCH 00/10] Simplify NBD server management
by Laszlo Ersek
Repo: https://github.com/lersek/virt-p2v.git
Branch: nbd-servers-simplification
Rich proposed a list of tasks at
<https://listman.redhat.com/archives/libguestfs/2022-March/028475.html>,
for simplifying NBD server management. This series implements them.
Earlier I said I'd post this as an RFC series, but after reviewing and
testing the set myself, I decided to post it as a PATCH series.
The set builds at every stage. I verified the documentation
("docs/p2v-building.1" and "virt-p2v.1") at every stage that modifies
the sources of those files, too.
The set passes
make check
I also tested it with
make run-virt-p2v-in-an-nvme-vm
i.e. an actual conversion, running against a RHEL9 conversion server
(virt-v2v 1.45.99rhel=9,release=1.el9; nbdkit 1.30.1-1.el9.x86_64). The
converted guest boots fine. The conversion log is available if needed.
On the p2v (virtual) machine, I saved the interesting messages from the
serial console (they are interesting because they relate to code
modified by this series):
> [ 232.205162] launch-virt-p2v[669]: checking for nbdkit ...
> [ 233.209388] launch-virt-p2v[675]: nbdkit 1.28.6 (nbdkit-1.28.6-1.fc35)
> [ 233.213329] launch-virt-p2v[675]: file 1.28.6
> [ 233.216906] launch-virt-p2v[669]: found nbdkit
>
> [ 301.197612] launch-virt-p2v[669]: virt-p2v: bound to localhost:50123 (2 socket(s))
> [ 301.198566] launch-virt-p2v[669]: starting nbdkit for /dev/nvme0n1 using socket activation
> [ 301.220919] launch-virt-p2v[669]: ssh command: ssh -p 22 -l root -o StrictHostKeyChecking=no -o ConnectTimeout=60 -o ServerAliveInterval=300 -o ServerAliveCountMax=6 -o PreferredAuthentications=keyboard-interactive,password -R 0:localhost:50123 -N 192.168.122.184
> [ 301.225792] launch-virt-p2v[748]: nbdkit: file[1]: error: reading initial client flags: conn->recv: Connection reset by peer
>
> [ 301.583073] launch-virt-p2v[669]: virt-p2v: data connection for /dev/nvme0n1: SSH remote port 44479, local port 50123
>
> [ 301.588509] launch-virt-p2v[669]: virt-p2v: bound to localhost:50124 (2 socket(s))
> [ 301.592034] launch-virt-p2v[669]: starting nbdkit for /dev/nvme1n1 using socket activation
> [ 301.605749] launch-virt-p2v[669]: ssh command: ssh -p 22 -l root -o StrictHostKeyChecking=no -o ConnectTimeout=60 -o ServerAliveInterval=300 -o ServerAliveCountMax=6 -o PreferredAuthentications=keyboard-interactive,password -R 0:localhost:50124 -N 192.168.122.184
> [ 301.612459] launch-virt-p2v[751]: nbdkit: file[1]: error: reading initial client flags: conn->recv: Connection reset by peer
>
> [ 302.002998] launch-virt-p2v[669]: virt-p2v: data connection for /dev/nvme1n1: SSH remote port 35789, local port 50124
>
> [ 302.007171] launch-virt-p2v[669]: virt-p2v: bound to localhost:50125 (2 socket(s))
> [ 302.009976] launch-virt-p2v[669]: starting nbdkit for /dev/nvme1n2 using socket activation
> [ 302.020637] launch-virt-p2v[669]: ssh command: ssh -p 22 -l root -o StrictHostKeyChecking=no -o ConnectTimeout=60 -o ServerAliveInterval=300 -o ServerAliveCountMax=6 -o PreferredAuthentications=keyboard-interactive,password -R 0:localhost:50125 -N 192.168.122.184
> [ 302.026882] launch-virt-p2v[754]: nbdkit: file[1]: error: reading initial client flags: conn->recv: Connection reset by peer
>
> [ 302.410966] launch-virt-p2v[669]: virt-p2v: data connection for /dev/nvme1n2: SSH remote port 38663, local port 50125
I formatted the series with "-W" (aka "--function-context"), for easier
review.
Some patches are best viewed with "-b" (aka "--ignore-space-change"),
for masking un-indentation; I did not use that option for posting this
series, as it could interfere with applying the patches from the list.
For looking at some of the patches like that, fetch the series from the
URL at the top (or apply it from the list), and run "git show -b"
locally.
Thanks,
Laszlo
Laszlo Ersek (10):
remove qemu-nbd support
remove "--nbd=nbdkit-no-sa" option parsing
nbd.c: simplify start_nbdkit()
open-code "localhost" as the listen hostname for nbdkit
nbd.c: remove bind_source_port()
remove "--nbd" option parsing
nbd.c: remove nbd_server_string()
nbd.c: remove "enum nbd_server"
rely on Linux for killing nbdkit, when the parent thread exits
nbd.c: bind listening socket without AI_ADDRCONFIG
Makefile.am | 2 -
contrib/aux-scripts/do-build.sh | 7 +-
contrib/patches/0002-RHEL-5-ONLY-QEMU-NBD-1.4-HAS-NO-f-OPTION.patch | 34 --
conversion.c | 23 +-
dependencies.m4 | 6 +-
docs/p2v-building.pod | 9 +-
main.c | 7 +-
nbd.c | 514 +++-----------------
p2v.h | 10 +-
ssh.c | 6 +-
test-virt-p2v-nbdkit.sh | 6 +-
test-virt-p2v-scp.sh | 2 +-
test-virt-p2v-ssh.sh | 4 +-
test-virt-p2v.sh | 56 ---
virt-p2v.pod | 49 +-
15 files changed, 109 insertions(+), 626 deletions(-)
delete mode 100644 contrib/patches/0002-RHEL-5-ONLY-QEMU-NBD-1.4-HAS-NO-f-OPTION.patch
delete mode 100755 test-virt-p2v.sh
base-commit: c1a4bd83a8bba5959470ef1f6deb06dc61587112
--
2.19.1.3.g30247aa5d201
2 years, 7 months