[PATCH nbdkit v2] tmpdisk: Generalize the tmpdisk plugin
by Richard W.M. Jones
An evolution of v1 here:
https://www.redhat.com/archives/libguestfs/2020-April/msg00035.html
I want to generalize the tmpdisk plugin, particularly so you can use
commands like ‘qemu-img create’ or even ‘virt-builder’.
(Actually virt-builder really works - I tested it - but of course it
causes a 30+ second delay when connecting to the server.)
You can now use commands such as:
nbdkit tmpdisk 16G command=' truncate -s $size "$disk" '
The way it works is it creates a temporary directory under $TMPDIR,
runs the external command with disk=$TMPDIR/<random>/disk, then when
the external command finishes the plugin opens the disk, finds out the
size and serves it. At the same time the plugin deletes the disk and
temporary subdirectory so it is all automatically cleaned up even if
nbdkit crashes.
It seems this is secure because mkdtemp(3) creates the subdirectory
with 0700 permissions, so no other user on the same machine should be
able to monkey around with the disk. Hopefully. But I suggest Eric
takes a closer look with his much wider experience :-)
Rich.
4 years, 7 months
[nbdkit PATCH 0/2] stdin/out cleanups
by Eric Blake
This is what I've been playing with in response to my earlier question
about what to do with 'nbdkit -s sh -'
(https://www.redhat.com/archives/libguestfs/2020-April/msg00032.html)
I'm still open to ideas on a better name, and/or whether adding
<stdbool.h> to our public include files is a good idea (if not,
returning int instead of bool is tolerable).
Eric Blake (2):
server: Add nbdkit_stdio_safe
server: Sanitize stdin/out before running plugin code
docs/nbdkit-plugin.pod | 23 +++++++++++++++++++-
plugins/sh/nbdkit-sh-plugin.pod | 4 +++-
include/nbdkit-common.h | 2 ++
server/internal.h | 2 ++
server/background.c | 12 ++++-------
server/captive.c | 10 +++++++--
server/connections.c | 12 -----------
server/main.c | 38 ++++++++++++++++++++++++++++++---
server/nbdkit.syms | 1 +
server/public.c | 18 +++++++++++++++-
server/test-public.c | 23 ++++++++++++++++++--
plugins/sh/sh.c | 7 +++++-
tests/test-layers-plugin.c | 12 ++++++++++-
tests/test-layers.c | 4 +++-
14 files changed, 135 insertions(+), 33 deletions(-)
--
2.26.0.rc2
4 years, 7 months
[PATCH nbdkit 0/2] Generalize the tmpdisk plugin.
by Richard W.M. Jones
Patch 1/2 is uncontroversial.
Patch 2/2 is an interesting idea I had to generalize this plugin. It
already uses a complete embedded shell script to do most of the work.
What if, instead of making special cases for "type" and "label"
params, we simply turn any other plugin parameters into script
variables? This part of it works fine. However there is another
problem which is noted in the "XXX" comment in the second commit
message.
Rich.
4 years, 7 months
[v2v PATCH 1/2] v2v: nbdkit: change base dir for nbdkit sockets/pidfiles
by Pino Toscano
Since this new temporary directory will contain UNIX sockets for
communicating with nbdkit, then its path must not be too long.
Use the existing directory that libguestfs exposes for this, i.e.
sockdir.
---
v2v/nbdkit.ml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/v2v/nbdkit.ml b/v2v/nbdkit.ml
index 65317f9b..46b20c9d 100644
--- a/v2v/nbdkit.ml
+++ b/v2v/nbdkit.ml
@@ -103,9 +103,12 @@ let add_filter_if_available cmd filter =
if probe_filter filter then add_filter cmd filter else cmd
let run_unix cmd =
- (* Create a temporary directory where we place the socket and PID file. *)
+ (* 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_cachedir () in
+ 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.
--
2.25.1
4 years, 7 months
[v2v PATCH] tests: fix location to generated images
by Pino Toscano
Some of the libvirt XMLs for tests refer to a generated phony disk
image, and so far the relative path used worked almost by chance.
(For each disk, the path to it was ../test-data/etc, and since the
overlay pointing to it is stored directly in $LIBGUESTFS_CACHEDIR,
which is $buildir/tmp, then the relative path was resolved.)
Instead, have configure place the right top-level directory in those
XMLs, so the full path points to the generated disks. This fixes the
tests for at least two cases:
- we change the place where the temporary overlays are stored
- in srcdir!=builddir builds
There is no functional change to the tests themselves.
---
.gitignore | 7 +++++++
configure.ac | 7 +++++++
tests/Makefile.am | 9 +--------
tests/rhbz1232192.sh | 2 +-
tests/{rhbz1232192.xml => rhbz1232192.xml.in} | 4 ++--
tests/test-v2v-cdrom.sh | 2 +-
tests/{test-v2v-cdrom.xml => test-v2v-cdrom.xml.in} | 4 ++--
tests/test-v2v-floppy.sh | 2 +-
tests/{test-v2v-floppy.xml => test-v2v-floppy.xml.in} | 4 ++--
tests/test-v2v-mac.sh | 2 +-
tests/{test-v2v-mac.xml => test-v2v-mac.xml.in} | 2 +-
tests/test-v2v-networks-and-bridges.sh | 2 +-
...-bridges.xml => test-v2v-networks-and-bridges.xml.in} | 2 +-
tests/test-v2v-print-source.sh | 2 +-
...v2v-print-source.xml => test-v2v-print-source.xml.in} | 2 +-
tests/test-v2v-sound.sh | 2 +-
tests/{test-v2v-sound.xml => test-v2v-sound.xml.in} | 2 +-
17 files changed, 32 insertions(+), 25 deletions(-)
rename tests/{rhbz1232192.xml => rhbz1232192.xml.in} (75%)
rename tests/{test-v2v-cdrom.xml => test-v2v-cdrom.xml.in} (89%)
rename tests/{test-v2v-floppy.xml => test-v2v-floppy.xml.in} (89%)
rename tests/{test-v2v-mac.xml => test-v2v-mac.xml.in} (96%)
rename tests/{test-v2v-networks-and-bridges.xml => test-v2v-networks-and-bridges.xml.in} (96%)
rename tests/{test-v2v-print-source.xml => test-v2v-print-source.xml.in} (90%)
rename tests/{test-v2v-sound.xml => test-v2v-sound.xml.in} (93%)
diff --git a/.gitignore b/.gitignore
index 0914ea9b..b504a4c2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -128,7 +128,14 @@ Makefile.in
/test-harness/stamp-virt-v2v-test-harness.pod
/test-harness/virt-v2v-test-harness.1
/tests/libvirt-is-version
+/tests/rhbz1232192.xml
+/tests/test-v2v-cdrom.xml
/tests/test-v2v-conversion-of-*.sh
+/tests/test-v2v-floppy.xml
+/tests/test-v2v-mac.xml
+/tests/test-v2v-networks-and-bridges.xml
+/tests/test-v2v-print-source.xml
+/tests/test-v2v-sound.xml
/tests/windows.vmdk
/v2v/.depend
/v2v/config.ml
diff --git a/configure.ac b/configure.ac
index 73cf2081..e8a3133a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,6 +153,13 @@ AC_CONFIG_FILES([Makefile
test-harness/Makefile
test-harness/META
tests/Makefile
+ tests/rhbz1232192.xml
+ tests/test-v2v-cdrom.xml
+ tests/test-v2v-floppy.xml
+ tests/test-v2v-mac.xml
+ tests/test-v2v-networks-and-bridges.xml
+ tests/test-v2v-print-source.xml
+ tests/test-v2v-sound.xml
v2v/Makefile
v2v/config.ml])
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 267e4454..4456dc4c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -177,11 +177,9 @@ EXTRA_DIST += \
test-v2v-bad-networks-and-bridges.sh \
test-v2v-cdrom.expected \
test-v2v-cdrom.sh \
- test-v2v-cdrom.xml \
test-v2v-copy-to-local.sh \
test-v2v-floppy.expected \
test-v2v-floppy.sh \
- test-v2v-floppy.xml \
test-v2v-i-disk.sh \
test-v2v-i-ova-as-root.ovf \
test-v2v-i-ova-as-root.sh \
@@ -232,8 +230,6 @@ EXTRA_DIST += \
test-v2v-machine-readable.sh \
test-v2v-mac-expected.xml \
test-v2v-mac.sh \
- test-v2v-mac.xml \
- test-v2v-networks-and-bridges-expected.xml \
test-v2v-networks-and-bridges.sh \
test-v2v-networks-and-bridges.xml \
test-v2v-no-copy.sh \
@@ -258,12 +254,9 @@ EXTRA_DIST += \
test-v2v-print-estimate.sh \
test-v2v-print-source.expected \
test-v2v-print-source.sh \
- test-v2v-print-source.xml \
test-v2v-conversion-of.sh \
test-v2v-sound.sh \
- test-v2v-sound.xml \
test-v2v-trim.sh \
test-v2v-virtio-win-iso.sh \
test-v2v-windows-conversion.sh \
- rhbz1232192.sh \
- rhbz1232192.xml
+ rhbz1232192.sh
diff --git a/tests/rhbz1232192.sh b/tests/rhbz1232192.sh
index 80f86003..2d4b342b 100755
--- a/tests/rhbz1232192.sh
+++ b/tests/rhbz1232192.sh
@@ -30,4 +30,4 @@ skip_unless_phony_guest blank-disk.img
export VIRT_TOOLS_DATA_DIR="$top_srcdir/test-data/fake-virt-tools"
-virt-v2v -i libvirtxml "$srcdir/rhbz1232192.xml" -o null --no-copy
+virt-v2v -i libvirtxml rhbz1232192.xml -o null --no-copy
diff --git a/tests/rhbz1232192.xml b/tests/rhbz1232192.xml.in
similarity index 75%
rename from tests/rhbz1232192.xml
rename to tests/rhbz1232192.xml.in
index 79f019d3..03eb3049 100644
--- a/tests/rhbz1232192.xml
+++ b/tests/rhbz1232192.xml.in
@@ -14,12 +14,12 @@
<devices>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
- <source file='../test-data/phony-guests/windows.img'/>
+ <source file='@abs_top_builddir(a)/test-data/phony-guests/windows.img'/>
<target dev='hda' bus='ide'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
- <source file='../test-data/phony-guests/blank-disk.img'/>
+ <source file='@abs_top_builddir(a)/test-data/phony-guests/blank-disk.img'/>
<target dev='hdb' bus='ide'/>
</disk>
</devices>
diff --git a/tests/test-v2v-cdrom.sh b/tests/test-v2v-cdrom.sh
index 8adc5103..9915f8ac 100755
--- a/tests/test-v2v-cdrom.sh
+++ b/tests/test-v2v-cdrom.sh
@@ -27,7 +27,7 @@ skip_if_backend uml
skip_unless_phony_guest windows.img
skip_unless_phony_guest blank-disk.img
-libvirt_uri="test://$abs_srcdir/test-v2v-cdrom.xml"
+libvirt_uri="test://$abs_builddir/test-v2v-cdrom.xml"
export VIRT_TOOLS_DATA_DIR="$top_srcdir/test-data/fake-virt-tools"
export VIRTIO_WIN="$top_srcdir/test-data/fake-virtio-win"
diff --git a/tests/test-v2v-cdrom.xml b/tests/test-v2v-cdrom.xml.in
similarity index 89%
rename from tests/test-v2v-cdrom.xml
rename to tests/test-v2v-cdrom.xml.in
index b0c29ebd..6bad5eab 100644
--- a/tests/test-v2v-cdrom.xml
+++ b/tests/test-v2v-cdrom.xml.in
@@ -27,14 +27,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
<devices>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
- <source file='../test-data/phony-guests/windows.img'/>
+ <source file='@abs_top_builddir(a)/test-data/phony-guests/windows.img'/>
<!-- virt-v2v should install virtio drivers and turn this
into dev='vda' bus='virtio' -->
<target dev='hda' bus='ide'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
- <source file='../test-data/phony-guests/blank-disk.img'/>
+ <source file='@abs_top_builddir(a)/test-data/phony-guests/blank-disk.img'/>
<!-- virt-v2v should preserve the device name and bus -->
<target dev='hdc' bus='ide'/>
</disk>
diff --git a/tests/test-v2v-floppy.sh b/tests/test-v2v-floppy.sh
index 5855bb2e..07b9ac26 100755
--- a/tests/test-v2v-floppy.sh
+++ b/tests/test-v2v-floppy.sh
@@ -27,7 +27,7 @@ skip_if_backend uml
skip_unless_phony_guest windows.img
skip_unless_phony_guest blank-disk.img
-libvirt_uri="test://$abs_srcdir/test-v2v-floppy.xml"
+libvirt_uri="test://$abs_builddir/test-v2v-floppy.xml"
export VIRT_TOOLS_DATA_DIR="$top_srcdir/test-data/fake-virt-tools"
export VIRTIO_WIN="$top_srcdir/test-data/fake-virtio-win"
diff --git a/tests/test-v2v-floppy.xml b/tests/test-v2v-floppy.xml.in
similarity index 89%
rename from tests/test-v2v-floppy.xml
rename to tests/test-v2v-floppy.xml.in
index 5204432f..1a5c41a7 100644
--- a/tests/test-v2v-floppy.xml
+++ b/tests/test-v2v-floppy.xml.in
@@ -27,14 +27,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
<devices>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
- <source file='../test-data/phony-guests/windows.img'/>
+ <source file='@abs_top_builddir(a)/test-data/phony-guests/windows.img'/>
<!-- virt-v2v should install virtio drivers and turn this
into dev='vda' bus='virtio' -->
<target dev='hda' bus='ide'/>
</disk>
<disk type='file' device='floppy'>
<driver name='qemu' type='raw'/>
- <source file='../test-data/phony-guests/blank-disk.img'/>
+ <source file='@abs_top_builddir(a)/test-data/phony-guests/blank-disk.img'/>
<target dev='fda' />
</disk>
</devices>
diff --git a/tests/test-v2v-mac.sh b/tests/test-v2v-mac.sh
index 9132fe2f..7e1d1047 100755
--- a/tests/test-v2v-mac.sh
+++ b/tests/test-v2v-mac.sh
@@ -25,7 +25,7 @@ skip_if_skipped
skip_if_backend uml
skip_unless_phony_guest windows.img
-libvirt_uri="test://$abs_srcdir/test-v2v-mac.xml"
+libvirt_uri="test://$abs_builddir/test-v2v-mac.xml"
f=$top_builddir/test-data/phony-guests/windows.img
export VIRT_TOOLS_DATA_DIR="$top_srcdir/test-data/fake-virt-tools"
diff --git a/tests/test-v2v-mac.xml b/tests/test-v2v-mac.xml.in
similarity index 96%
rename from tests/test-v2v-mac.xml
rename to tests/test-v2v-mac.xml.in
index c6f99219..28130b2c 100644
--- a/tests/test-v2v-mac.xml
+++ b/tests/test-v2v-mac.xml.in
@@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
<devices>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
- <source file='../test-data/phony-guests/windows.img'/>
+ <source file='@abs_top_builddir(a)/test-data/phony-guests/windows.img'/>
<target dev='vda' bus='virtio'/>
</disk>
diff --git a/tests/test-v2v-networks-and-bridges.sh b/tests/test-v2v-networks-and-bridges.sh
index 74aea4da..0921926b 100755
--- a/tests/test-v2v-networks-and-bridges.sh
+++ b/tests/test-v2v-networks-and-bridges.sh
@@ -25,7 +25,7 @@ skip_if_skipped
skip_if_backend uml
skip_unless_phony_guest windows.img
-libvirt_uri="test://$abs_srcdir/test-v2v-networks-and-bridges.xml"
+libvirt_uri="test://$abs_builddir/test-v2v-networks-and-bridges.xml"
f=$top_builddir/test-data/phony-guests/windows.img
export VIRT_TOOLS_DATA_DIR="$top_srcdir/test-data/fake-virt-tools"
diff --git a/tests/test-v2v-networks-and-bridges.xml b/tests/test-v2v-networks-and-bridges.xml.in
similarity index 96%
rename from tests/test-v2v-networks-and-bridges.xml
rename to tests/test-v2v-networks-and-bridges.xml.in
index 7a90747d..b99184fa 100644
--- a/tests/test-v2v-networks-and-bridges.xml
+++ b/tests/test-v2v-networks-and-bridges.xml.in
@@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
<devices>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
- <source file='../test-data/phony-guests/windows.img'/>
+ <source file='@abs_top_builddir(a)/test-data/phony-guests/windows.img'/>
<target dev='vda' bus='virtio'/>
</disk>
diff --git a/tests/test-v2v-print-source.sh b/tests/test-v2v-print-source.sh
index 70fc2d60..b6daafd2 100755
--- a/tests/test-v2v-print-source.sh
+++ b/tests/test-v2v-print-source.sh
@@ -29,7 +29,7 @@ rm -rf $d
mkdir $d
$VG virt-v2v --debug-gc \
- -i libvirtxml "$srcdir/test-v2v-print-source.xml" \
+ -i libvirtxml test-v2v-print-source.xml \
-o local -os $d \
--print-source > $d/output
diff --git a/tests/test-v2v-print-source.xml b/tests/test-v2v-print-source.xml.in
similarity index 90%
rename from tests/test-v2v-print-source.xml
rename to tests/test-v2v-print-source.xml.in
index 3768caf4..2f83fc73 100644
--- a/tests/test-v2v-print-source.xml
+++ b/tests/test-v2v-print-source.xml.in
@@ -18,7 +18,7 @@
<devices>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
- <source file='../test-data/phony-guests/windows.img'/>
+ <source file='@abs_top_builddir(a)/test-data/phony-guests/windows.img'/>
<target dev='vda' bus='virtio'/>
</disk>
<interface type='network'>
diff --git a/tests/test-v2v-sound.sh b/tests/test-v2v-sound.sh
index b8e2ab78..c31b4c46 100755
--- a/tests/test-v2v-sound.sh
+++ b/tests/test-v2v-sound.sh
@@ -25,7 +25,7 @@ skip_if_skipped
skip_if_backend uml
skip_unless_phony_guest windows.img
-libvirt_uri="test://$abs_srcdir/test-v2v-sound.xml"
+libvirt_uri="test://$abs_builddir/test-v2v-sound.xml"
f=$top_builddir/test-data/phony-guests/windows.img
export VIRT_TOOLS_DATA_DIR="$top_srcdir/test-data/fake-virt-tools"
diff --git a/tests/test-v2v-sound.xml b/tests/test-v2v-sound.xml.in
similarity index 93%
rename from tests/test-v2v-sound.xml
rename to tests/test-v2v-sound.xml.in
index 44e67cbc..18f011eb 100644
--- a/tests/test-v2v-sound.xml
+++ b/tests/test-v2v-sound.xml.in
@@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
<devices>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
- <source file='../test-data/phony-guests/windows.img'/>
+ <source file='@abs_top_builddir(a)/test-data/phony-guests/windows.img'/>
<target dev='vda' bus='virtio'/>
</disk>
<sound model="ich9"/>
--
2.25.1
4 years, 7 months
[supermin PATCH v2 0/4] Check for output results for --if-newer (RHBZ#1813809)
by Pino Toscano
This is an attempt to make supermin check for the existing results of an
output when checking whether the appliance must be rebuilt using
--if-newer.
At the moment it is implemented only for the ext2 output format of the
build mode.
Changes from v1:
- drop empty stub for the prepare mode
- add patch to ignore --if-newer on modes different than build
- squash patch with stub for the build mode and patch with the build
mode files together
Pino Toscano (4):
build: factor ext2 filenames
Tighten Unix_error check for missing outputdir
Act on --if-newer only for build mode
build: check for outputs in --if-newer check (RHBZ#1813809)
src/mode_build.ml | 22 ++++++++++++--
src/mode_build.mli | 4 +++
src/supermin.ml | 10 ++++---
tests/Makefile.am | 3 +-
tests/test-if-newer-ext2.sh | 57 +++++++++++++++++++++++++++++++++++++
5 files changed, 88 insertions(+), 8 deletions(-)
create mode 100755 tests/test-if-newer-ext2.sh
--
2.25.1
4 years, 7 months
Can I use guestfish to benchmark qemu performance?
by chl501@tutanota.com
I come across this page libguestfs.org/guestfs-performance.1.html <http://libguestfs.org/guestfs-performance.1.html> This raises my interest. I am currently learning how to benchmark performance qemu. So here is my questions:
1. Can I use guestfish or any tools provided by libguestfs to benchmark qemu? How? (The command I use below is correct or what's the correct command to execute it?)
The preliminarily run I use is "time guestfish --ro -a disk.img -i exit run -v -x" and its output on console wrt the time are
real 0m3.713s
user 0m1.968s
sys 0m0.741s
There many output with -v -x params enabled
...
guestfsd: => internal_autosync (0x11a) took 0.05 secs
libguestfs: trace: internal_autosync = 0
libguestfs: sending SIGTERM to process 11629
libguestfs: qemu maxrss 235720K
libguestfs: trace: shutdown = 0
libguestfs: trace: close
libguestfs: closing guestfs handle 0x562ae3df6c10 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsIDYj9s
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /run/user/1000/libguestfs2SKM4c
2. If the tool such as guestfish (or any other tools provided by libguestfs) can be used to benchmark qemu's performance, is it possible to identify the execution time spent on different processes e.g. init? How?
3. How do I interpret the output with -v -x for the command guestfish (like the command being executed below)?
Thanks for help.
4 years, 7 months
IRC question about consuming stdin
by Richard W.M. Jones
12:39 < eblake> rwmjones: 'nbdkit -s sh -' won't work, neither will 'nbdkit -s curl password=-'
12:40 < eblake> should we have an easier way for plugins to detect whether they can safely consume stdin and/or write to stdout during .config?
12:40 < eblake> and in turn, have nbdkit_read_password() check whether reading from stdin is safe?
12:40 < eblake> so that we fail fast rather than trying to get to .open
12:44 < eblake> I was trying to write a patch that would guarantee stdin/out are /dev/null from .open onwards, but found (the hard way) that we have several
instances where we depend on stdin/out interaction during .config (at least, when -s is not in use)
12:45 < eblake> right now, when nbdkit daemonizes, stdin/out are /dev/null, but with -f, or with --run, they are still whatever was passed to nbdkit, which feels
inconsistent
12:46 < eblake> and with -s, if the plugin accidentally uses stdin/out, it will corrupt the NBD protocol
12:49 < eblake> I'm wondering if we should add 'bool nbdkit_is_interactive()' [or better name] which returns false for -s, true otherwise, so .config can decide
when it is safe to consume stdin
(I haven't looked at this, but as my IRC access is for
some reason up and down today, it's probably best to
continue this discussion on email)
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
4 years, 7 months
[nbdkit PATCH v2] vddk: Drop support for VDDK 5.1.1
by Eric Blake
That version depends on libexpat.so but does not ship it, and it
appears that VMware no longer supports it. Since VDDK 5.5.5 (the next
oldest version) dropped support for 32-bit platforms, we can slightly
simplify our code by documenting our minimum supported version.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
v2: scrub for more places to clean up, based on Rich's review of v1
plugins/vddk/nbdkit-vddk-plugin.pod | 5 ++---
configure.ac | 7 ++++---
plugins/vddk/vddk-stubs.h | 2 +-
plugins/vddk/vddk.c | 10 +++++-----
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/plugins/vddk/nbdkit-vddk-plugin.pod b/plugins/vddk/nbdkit-vddk-plugin.pod
index 289322dd..d659b2e9 100644
--- a/plugins/vddk/nbdkit-vddk-plugin.pod
+++ b/plugins/vddk/nbdkit-vddk-plugin.pod
@@ -152,8 +152,6 @@ compile time is used, see L</DUMP-PLUGIN OUTPUT> below.
Port used to establish an NFC connection to ESXi. Defaults to 902.
-(Only supported in VDDK ≥ 5.5.5 and ≥ 6.0.1)
-
=item B<password=>PASSWORD
Set the password to use when connecting to the remote server.
@@ -435,7 +433,8 @@ For more information see L<https://bugzilla.redhat.com/1614276>.
=head1 SUPPORTED VERSIONS OF VDDK
-This plugin requires VDDK E<ge> 5.1.1.
+This plugin requires VDDK E<ge> 5.5.5, which in turn means that it
+is only supported on x64-64 platforms.
It has been tested with all versions up to 6.7 (but should work with
future versions).
diff --git a/configure.ac b/configure.ac
index 9ca3bdad..ad95a7e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -950,10 +950,11 @@ AC_ARG_ENABLE([vddk],
[disable VMware VDDK plugin])],
[],
[
- dnl VDDK is only available on i686 up to 5.1.1, and only x86-64
- dnl after that. Don't compile on other platforms.
+ dnl While VDDK was available on i686 in 5.1.1, we only support 5.5.5
+ dnl and newer, which is supported only on x86-64. Don't compile on
+ dnl other platforms.
AC_MSG_CHECKING([if the host CPU is compatible with VDDK])
- AS_IF([test "$host_cpu" = "x86_64" || test "$host_cpu" = "i686"],[
+ AS_IF([test "$host_cpu" = "x86_64"],[
AC_MSG_RESULT([yes ($host_cpu)])
enable_vddk=yes
],[
diff --git a/plugins/vddk/vddk-stubs.h b/plugins/vddk/vddk-stubs.h
index b9dd17fb..86cb2512 100644
--- a/plugins/vddk/vddk-stubs.h
+++ b/plugins/vddk/vddk-stubs.h
@@ -40,7 +40,7 @@
*/
/* Required stubs, present in all versions of VDDK that we support. I
- * have checked that all these exist in at least VDDK 5.1.1 (2011)
+ * have checked that all these exist in at least VDDK 5.5.5 (2015)
* which is the earliest version of VDDK that we support.
*/
diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c
index e2c0bf7d..87c0d146 100644
--- a/plugins/vddk/vddk.c
+++ b/plugins/vddk/vddk.c
@@ -70,7 +70,7 @@ int vddk_debug_datapath = 1;
/* Parameters passed to InitEx. */
#define VDDK_MAJOR 5
-#define VDDK_MINOR 1
+#define VDDK_MINOR 5
static void *dl; /* dlopen handle */
static bool init_called; /* was InitEx called */
@@ -363,14 +363,14 @@ load_library (void)
static const char *sonames[] = {
/* Prefer the newest library in case multiple exist. Check two
* possible directories: the usual VDDK installation puts .so
- * files in an arch-specific subdirectory of $libdir (although
- * only VDDK 5 supported 32-bit); but our testsuite is easier
- * to write if we point libdir directly to a stub .so.
+ * files in an arch-specific subdirectory of $libdir (our minimum
+ * supported version is VDDK 5.5.5, which only supports x64-64);
+ * but our testsuite is easier to write if we point libdir
+ * directly to a stub .so.
*/
"lib64/libvixDiskLib.so.6",
"libvixDiskLib.so.6",
"lib64/libvixDiskLib.so.5",
- "lib32/libvixDiskLib.so.5",
"libvixDiskLib.so.5",
};
size_t i;
--
2.26.0.rc2
4 years, 7 months