[PATCH] common/mltools: Add a debug statement when we try to run a non-existent program.
by Richard W.M. Jones
Previously:
$ virt-v2v -v -x -i disk fedora-28.img -o openstack -oo server-id=foo
virt-v2v: libguestfs 1.39.11fedora=29,release=1.fc29,libvirt (x86_64)
libvirt version: 4.5.0
virt-v2v: error: openstack: precheck failed, there may be a problem with
authentication, see earlier error messages
rm -rf '/var/tmp/null.dTxRFN'
Notice there is no "earlier error message".
After this commit the error changes to:
openstack: executable not found
virt-v2v: error: openstack: precheck failed, there may be a problem with
authentication, see earlier error messages
---
common/mltools/tools_utils.ml | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml
index ad08d05eb..298d89b4d 100644
--- a/common/mltools/tools_utils.ml
+++ b/common/mltools/tools_utils.ml
@@ -420,9 +420,11 @@ and do_run ?(echo_cmd = true) ?stdout_fd ?stderr_fd args =
Either (pid, app, stdout_fd, stderr_fd)
with
| Executable_not_found _ ->
- Or 127
- | Unix.Unix_error (errcode, _, _) when errcode = Unix.ENOENT ->
- Or 127
+ debug "%s: executable not found" app;
+ Or 127
+ | Unix.Unix_error (errcode, fn, _) when errcode = Unix.ENOENT ->
+ debug "%s: %s: executable not found" app fn;
+ Or 127
and do_teardown app outfd errfd exitstat =
Option.may Unix.close outfd;
--
2.19.0.rc0
6 years, 1 month
[PATCH] m4: Add java search path for Gentoo
by Martin Kletzander
In Gentoo the java alternatives are managed using jva-config (or eselect java),
but because the selection is treated as a configuration the symlink to the
current jvm selected is stored in /etc, particularly in the symlink
/etc/java-config-2/current-system-vm which works such as /usr/lib/jvm/default.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
m4/guestfs-java.m4 | 1 +
1 file changed, 1 insertion(+)
diff --git a/m4/guestfs-java.m4 b/m4/guestfs-java.m4
index daa5af32d8bd..1ca9912b0630 100644
--- a/m4/guestfs-java.m4
+++ b/m4/guestfs-java.m4
@@ -46,6 +46,7 @@ if test "x$with_java" != "xno"; then
/usr/lib64/jvm/java \
/usr/lib/jvm/default-java \
/usr/lib/jvm/default \
+ /etc/java-config-2/current-system-vm \
/usr/lib/jvm/java-8-openjdk \
/usr/lib/jvm/java-7-openjdk \
/usr/lib/jvm/java-6-openjdk
--
2.19.1
6 years, 1 month
[supermin PATCH] autogen: Run bootstrap if submodule is not initialized
by Martin Kletzander
This used to be the case before commit 30de2cb603cd.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
README | 1 -
autogen.sh | 5 +++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/README b/README
index 679bf7010bbe..e5187a65ed47 100644
--- a/README
+++ b/README
@@ -107,7 +107,6 @@ Building and installing
If you're cloning this from git the first time, do:
- ./bootstrap
./autogen.sh
For normal builds, and building from the tarball:
diff --git a/autogen.sh b/autogen.sh
index 3a913e03a401..064df589d004 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -2,6 +2,11 @@
set -e
+# If the submodule is not initialized run bootstrap
+if git submodule status .gnulib | grep -q '^-'; then
+ ./bootstrap
+fi
+
# If no arguments were specified and configure has run before, use the previous
# arguments
if test $# -eq 0 && test -x ./config.status; then
--
2.19.1
6 years, 1 month
[PATCH] v2v: create an empty windows.vmdk in case of disabled appliance
by Pino Toscano
In case the appliance is disabled at configure, then all the phony
guests will not be built during the 'make check' time. Since the tests
already handle an empty windows.vmdk fine (in case ntfs-3g is not
available), then just create it empty in this case.
Reported by: Martin Kletzander.
---
v2v/Makefile.am | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/v2v/Makefile.am b/v2v/Makefile.am
index a96166e49..d8a7487f3 100644
--- a/v2v/Makefile.am
+++ b/v2v/Makefile.am
@@ -479,6 +479,7 @@ endif ENABLE_APPLIANCE
# The VMDK file is used for some -i ova tests.
check_DATA = windows.vmdk
+if ENABLE_APPLIANCE
windows.vmdk: ../test-data/phony-guests/windows.img
rm -f $@ $@-t
if [ -s $< ]; then \
@@ -487,6 +488,10 @@ windows.vmdk: ../test-data/phony-guests/windows.img
else \
touch $@; \
fi
+else
+windows.vmdk:
+ touch $@
+endif
DISTCLEANFILES += \
windows.vmdk
--
2.17.2
6 years, 1 month
[PATCH 0/2] v2v: uninstall the VMware Tools from Windows guests
by Pino Toscano
It seems newer versions of VMware Tools for Windows can be uninstalled
also when the guest does not run on VMware anymore. Hence, attempt to
uninstall them during a conversion, reusing the same code already used
to uninstall Parallel Tools.
This was tested with the following Windows guests:
- Windows 2008r2
- Windows 2012r2
- Windows 2016
- Windows 7
- Windows 8
- Windows 10
Pino Toscano (2):
v2v: windows: factor uninstall commands search
v2v: windows: uninstall VMware Tools
v2v/convert_windows.ml | 62 ++++++++++++++++++++++++++++++++++--------
1 file changed, 51 insertions(+), 11 deletions(-)
--
2.17.2
6 years, 1 month
[PATCH] test-data: Allow tests to be run when Btrfs is not available.
by Richard W.M. Jones
Create the fedora-btrfs.img as an empty file.
The only place this is used explicitly is tests/mountable/
test-mountable-inspect.sh, but that test already skips if !btrfs.
Also this is used via guests-all-good.xml, but the script that creates
this XML skips the file if it has zero size.
---
test-data/phony-guests/make-fedora-img.pl | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/test-data/phony-guests/make-fedora-img.pl b/test-data/phony-guests/make-fedora-img.pl
index c665f0d19..739a229da 100755
--- a/test-data/phony-guests/make-fedora-img.pl
+++ b/test-data/phony-guests/make-fedora-img.pl
@@ -39,8 +39,15 @@ my @PARTITIONS = (
# 32k blank space
);
-my @images;
+# Test features.
my $g = Sys::Guestfs->new ();
+$g->add_drive ("/dev/null");
+$g->launch ();
+my $btrfs_available = $g->feature_available (["btrfs"]);
+$g->close ();
+
+my @images;
+$g = Sys::Guestfs->new ();
my $bootdev;
@@ -122,7 +129,17 @@ EOF
init_lvm_root ('/dev/md/rootdev');
}
-elsif ($ENV{LAYOUT} eq 'btrfs') {
+elsif ($ENV{LAYOUT} eq 'btrfs' && !$btrfs_available) {
+ # Btrfs not available, create an empty image.
+ push (@images, "fedora-btrfs.img");
+
+ unlink ("fedora-btrfs.img");
+ open (my $img, '>', "fedora-btrfs.img");
+ close ($img) or die;
+ exit 0;
+}
+
+elsif ($ENV{LAYOUT} eq 'btrfs' && $btrfs_available) {
push (@images, "fedora-btrfs.img-t");
open (my $fstab, '>', "fedora.fstab") or die;
--
2.19.0.rc0
6 years, 1 month
[PATCH 0/2] build: Replace ./nbdkit with a C program.
by Richard W.M. Jones
This patch series solves the FreeBSD shebang problem in a completely
different way, and a few other things besides. I propose that we
replace ./nbdkit with a C program. The C program is a straightforward
translation of the shell script.
Some advantages of this approach are:
- We can parse options in exactly the same way as the real program.
- Use the more accurate ‘is_short_name’ test for unadorned
plugin/filter names on the command line.
- Fixes the FreeBSD problem with shebangs caused because FreeBSD
refuses the use a shell script as a shebang path.
- No longer need to maintain that troublesome shell script.
I have verified that this does indeed fix the FreeBSD shebang problem
(but didn't test on Haiku). It also passes 'make check' and
'make check-valgrind' on Linux.
Rich.
6 years, 1 month
[PATCH v5 0/3] Install QEMU-GA from oVirt guest tools ISO on Linux
by Tomáš Golembiovský
changes in v5:
- simplified expression in copy_drivers
- new commit fixing path constructions
- indentation fixes
changes in v4:
- fix call to install_local
changes in v2:
- moved copy_drivers above copy_files
- renamed copy_files to copy_from_virtio_win
- renamed install to install_local
- use rpm instead of yum
This installs packages with QEMU Guest Agent when converting Linux machine. The
packages should be available on guest tools ISO. The patches work "as-is" but
probably deserve some more attention:
- it is "abusing" Winows_virtio code but renaming/refactoring everything to
remove "windows" from the name and use "guest tools" seems like a lot of
unnecesary work
- support for Debian is missing
I don't know how to install the package only when all it's dependencies are
already installed. dpkg cannot be used to check that (simulate the install).
And attempting to install the package will leave it half-installed (dpkg
cannot roll-back).
Tomáš Golembiovský (3):
v2v: refactor copy_drivers() in Windows_virtio
v2v: fix path construction in Windows_virtio.copy_files()
v2v: linux: install QEMU-GA (RHBZ#1619665)
v2v/convert_linux.ml | 2 ++
v2v/windows_virtio.ml | 78 +++++++++++++++++++++++++++++++++---------
v2v/windows_virtio.mli | 4 +++
3 files changed, 67 insertions(+), 17 deletions(-)
--
2.19.1
6 years, 1 month