[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] libguestfs on Ubuntu 10.04 LTS (was: Re: appliance VM won't start, can't find /init, but /init is in the image.)


Better late than never ...  I have fixed all the problems with the
Ubuntu 10.04 LTS build, and libguestfs works and passes the testsuite.

There were several problems stopping this.  As you diagnosed,
'apt-cache depends --recurse' is simply broken in this version of
Ubuntu.  I first tried to backport the newer version, but it has far
too many dependencies that would also have to be updated.  Instead I
pushed a workaround into febootstrap:


Also, as you were very close to diagnosing, there were a few problems
with the appliance init script.  This version of Ubuntu does not
create a /sys directory, so mounting /sys failed, and that caused a
cascade of other failures.  The fix is simple:


Ubuntu has an old version of gettext, so you need to apply a patch to
po/Makefile.in.in (patch not upstream, attached).

udev is too old.  Even with fixed udev rules for creating
virtio-serial ports, the symlinks aren't being created.  Instead of
trying to work out why this was, I just hacked the daemon to look for
the port directly (patch not upstream, attached).

Those were the code changes.

I also had to manually backport and build the following packages from

- hivex_1.2.7-1build1 [not strictly required]
- qemu-kvm_0.14.1+noroms-0ubuntu3
- vgabios_0.6c-2ubuntu3

I also had to install linux-image-2.6.38-10-server from lucid-updates,
and fix the broken permissions, see
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759725 .

With all that lot, it works and passes the test suite.

I'm going to put some proper instructions and sources and binaries on
the website later.


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
>From 999afc31da4f4cf0eaeb4f1d243b8e09b82790f0 Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones redhat com>
Date: Thu, 1 Sep 2011 12:47:46 +0100
Subject: [PATCH 1/2] ubuntu 10.04: Old version of gettext in Ubuntu.

 po/Makefile.in.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index 83d8838..114b230 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -9,7 +9,7 @@
 # General Public License and is *not* in the public domain.
 # Origin: gettext-0.18

>From 68a4a5fa434948210afc30e62bc6ed4c0745a5a5 Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones redhat com>
Date: Thu, 1 Sep 2011 13:00:11 +0100
Subject: [PATCH 2/2] ubuntu 10.04: Use /dev/vport0p1.

Ubuntu 10.04 LTS does not have the right udev rules to create
the symlink with the channel name.
 daemon/guestfsd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index 51bb0b7..661291f 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -112,7 +112,7 @@ int autosync_umount = 1;
 const char *program_name = "guestfsd";
 /* Name of the virtio-serial channel. */
-#define VIRTIO_SERIAL_CHANNEL "/dev/virtio-ports/org.libguestfs.channel.0"
+#define VIRTIO_SERIAL_CHANNEL "/dev/vport0p1"
 static void
 usage (void)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]