Status of R/W UFS
by Andre Goree
Is r/w to a UFS partition using 'guestmount' still an impossibility?
From everything I've found, it seems to be something that is not
possible at the moment. I was just wondering if that has changed or if
there are plans to change that?
Here is the issue I'm experiencing:
~# guestmount --rw -a ${disk_path}/${disk_name} -m /dev/sda4
/tmp/freebsd-master
libguestfs: error: mount_options: /dev/vda4 on /: mount: wrong fs type,
bad option, bad superblock on /dev/vda4,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
guestmount: '/dev/sda4' could not be mounted. Did you mean one of
these?
/dev/sda4 (ufs)
I have the output from '-- guestmount --rw -a ${disk_path}/${disk_name}
--trace --verbose -m /dev/sda4 /tmp/freebsd-master' here:
http://pastebin.com/NT2b2HM9
This appears to be a similar problem to this one, in which I gathered
that r/w to ufs is not possible:
https://www.redhat.com/archives/libguestfs/2012-June/msg00077.html
I get the feeling that this is something I'd need to roll my own kernel
for, or perhaps just the module? If anyone could point me in the right
direction, that'd be awesome. My apologies for the noise if this is the
wrong list for this type of question.
Andre Goree
-=-=-=-=-=-
Email - andre at drenet.net
Website - http://www.drenet.net
PGP key - http://www.drenet.net/0x83ADAAAB.asc
-=-=-=-=-=-
10 years, 11 months
Errors Running on Ubuntu 13.10
by Tim Fall
I'm trying to use virt-sysprep on an Ubuntu 13.10 vm running on OpenStack.
I've followed the command "gotchas" from the FAQ and still not had any luck.
*What are you trying to do?*
Attempting to use virt-sysprep on a qcow2 image made with virt-install
*What commands?*
I've run virt-sysprep (with both -d and -a options) and gotten the
following error:
Fatal error: exception Guestfs.Error("guestfs_launch failed.
This usually means the libguestfs appliance failed to start or crashed.
See http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs
or run 'libguestfs-test-tool' and post the *complete* output into a
bug report
I then went through the FAQ and followed the recommended steps.
Running libguestft-test-tool yields:
************************************************************
* IMPORTANT NOTICE
*
* When reporting bugs, include the COMPLETE, UNEDITED
* output below in your bug report.
*
************************************************************
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SELinux: sh: 1: getenforce: not found
library version: 1.22.4
guestfs_get_append: (null)
guestfs_get_backend: direct
guestfs_get_autosync: 1
guestfs_get_cachedir: /var/tmp
guestfs_get_direct: 0
guestfs_get_memsize: 500
guestfs_get_network: 0
guestfs_get_path: /usr/lib/guestfs
guestfs_get_pgroup: 0
guestfs_get_program: libguestfs-test-tool
guestfs_get_qemu: /usr/bin/qemu-system-x86_64
guestfs_get_recovery_proc: 1
guestfs_get_selinux: 0
guestfs_get_smp: 1
guestfs_get_tmpdir: /tmp
guestfs_get_trace: 0
guestfs_get_verbose: 1
host_cpu: x86_64
Launching appliance, timeout set to 600 seconds.
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfsH1o0hZ
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: command: run: supermin-helper
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ -f checksum
libguestfs: command: run: \ /usr/lib/guestfs/supermin.d
libguestfs: command: run: \ x86_64
supermin helper [00000ms] whitelist = (not specified), host_cpu = x86_64,
kernel = (null), initrd = (null), appliance = (null)
supermin helper [00000ms] inputs[0] = /usr/lib/guestfs/supermin.d
checking modpath /lib/modules/3.11.0-15-generic is a directory
picked vmlinuz-3.11.0-15-generic because modpath
/lib/modules/3.11.0-15-generic exists
supermin helper [00000ms] finished creating kernel
supermin helper [00000ms] visiting /usr/lib/guestfs/supermin.d
supermin helper [00000ms] visiting /usr/lib/guestfs/supermin.d/base.img
supermin helper [00000ms] visiting /usr/lib/guestfs/supermin.d/daemon.img
supermin helper [00000ms] visiting /usr/lib/guestfs/supermin.d/hostfiles
supermin helper [00024ms] visiting /usr/lib/guestfs/supermin.d/init.img
supermin helper [00024ms] visiting
/usr/lib/guestfs/supermin.d/udev-rules.img
supermin helper [00024ms] adding kernel modules
supermin helper [00036ms] finished creating appliance
libguestfs: checksum of existing appliance:
9b64713489581d48f30dd83cc66458a1ef2d1a86dbc27d385cac945d7491f121
libguestfs: [00040ms] begin testing qemu features
libguestfs: command: run: /usr/bin/qemu-system-x86_64
libguestfs: command: run: \ -nographic
libguestfs: command: run: \ -help
libguestfs: command: run: /usr/bin/qemu-system-x86_64
libguestfs: command: run: \ -nographic
libguestfs: command: run: \ -version
libguestfs: qemu version 1.5
libguestfs: command: run: /usr/bin/qemu-system-x86_64
libguestfs: command: run: \ -nographic
libguestfs: command: run: \ -machine accel=kvm:tcg
libguestfs: command: run: \ -device ?
libguestfs: [00145ms] finished testing qemu features
[00145ms] /usr/bin/qemu-system-x86_64 \
-global virtio-blk-pci.scsi=off \
-nodefconfig \
-nodefaults \
-nographic \
-device virtio-scsi-pci,id=scsi \
-drive
file=/tmp/libguestfs-test-tool-sda-r1GMFw,cache=none,format=raw,id=hd0,if=none
\
-device scsi-hd,drive=hd0 \
-drive
file=/var/tmp/.guestfs-0/root.2492,snapshot=on,id=appliance,if=none,cache=unsafe
\
-device scsi-hd,drive=appliance \
-machine accel=kvm:tcg \
-m 500 \
-no-reboot \
-no-hpet \
-device virtio-serial \
-serial stdio \
-device sga \
-chardev socket,path=/tmp/libguestfsH1o0hZ/guestfsd.sock,id=channel0 \
-device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
-kernel /var/tmp/.guestfs-0/kernel.2492 \
-initrd /var/tmp/.guestfs-0/initrd.2492 \
-append 'panic=1 console=ttyS0 udevtimeout=600 no_timer_check acpi=off
printk.time=1 cgroup_disable=memory root=/dev/sdb selinux=0
guestfs_verbose=1 TERM=xterm'\x1b[1;256r\x1b[256;256H\x1b[6n
Google, Inc.
Serial Graphics Adapter 06/09/13
SGABIOS $Id: sgabios.S 8 2010-04-22 00:03:40Z nlaredo $ (buildd@allspice)
Sun Jun 9 17:23:53 UTC 2013
Term: 80x24
4 0
SeaBIOS (version 1.7.3-20130708_231806-aatxe)
Booting from ROM...
\x1b[2J[ 0.000000] Initializing cgroup subsys cpuset
libguestfs: error: appliance closed the connection unexpectedly, see
earlier error messages
libguestfs: child_cleanup: 0x19a9580: child process died
libguestfs: sending SIGTERM to process 2502
libguestfs: error: guestfs_launch failed, see earlier error messages
libguestfs-test-tool: failed to launch appliance
libguestfs: closing guestfs handle 0x19a9580 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsH1o0hZ
*Version information:*
libguestfs-tools:
Installed: 1:1.22.4-1ubuntu1
Candidate: 1:1.22.4-1ubuntu1
Version table:
*** 1:1.22.4-1ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ saucy-updates/universe amd64
Packages
100 /var/lib/dpkg/status
1:1.22.4-1 0
500 http://archive.ubuntu.com/ubuntu/ saucy/universe amd64 Packages
virtinst:
Installed: 0.600.4-2ubuntu2.1
Candidate: 0.600.4-2ubuntu2.1
Version table:
*** 0.600.4-2ubuntu2.1 0
500 http://archive.ubuntu.com/ubuntu/ saucy-updates/main amd64
Packages
100 /var/lib/dpkg/status
0.600.4-2ubuntu2 0
500 http://archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages
seabios:
Installed: 1.7.3-1
Candidate: 1.7.3-1
Version table:
*** 1.7.3-1 0
500 http://archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages
100 /var/lib/dpkg/status
10 years, 11 months
[PATCH 00/10] New API: disk-create for creating blank disks.
by Richard W.M. Jones
A lot of code runs 'qemu-img create' or 'truncate' to create blank
disk images.
In the past I resisted adding an API to do this, since it essentially
duplicates what you can already do using other tools (ie. qemu-img).
However this does simplify calling code quite a lot since qemu-img is
somewhat error-prone to use (eg: don't try to create a disk called
"foo:bar") and it's generally hard to safely construct and run
external commands from C.
This is in preparation for finishing off the virt-make-fs rewrite
(patch coming later).
Rich.
10 years, 11 months
[PATCH] run: Actually use timeout --foreground option (RHBZ#1025269).
by Richard W.M. Jones
The following commit managed to not actually add the --foreground
option to the timeout command, just test for it. Add it this time.
commit 681488877456b83f039dc518861f29ab4e1857f0
Author: Richard W.M. Jones <rjones(a)redhat.com>
Date: Thu Dec 19 08:21:53 2013 +0000
run: Use timeout --foreground option.
If timeout doesn't have this option (RHEL 6) don't use timeout at all.
Attempt to fix RHBZ#1025269.
---
run.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/run.in b/run.in
index d4b13fe..93c50d2 100755
--- a/run.in
+++ b/run.in
@@ -231,7 +231,7 @@ if timeout --help >/dev/null 2>&1; then
if timeout --foreground 2 sleep 0 >/dev/null 2>&1; then
# Does this version of timeout have the -k option? (Not on RHEL 6)
if timeout -k 10s 10s true >/dev/null 2>&1; then
- timeout="timeout -k $timeout_kill $timeout_period"
+ timeout="timeout --foreground -k $timeout_kill $timeout_period"
fi
fi
fi
--
1.8.4.2
10 years, 11 months
[PATCH 1/2] daemon: If /selinux exists in the guest, bind-mount /sys/fs/selinux to there.
by Richard W.M. Jones
Commit 72afcf450a78b7e58f65b4a7aaf94d71cd25fca5 was partially
incorrect. If the guest userspace is expecting /selinux to exist,
then we should bind-mount /sys/fs/selinux from the appliance kernel
there.
---
daemon/command.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/daemon/command.c b/daemon/command.c
index 1aa1a52..939bf87 100644
--- a/daemon/command.c
+++ b/daemon/command.c
@@ -47,9 +47,10 @@ struct bind_state {
char *sysroot_dev;
char *sysroot_dev_pts;
char *sysroot_proc;
+ char *sysroot_selinux;
char *sysroot_sys;
char *sysroot_sys_fs_selinux;
- bool dev_ok, dev_pts_ok, proc_ok, sys_ok, sys_fs_selinux_ok;
+ bool dev_ok, dev_pts_ok, proc_ok, selinux_ok, sys_ok, sys_fs_selinux_ok;
};
struct resolver_state {
@@ -76,16 +77,18 @@ bind_mount (struct bind_state *bs)
bs->sysroot_dev = sysroot_path ("/dev");
bs->sysroot_dev_pts = sysroot_path ("/dev/pts");
bs->sysroot_proc = sysroot_path ("/proc");
+ bs->sysroot_selinux = sysroot_path ("/selinux");
bs->sysroot_sys = sysroot_path ("/sys");
bs->sysroot_sys_fs_selinux = sysroot_path ("/sys/fs/selinux");
if (bs->sysroot_dev == NULL || bs->sysroot_dev_pts == NULL ||
- bs->sysroot_proc == NULL || bs->sysroot_sys == NULL ||
- bs->sysroot_sys_fs_selinux == NULL) {
+ bs->sysroot_proc == NULL || bs->sysroot_selinux == NULL ||
+ bs->sysroot_sys == NULL || bs->sysroot_sys_fs_selinux == NULL) {
reply_with_perror ("malloc");
free (bs->sysroot_dev);
free (bs->sysroot_dev_pts);
free (bs->sysroot_proc);
+ free (bs->sysroot_selinux);
free (bs->sysroot_sys);
free (bs->sysroot_sys_fs_selinux);
return -1;
@@ -97,6 +100,11 @@ bind_mount (struct bind_state *bs)
bs->dev_pts_ok = r != -1;
r = command (NULL, NULL, str_mount, "--bind", "/proc", bs->sysroot_proc, NULL);
bs->proc_ok = r != -1;
+ /* Note on the next line we have to bind-mount /sys/fs/selinux (appliance
+ * kernel) on top of /selinux (where guest is expecting selinux).
+ */
+ r = command (NULL, NULL, str_mount, "--bind", "/sys/fs/selinux", bs->sysroot_selinux, NULL);
+ bs->selinux_ok = r != -1;
r = command (NULL, NULL, str_mount, "--bind", "/sys", bs->sysroot_sys, NULL);
bs->sys_ok = r != -1;
r = command (NULL, NULL, str_mount, "--bind", "/sys/fs/selinux", bs->sysroot_sys_fs_selinux, NULL);
@@ -121,6 +129,8 @@ free_bind_state (struct bind_state *bs)
free (bs->sysroot_sys_fs_selinux);
if (bs->sys_ok) umount_ignore_fail (bs->sysroot_sys);
free (bs->sysroot_sys);
+ if (bs->selinux_ok) umount_ignore_fail (bs->sysroot_selinux);
+ free (bs->sysroot_selinux);
if (bs->proc_ok) umount_ignore_fail (bs->sysroot_proc);
free (bs->sysroot_proc);
if (bs->dev_pts_ok) umount_ignore_fail (bs->sysroot_dev_pts);
--
1.8.4.2
10 years, 11 months
[PATCH] builder, sysprep: initialise the random generator
by Pino Toscano
virt-builder and virt-sysprep may make use of
Common_utils.string_random8 (which uses Random.int) for constructing
temporary paths; not initialising the random generator means that every
invocation will reuse the same name used previously (!).
Thus just call Random.self_init, just like virt-sparsify already does.
Expand the test-virt-sysprep-script.sh test to ensure that virt-sysprep
is not affected again by this issue.
---
.gitignore | 1 +
builder/builder.ml | 2 ++
sysprep/main.ml | 2 ++
sysprep/script4.sh | 21 +++++++++++++++++++++
sysprep/test-virt-sysprep-script.sh | 22 +++++++++++++++++++++-
5 files changed, 47 insertions(+), 1 deletion(-)
create mode 100755 sysprep/script4.sh
diff --git a/.gitignore b/.gitignore
index 74661b0..d9bef99 100644
--- a/.gitignore
+++ b/.gitignore
@@ -428,6 +428,7 @@ Makefile.in
/sysprep/.depend
/sysprep/stamp-script1.sh
/sysprep/stamp-script2.sh
+/sysprep/stamp-script4.sh
/sysprep/stamp-virt-sysprep.pod
/sysprep/sysprep-extra-options.pod
/sysprep/sysprep-operations.pod
diff --git a/builder/builder.ml b/builder/builder.ml
index 3c45fa5..6dc172f 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -33,6 +33,8 @@ let quote = Filename.quote
let prog = Filename.basename Sys.executable_name
+let () = Random.self_init ()
+
let main () =
(* Command line argument parsing - see cmdline.ml. *)
let mode, arg,
diff --git a/sysprep/main.ml b/sysprep/main.ml
index c1ce3c7..9431e88 100644
--- a/sysprep/main.ml
+++ b/sysprep/main.ml
@@ -31,6 +31,8 @@ let () = Sysprep_operation.bake ()
(* Command line argument parsing. *)
let prog = Filename.basename Sys.executable_name
+let () = Random.self_init ()
+
let debug_gc, operations, g, selinux_relabel, quiet, mount_opts =
let debug_gc = ref false in
let domain = ref None in
diff --git a/sysprep/script4.sh b/sysprep/script4.sh
new file mode 100755
index 0000000..fe377e0
--- /dev/null
+++ b/sysprep/script4.sh
@@ -0,0 +1,21 @@
+#!/bin/bash -
+# libguestfs virt-sysprep test --script option
+# Copyright (C) 2014 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 is used by test-virt-sysprep-script.sh.
+
+pwd >> $abs_builddir/stamp-script4.sh
diff --git a/sysprep/test-virt-sysprep-script.sh b/sysprep/test-virt-sysprep-script.sh
index 98ecb96..a62cfce 100755
--- a/sysprep/test-virt-sysprep-script.sh
+++ b/sysprep/test-virt-sysprep-script.sh
@@ -31,7 +31,7 @@ if [ ! -w /dev/fuse ]; then
fi
# Check that multiple scripts can run.
-rm -f stamp-script1.sh stamp-script2.sh
+rm -f stamp-script1.sh stamp-script2.sh stamp-script4.sh
if ! ./virt-sysprep -q -n -a ../tests/guests/fedora.img --enable script \
--script $abs_srcdir/script1.sh --script $abs_srcdir/script2.sh; then
echo "$0: virt-sysprep wasn't expected to exit with error."
@@ -48,3 +48,23 @@ if ./virt-sysprep -q -n -a ../tests/guests/fedora.img --enable script \
echo "$0: virt-sysprep didn't exit with an error."
exit 1
fi
+
+# Check that virt-sysprep uses a new temporary directory every time.
+if ! ./virt-sysprep -q -n -a ../tests/guests/fedora.img --enable script \
+ --script $abs_srcdir/script4.sh; then
+ echo "$0: virt-sysprep (script4.sh, try #1) wasn't expected to exit with error."
+ exit 1
+fi
+if ! ./virt-sysprep -q -n -a ../tests/guests/fedora.img --enable script \
+ --script $abs_srcdir/script4.sh; then
+ echo "$0: virt-sysprep (script4.sh, try #2) wasn't expected to exit with error."
+ exit 1
+fi
+if [ x"`wc -l stamp-script4.sh | awk '{print $1}'`" != x2 ]; then
+ echo "$0: stamp-script4.sh does not contain two lines."
+ exit 1
+fi
+if [ x"`head -n1 stamp-script4.sh`" == x"`tail -n1 stamp-script4.sh`" ]; then
+ echo "$0: stamp-script4.sh does not contain different paths."
+ exit 1
+fi
--
1.8.3.1
10 years, 11 months
[PATCH] tests/regressions: remove C part of rhbz1044014
by Pino Toscano
All it did was checking for a libvirt version, which is what
libvirt-is-version now does; hence remove the C part, and use guestfish,
ignoring the launch failure (as the C test did).
---
.gitignore | 1 -
tests/regressions/Makefile.am | 21 ------------
tests/regressions/rhbz1044014.c | 69 ----------------------------------------
tests/regressions/rhbz1044014.sh | 12 ++++++-
4 files changed, 11 insertions(+), 92 deletions(-)
delete mode 100644 tests/regressions/rhbz1044014.c
diff --git a/.gitignore b/.gitignore
index f84e2cd..74661b0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -492,7 +492,6 @@ Makefile.in
/tests/regressions/rhbz501893
/tests/regressions/rhbz790721
/tests/regressions/rhbz914931
-/tests/regressions/rhbz1044014
/tests/regressions/rhbz1044014.out
/tests/regressions/rhbz1055452
/tests/rsync/rsyncd.pid
diff --git a/tests/regressions/Makefile.am b/tests/regressions/Makefile.am
index d45a76c..8016e2f 100644
--- a/tests/regressions/Makefile.am
+++ b/tests/regressions/Makefile.am
@@ -84,10 +84,6 @@ check_PROGRAMS = \
rhbz914931 \
rhbz1055452
-if HAVE_LIBVIRT
-check_PROGRAMS += rhbz1044014
-endif
-
rhbz501893_SOURCES = rhbz501893.c
rhbz501893_CPPFLAGS = \
-I$(top_srcdir)/src -I$(top_builddir)/src
@@ -118,23 +114,6 @@ rhbz914931_CFLAGS = \
rhbz914931_LDADD = \
$(top_builddir)/src/libguestfs.la
-if HAVE_LIBVIRT
-rhbz1044014_SOURCES = rhbz1044014.c
-rhbz1044014_CPPFLAGS = \
- -I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
- -I$(top_srcdir)/src -I$(top_builddir)/src
-rhbz1044014_CFLAGS = \
- $(WARN_CFLAGS) $(WERROR_CFLAGS) \
- $(GPROF_CFLAGS) $(GCOV_CFLAGS) \
- $(LIBVIRT_CFLAGS)
-rhbz1044014_LDADD = \
- $(top_builddir)/src/libutils.la \
- $(top_builddir)/src/libguestfs.la \
- $(LIBVIRT_LIBS) \
- $(LIBXML2_LIBS) \
- $(top_builddir)/gnulib/lib/libgnu.la
-endif
-
rhbz1055452_SOURCES = rhbz1055452.c
rhbz1055452_CPPFLAGS = \
-I$(top_srcdir)/src -I$(top_builddir)/src \
diff --git a/tests/regressions/rhbz1044014.c b/tests/regressions/rhbz1044014.c
deleted file mode 100644
index 18ce4a7..0000000
--- a/tests/regressions/rhbz1044014.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* libguestfs
- * Copyright (C) 2014 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.
- */
-
-/* Regression test for RHBZ#1044014.
- *
- * The only reason to write this in C is so we can easily check the
- * version of libvirt >= 1.2.1. In the future when we can assume a
- * newer libvirt, we can just have the main rhbz1044014.sh script set
- * some environment variables and use guestfish.
- */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include <libvirt/libvirt.h>
-
-#include "guestfs.h"
-#include "guestfs-internal-frontend.h"
-
-int
-main (int argc, char *argv[])
-{
- unsigned long ver;
- guestfs_h *g;
-
- virInitialize ();
-
- /* Check that the version of libvirt we are linked against
- * supports the new test-driver auth feature.
- */
- virGetVersion (&ver, NULL, NULL);
- if (ver < 1002001) {
- fprintf (stderr, "%s: test skipped because libvirt is too old (%lu)\n",
- argv[0], ver);
- exit (77);
- }
-
- g = guestfs_create ();
- if (!g)
- exit (EXIT_FAILURE);
-
- /* This will ask the user for credentials. It will also fail
- * (expectedly) because the test driver does not support qemu/KVM.
- */
- guestfs_launch (g);
-
- guestfs_close (g);
- exit (EXIT_SUCCESS);
-}
diff --git a/tests/regressions/rhbz1044014.sh b/tests/regressions/rhbz1044014.sh
index f1e458c..ce1be76 100755
--- a/tests/regressions/rhbz1044014.sh
+++ b/tests/regressions/rhbz1044014.sh
@@ -34,12 +34,22 @@ if [[ ! ( "$backend" =~ ^libvirt ) ]]; then
exit 77
fi
+if [ ! -x ../../src/libvirt-is-version ]; then
+ echo "$0: test skipped because libvirt-is-version is not built yet"
+ exit 77
+fi
+
+if ! ../../src/libvirt-is-version 1 2 1; then
+ echo "$0: test skipped because libvirt is too old (< 1.2.1)"
+ exit 77
+fi
+
# Set the backend to the test driver.
export LIBGUESTFS_BACKEND="libvirt:test://$(pwd)/$srcdir/rhbz1044014.xml"
rm -f rhbz1044014.out
-./rhbz1044014 < $srcdir/rhbz1044014.in > rhbz1044014.out 2>&1 || {
+../../fish/guestfish -- -run < $srcdir/rhbz1044014.in > rhbz1044014.out 2>&1 || {
r=$?
if [ $r -ne 0 ]; then
cat rhbz1044014.out
--
1.8.3.1
10 years, 11 months