appliance VM won't start, can't find /init, but /init is in the image.
Hi, Still trying to get libguestfs appliance test to work on Ubuntu Lucid. I figured out my umask was causing problems and fixed that. now I'm on to a new problem. libguestfs-test-tool reports the following: febootstrap: mounting new root on /root febootstrap: chroot /proc/uptime: No such file or directory execl: /init: No such file or directory febootstrap: debug: listing directory / 2 d . 040755 4096 88619:5000 2 d .. 040755 4096 88619:5000 11 d lost+found 040700 16384 0:0 12 d bin 040755 4096 23083:5000 13 d boot 040755 4096 23083:5000 14 d etc 040755 4096 23083:5000 109 d lib 040755 4096 23083:5000 156 d sbin 040755 4096 23083:5000 157 d usr 040755 4096 23083:5000 534 d var 040755 4096 23083:5000 3701 - init 100750 3264 23083:5000 Note, init is indeed a file (a shell script). I checked the root and initrd images, and they both have init (the initrd has an init binary, the root has a shell script that starts udev etc).
On Wed, Aug 10, 2011 at 05:16:13PM -0700, David Konerding wrote:
Hi, Still trying to get libguestfs appliance test to work on Ubuntu Lucid. I figured out my umask was causing problems and fixed that. now I'm on to a new problem. libguestfs-test-tool reports the following:
febootstrap: mounting new root on /root febootstrap: chroot /proc/uptime: No such file or directory execl: /init: No such file or directory febootstrap: debug: listing directory / 2 d . 040755 4096 88619:5000 2 d .. 040755 4096 88619:5000 11 d lost+found 040700 16384 0:0 12 d bin 040755 4096 23083:5000 13 d boot 040755 4096 23083:5000 14 d etc 040755 4096 23083:5000 109 d lib 040755 4096 23083:5000 156 d sbin 040755 4096 23083:5000 157 d usr 040755 4096 23083:5000 534 d var 040755 4096 23083:5000 3701 - init 100750 3264 23083:5000
Note, init is indeed a file (a shell script). I checked the root and initrd images, and they both have init (the initrd has an init binary, the root has a shell script that starts udev etc).
The problem is that the kernel gives the same error "execl: /init: No such file or directory" for a whole variety of reasons. These include: - /init missing (obviously not the case here) - /bin/sh missing - any library that /bin/sh needs is missing - ld-linux missing So you need to make sure /bin/sh is there. If it's a symlink (eg. to dash) then the destination file is there. Then do 'ldd /bin/sh' and make sure all of the required libraries and ld-linux are there. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v
On Thu, Aug 11, 2011 at 07:10:21PM +0100, Richard W.M. Jones wrote:
On Wed, Aug 10, 2011 at 05:16:13PM -0700, David Konerding wrote:
Hi, Still trying to get libguestfs appliance test to work on Ubuntu Lucid. I figured out my umask was causing problems and fixed that. now I'm on to a new problem. libguestfs-test-tool reports the following:
febootstrap: mounting new root on /root febootstrap: chroot /proc/uptime: No such file or directory execl: /init: No such file or directory febootstrap: debug: listing directory / 2 d . 040755 4096 88619:5000 2 d .. 040755 4096 88619:5000 11 d lost+found 040700 16384 0:0 12 d bin 040755 4096 23083:5000 13 d boot 040755 4096 23083:5000 14 d etc 040755 4096 23083:5000 109 d lib 040755 4096 23083:5000 156 d sbin 040755 4096 23083:5000 157 d usr 040755 4096 23083:5000 534 d var 040755 4096 23083:5000 3701 - init 100750 3264 23083:5000
Note, init is indeed a file (a shell script). I checked the root and initrd images, and they both have init (the initrd has an init binary, the root has a shell script that starts udev etc).
The problem is that the kernel gives the same error "execl: /init: No such file or directory" for a whole variety of reasons. These include:
- /init missing (obviously not the case here)
- /bin/sh missing
- any library that /bin/sh needs is missing
- ld-linux missing
So you need to make sure /bin/sh is there. If it's a symlink (eg. to dash) then the destination file is there. Then do 'ldd /bin/sh' and make sure all of the required libraries and ld-linux are there.
Additionally, these files are pulled at runtime from the host. So say that /bin/sh needs /lib/libc.so.6 which is a symlink to /lib/libc-2.14.90.so, then you would need to check: - /lib/libc.so.6 listed in appliance/supermin.d/hostfiles - /lib/libc-*.so listed in appliance/supermin.d/hostfiles - /lib/libc.so.6 exists on the host filesystem and is readable by non-root. - File(s) matching /lib/libc-*.so exist on the host filesystem and are readable by non-root. You may need to force the cached appliance to be rebuilt between tests by doing: rm -rf {/tmp,/var/tmp}/.guestfs-* Rich. -- 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. http://et.redhat.com/~rjones/virt-df/
On Thu, Aug 11, 2011 at 11:17 AM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Thu, Aug 11, 2011 at 07:10:21PM +0100, Richard W.M. Jones wrote:
On Wed, Aug 10, 2011 at 05:16:13PM -0700, David Konerding wrote:
Hi, Still trying to get libguestfs appliance test to work on Ubuntu Lucid. I figured out my umask was causing problems and fixed that. now I'm on to a new problem. libguestfs-test-tool reports the following:
febootstrap: mounting new root on /root febootstrap: chroot /proc/uptime: No such file or directory execl: /init: No such file or directory febootstrap: debug: listing directory / 2 d . 040755 4096 88619:5000 2 d .. 040755 4096 88619:5000 11 d lost+found 040700 16384 0:0 12 d bin 040755 4096 23083:5000 13 d boot 040755 4096 23083:5000 14 d etc 040755 4096 23083:5000 109 d lib 040755 4096 23083:5000 156 d sbin 040755 4096 23083:5000 157 d usr 040755 4096 23083:5000 534 d var 040755 4096 23083:5000 3701 - init 100750 3264 23083:5000
Note, init is indeed a file (a shell script). I checked the root and initrd images, and they both have init (the initrd has an init binary, the root has a shell script that starts udev etc).
The problem is that the kernel gives the same error "execl: /init: No such file or directory" for a whole variety of reasons. These include:
- /init missing (obviously not the case here)
- /bin/sh missing
- any library that /bin/sh needs is missing
- ld-linux missing
So you need to make sure /bin/sh is there. If it's a symlink (eg. to dash) then the destination file is there. Then do 'ldd /bin/sh' and make sure all of the required libraries and ld-linux are there.
Additionally, these files are pulled at runtime from the host.
So say that /bin/sh needs /lib/libc.so.6 which is a symlink to /lib/libc-2.14.90.so, then you would need to check:
- /lib/libc.so.6 listed in appliance/supermin.d/hostfiles
- /lib/libc-*.so listed in appliance/supermin.d/hostfiles
- /lib/libc.so.6 exists on the host filesystem and is readable by non-root.
- File(s) matching /lib/libc-*.so exist on the host filesystem and are readable by non-root.
So: /bin/sh is a link to /bin/bash, it dynamic links to libc.so.6, but it appears libc.so.6 is missing from appliance/supermin.d/hostfiles; it looks to me like the libc debian package isn't downloaded during the febootstrap. There is in libc.so.6 file in the VM image. You may need to force the cached appliance to be rebuilt between tests
by doing:
rm -rf {/tmp,/var/tmp}/.guestfs-*
Is there a similar way to clear out the files in appliance/supermin.d so i can re-do the package download/unpack/build img process? I have been making clean, then make, then make install in src/libguestfs-1.12.3.
Rich.
-- 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. http://et.redhat.com/~rjones/virt-df/
BTW, as a quick check I did: febootstrap --verbose --names bash libc6 I never see the libc6 package being downloaded if I do febootstrap --verbose --names libc6 then libc6 *is* downloaded. On Thu, Aug 11, 2011 at 4:06 PM, David Konerding <dek@konerding.com> wrote:
On Thu, Aug 11, 2011 at 11:17 AM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Thu, Aug 11, 2011 at 07:10:21PM +0100, Richard W.M. Jones wrote:
On Wed, Aug 10, 2011 at 05:16:13PM -0700, David Konerding wrote:
Hi, Still trying to get libguestfs appliance test to work on Ubuntu Lucid. I figured out my umask was causing problems and fixed that. now I'm on to a new problem. libguestfs-test-tool reports the following:
febootstrap: mounting new root on /root febootstrap: chroot /proc/uptime: No such file or directory execl: /init: No such file or directory febootstrap: debug: listing directory / 2 d . 040755 4096 88619:5000 2 d .. 040755 4096 88619:5000 11 d lost+found 040700 16384 0:0 12 d bin 040755 4096 23083:5000 13 d boot 040755 4096 23083:5000 14 d etc 040755 4096 23083:5000 109 d lib 040755 4096 23083:5000 156 d sbin 040755 4096 23083:5000 157 d usr 040755 4096 23083:5000 534 d var 040755 4096 23083:5000 3701 - init 100750 3264 23083:5000
Note, init is indeed a file (a shell script). I checked the root and initrd images, and they both have init (the initrd has an init binary, the root has a shell script that starts udev etc).
The problem is that the kernel gives the same error "execl: /init: No such file or directory" for a whole variety of reasons. These include:
- /init missing (obviously not the case here)
- /bin/sh missing
- any library that /bin/sh needs is missing
- ld-linux missing
So you need to make sure /bin/sh is there. If it's a symlink (eg. to dash) then the destination file is there. Then do 'ldd /bin/sh' and make sure all of the required libraries and ld-linux are there.
Additionally, these files are pulled at runtime from the host.
So say that /bin/sh needs /lib/libc.so.6 which is a symlink to /lib/libc-2.14.90.so, then you would need to check:
- /lib/libc.so.6 listed in appliance/supermin.d/hostfiles
- /lib/libc-*.so listed in appliance/supermin.d/hostfiles
- /lib/libc.so.6 exists on the host filesystem and is readable by non-root.
- File(s) matching /lib/libc-*.so exist on the host filesystem and are readable by non-root.
So: /bin/sh is a link to /bin/bash, it dynamic links to libc.so.6, but it appears libc.so.6 is missing from appliance/supermin.d/hostfiles; it looks to me like the libc debian package isn't downloaded during the febootstrap. There is in libc.so.6 file in the VM image.
You may need to force the cached appliance to be rebuilt between tests
by doing:
rm -rf {/tmp,/var/tmp}/.guestfs-*
Is there a similar way to clear out the files in appliance/supermin.d so i can re-do the package download/unpack/build img process? I have been making clean, then make, then make install in src/libguestfs-1.12.3.
Rich.
-- 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. http://et.redhat.com/~rjones/virt-df/
On Thu, Aug 11, 2011 at 04:06:10PM -0700, David Konerding wrote:
So: /bin/sh is a link to /bin/bash, it dynamic links to libc.so.6, but it appears libc.so.6 is missing from appliance/supermin.d/hostfiles; it looks to me like the libc debian package isn't downloaded during the febootstrap. There is in libc.so.6 file in the VM image.
[...]
BTW, as a quick check I did: febootstrap --verbose --names bash libc6 I never see the libc6 package being downloaded if I do febootstrap --verbose --names libc6 then libc6 *is* downloaded.
(This works for me in 11.04) febootstrap does: apt-cache depends --recurse -i %list-of-pkgs% | grep -v '^[<[:space:]]' eg: apt-cache depends --recurse -i bash libc6 | grep -v '^[<[:space:]]' It then downloads each one using 'aptitude download'. Each is then unpacked using: dpkg-deb --fsys-tarfile %filename% | (cd %tmpdir% && tar xf -) Does that list contain libc6? Does 'aptitude download libc6' work? If downloaded, does the unpacked deb contain the expected symlink? http://git.annexia.org/?p=febootstrap.git;a=blob;f=febootstrap_debian.ml;h=4...
You may need to force the cached appliance to be rebuilt between tests
by doing:
rm -rf {/tmp,/var/tmp}/.guestfs-*
Is there a similar way to clear out the files in appliance/supermin.d so i can re-do the package download/unpack/build img process? I have been making clean, then make, then make install in src/libguestfs-1.12.3.
Just: make -C appliance clean all should be sufficient. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
On Fri, Aug 12, 2011 at 12:32 AM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Thu, Aug 11, 2011 at 04:06:10PM -0700, David Konerding wrote:
So: /bin/sh is a link to /bin/bash, it dynamic links to libc.so.6, but it appears libc.so.6 is missing from appliance/supermin.d/hostfiles; it looks to me like the libc debian package isn't downloaded during the febootstrap. There is in libc.so.6 file in the VM image.
[...]
BTW, as a quick check I did: febootstrap --verbose --names bash libc6 I never see the libc6 package being downloaded if I do febootstrap --verbose --names libc6 then libc6 *is* downloaded.
(This works for me in 11.04)
febootstrap does:
apt-cache depends --recurse -i %list-of-pkgs% | grep -v '^[<[:space:]]'
eg:
apt-cache depends --recurse -i bash libc6 | grep -v '^[<[:space:]]'
Gotcha. I can confirm that $ apt-cache depends --recurse -i bash libc6 | grep -v '^[<[:space:]]' | grep libc is empty, while $ apt-cache depends --recurse -i libc6 | grep -v '^[<[:space:]]' | grep libc lists libc6. Just to explore a bit more: $ apt-cache depends --recurse -i bash libc6 bash Depends: base-files Depends: debianutils PreDepends: dash PreDepends: libc6 PreDepends: libncurses5 I'm going to check with our local distribution developers and see what's going on. It then downloads each one using 'aptitude download'.
Each is then unpacked using:
dpkg-deb --fsys-tarfile %filename% | (cd %tmpdir% && tar xf -)
Does that list contain libc6?
Does 'aptitude download libc6' work?
If downloaded, does the unpacked deb contain the expected symlink?
http://git.annexia.org/?p=febootstrap.git;a=blob;f=febootstrap_debian.ml;h=4...
You may need to force the cached appliance to be rebuilt between tests
by doing:
rm -rf {/tmp,/var/tmp}/.guestfs-*
Is there a similar way to clear out the files in appliance/supermin.d so i can re-do the package download/unpack/build img process? I have been making clean, then make, then make install in src/libguestfs-1.12.3.
Just:
make -C appliance clean all
should be sufficient.
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
On Fri, Aug 12, 2011 at 09:34:38AM -0700, David Konerding wrote:
Gotcha. I can confirm that $ apt-cache depends --recurse -i bash libc6 | grep -v '^[<[:space:]]' | grep libc is empty, while
$ apt-cache depends --recurse -i libc6 | grep -v '^[<[:space:]]' | grep libc lists libc6.
Just to explore a bit more: $ apt-cache depends --recurse -i bash libc6 bash Depends: base-files Depends: debianutils PreDepends: dash PreDepends: libc6 PreDepends: libncurses5
I'm going to check with our local distribution developers and see what's going on.
Simplest workaround is to add any packages that are missing directly to: appliance/packagelist.in then rebuild the appliance (make -C appliance clean all). Possibly febootstrap should include PreDepends dependencies? For some reason this issue doesn't affect us on Debian / Ubuntu later versions. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v
On Fri, Aug 12, 2011 at 9:39 AM, Richard W.M. Jones <rjones@redhat.com>wrote:
Gotcha. I can confirm that $ apt-cache depends --recurse -i bash libc6 | grep -v '^[<[:space:]]' | grep libc is empty, while
$ apt-cache depends --recurse -i libc6 | grep -v '^[<[:space:]]' | grep
On Fri, Aug 12, 2011 at 09:34:38AM -0700, David Konerding wrote: libc
lists libc6.
Just to explore a bit more: $ apt-cache depends --recurse -i bash libc6 bash Depends: base-files Depends: debianutils PreDepends: dash PreDepends: libc6 PreDepends: libncurses5
I'm going to check with our local distribution developers and see what's going on.
Simplest workaround is to add any packages that are missing directly to:
appliance/packagelist.in
then rebuild the appliance (make -C appliance clean all).
Possibly febootstrap should include PreDepends dependencies? For some reason this issue doesn't affect us on Debian / Ubuntu later versions.
I'm guessing this has to be a bug in Ubuntu 10.04 apt-cache. If I leave out --recurse, $ apt-cache depends -i bash libc6 | grep -v '^[<[:space:]]' | grep libc libc6 Adding --recurse should not cause packages to not be listed. I imagine whatever bug caused this was fixed between the 10.04 and 10.10, since my home box running 10.10 doesn't have this problem.
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v
On Fri, Aug 12, 2011 at 9:52 AM, David Konerding <dek@konerding.com> wrote:
On Fri, Aug 12, 2011 at 9:39 AM, Richard W.M. Jones <rjones@redhat.com>wrote:
Gotcha. I can confirm that $ apt-cache depends --recurse -i bash libc6 | grep -v '^[<[:space:]]' | grep libc is empty, while
$ apt-cache depends --recurse -i libc6 | grep -v '^[<[:space:]]' | grep
On Fri, Aug 12, 2011 at 09:34:38AM -0700, David Konerding wrote: libc
lists libc6.
Just to explore a bit more: $ apt-cache depends --recurse -i bash libc6 bash Depends: base-files Depends: debianutils PreDepends: dash PreDepends: libc6 PreDepends: libncurses5
I'm going to check with our local distribution developers and see what's going on.
Simplest workaround is to add any packages that are missing directly to:
appliance/packagelist.in
then rebuild the appliance (make -C appliance clean all).
Are you sure this should work? I see that libc6 makes it into packagelist, and the febootstrap invocation includes libc6, but it never downloads libc6. I did a few verification steps: 1) aptitude download libc6 works 2) extracting the deb works so it seems like there is some step between listing a package in packagelist, and febootstrap actually invoking the aptitutde download command for the package. I've skimmed the febootstrap code, it doesn't seem like it would actively filter anything not in the exclude list (which I verified doesn't list libc6).
Possibly febootstrap should include PreDepends dependencies? For some
reason this issue doesn't affect us on Debian / Ubuntu later versions.
I'm guessing this has to be a bug in Ubuntu 10.04 apt-cache. If I leave out --recurse, $ apt-cache depends -i bash libc6 | grep -v '^[<[:space:]]' | grep libc libc6
Adding --recurse should not cause packages to not be listed. I imagine whatever bug caused this was fixed between the 10.04 and 10.10, since my home box running 10.10 doesn't have this problem.
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v
On Fri, Aug 12, 2011 at 10:19:56AM -0700, David Konerding wrote:
Are you sure this should work? I see that libc6 makes it into packagelist, and the febootstrap invocation includes libc6, but it never downloads libc6.
I did a few verification steps: 1) aptitude download libc6 works 2) extracting the deb works
so it seems like there is some step between listing a package in packagelist, and febootstrap actually invoking the aptitutde download command for the package. I've skimmed the febootstrap code, it doesn't seem like it would actively filter anything not in the exclude list (which I verified doesn't list libc6).
Actually you're right, this isn't direct. It will pass libc6 as an argument to apt-cache depends [...], which then presumably is ignoring it or not printing it in the output for whatever reason. There's not an especially easy way to do this without modifying febootstrap sources: http://git.annexia.org/?p=febootstrap.git;a=blob;f=febootstrap_debian.ml;h=4... Then recompiling febootstrap and adding /path/to/febootstrap and /path/to/febootstrap/helper to $PATH. Rich. -- 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. http://et.redhat.com/~rjones/virt-df/
On Fri, Aug 12, 2011 at 10:35 AM, Richard W.M. Jones <rjones@redhat.com>wrote:
Are you sure this should work? I see that libc6 makes it into
and the febootstrap invocation includes libc6, but it never downloads
On Fri, Aug 12, 2011 at 10:19:56AM -0700, David Konerding wrote: packagelist, libc6.
I did a few verification steps: 1) aptitude download libc6 works 2) extracting the deb works
so it seems like there is some step between listing a package in packagelist, and febootstrap actually invoking the aptitutde download command for the package. I've skimmed the febootstrap code, it doesn't
seem
like it would actively filter anything not in the exclude list (which I verified doesn't list libc6).
Actually you're right, this isn't direct.
It will pass libc6 as an argument to apt-cache depends [...], which then presumably is ignoring it or not printing it in the output for whatever reason.
There's not an especially easy way to do this without modifying febootstrap sources:
http://git.annexia.org/?p=febootstrap.git;a=blob;f=febootstrap_debian.ml;h=4...
Then recompiling febootstrap and adding /path/to/febootstrap and /path/to/febootstrap/helper to $PATH.
I see, so you're suggesting I just manually add a package to pkgs right after http://git.annexia.org/?p=febootstrap.git;a=blob;f=febootstrap_debian.ml;h=4... Rich.
-- 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. http://et.redhat.com/~rjones/virt-df/
On Fri, Aug 12, 2011 at 10:45:48AM -0700, David Konerding wrote:
I see, so you're suggesting I just manually add a package to pkgs right after http://git.annexia.org/?p=febootstrap.git;a=blob;f=febootstrap_debian.ml;h=4...
Yup, something like: let pkgs = pkgs @ [ "libc6" ] in Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
On Fri, Aug 12, 2011 at 11:03 AM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Fri, Aug 12, 2011 at 10:45:48AM -0700, David Konerding wrote:
I see, so you're suggesting I just manually add a package to pkgs right after
http://git.annexia.org/?p=febootstrap.git;a=blob;f=febootstrap_debian.ml;h=4...
Yup, something like:
let pkgs = pkgs @ [ "libc6" ] in
Thanks for all the help. I can confirm that shoehorning libc6 in allows invoking init. The next step is /bin/sh failing to run because libncurses.so.5 can't be loaded. Looks to me like a systematic failure that I can work around manually by ensuring all the right libraries get shoehorned it. Would still really like to know what it is about our Ubuntu distribution that is causing this problem :-( Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
On Fri, Aug 12, 2011 at 11:22:01AM -0700, David Konerding wrote:
On Fri, Aug 12, 2011 at 11:03 AM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Fri, Aug 12, 2011 at 10:45:48AM -0700, David Konerding wrote:
I see, so you're suggesting I just manually add a package to pkgs right after
http://git.annexia.org/?p=febootstrap.git;a=blob;f=febootstrap_debian.ml;h=4...
Yup, something like:
let pkgs = pkgs @ [ "libc6" ] in
Thanks for all the help. I can confirm that shoehorning libc6 in allows invoking init. The next step is /bin/sh failing to run because libncurses.so.5 can't be loaded.
Another thing to do would be to modify the grep command here: http://git.annexia.org/?p=febootstrap.git;a=blob;f=febootstrap_debian.ml;h=4... in order to make it include all the Depends and Pre-Depends packages (assuming that ncurses is amongst those). Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
OK, for completion's sake, let pkgs = pkgs @ [ "libc6" ] in let pkgs = pkgs @ [ "libncurses5" ] in let pkgs = pkgs @ [ "libselinux1" ] in let pkgs = pkgs @ [ "libblkid1" ] in let pkgs = pkgs @ [ "module-init-tools" ] in let pkgs = pkgs @ [ "libuuid1" ] in let pkgs = pkgs @ [ "libreadline6" ] in let pkgs = pkgs @ [ "libacl1" ] in was sufficient to boot into userspace. Now I'm hitting a bunch of interesting problems: /proc/uptime: No such file or directory Starting /init script ... warning: can't open /etc/fstab: No such file or directory mount: mount point /sys does not exist cannot open /dev/null Cannot access the Hardware Clock via any known method. Use the --debug option to see the details of our search for an access method. SIOCSIFADDR: No such device eth0: ERROR while getting interface flags: No such device SIOCADDRT: No such process Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory /init: line 73: /sys/block/vd*/queue/rotational: No such file or directory ls: error while loading shared libraries: libacl.so.1: cannot open shared object file: No such file or directory rootfs / rootfs rw 0 0 proc /proc proc rw,relatime 0 0 /dev/root / ext2 rw,noatime,errors=continue 0 0 /proc /proc proc rw,relatime 0 0 Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory On Fri, Aug 12, 2011 at 11:46 AM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Fri, Aug 12, 2011 at 11:22:01AM -0700, David Konerding wrote:
On Fri, Aug 12, 2011 at 11:03 AM, Richard W.M. Jones <rjones@redhat.com wrote:
On Fri, Aug 12, 2011 at 10:45:48AM -0700, David Konerding wrote:
I see, so you're suggesting I just manually add a package to pkgs right after
http://git.annexia.org/?p=febootstrap.git;a=blob;f=febootstrap_debian.ml;h=4...
Yup, something like:
let pkgs = pkgs @ [ "libc6" ] in
Thanks for all the help. I can confirm that shoehorning libc6 in allows invoking init. The next step is /bin/sh failing to run because libncurses.so.5 can't be loaded.
Another thing to do would be to modify the grep command here:
http://git.annexia.org/?p=febootstrap.git;a=blob;f=febootstrap_debian.ml;h=4...
in order to make it include all the Depends and Pre-Depends packages (assuming that ncurses is amongst those).
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
On Fri, Aug 12, 2011 at 01:03:06PM -0700, David Konerding wrote:
cannot open /dev/null Cannot access the Hardware Clock via any known method. Use the --debug option to see the details of our search for an access method. SIOCSIFADDR: No such device eth0: ERROR while getting interface flags: No such device SIOCADDRT: No such process Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory
Perhaps udev is missing?
/init: line 73: /sys/block/vd*/queue/rotational: No such file or directory ls: error while loading shared libraries: libacl.so.1: cannot open shared
libacl missing.
object file: No such file or directory rootfs / rootfs rw 0 0 proc /proc proc rw,relatime 0 0 /dev/root / ext2 rw,noatime,errors=continue 0 0 /proc /proc proc rw,relatime 0 0 Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory
Does it get any further than this? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
On Fri, Aug 12, 2011 at 1:11 PM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Fri, Aug 12, 2011 at 01:03:06PM -0700, David Konerding wrote:
read_urandom: /dev/urandom: open failed: No such file or directory
Perhaps udev is missing?
Nope, looks like udev is there.
libacl missing.
Sorry, cut and paste of older file. Fixed.
object file: No such file or directory rootfs / rootfs rw 0 0 proc /proc proc rw,relatime 0 0 /dev/root / ext2 rw,noatime,errors=continue 0 0 /proc /proc proc rw,relatime 0 0 Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory
Does it get any further than this?
Yeah. It gets as far as this (which surprised me since I grabbed a recent qemu-kvm that should have virtio-serial support) Fri Aug 12 20:20:57 UTC 2011 uptime: 0.52 0.19 verbose daemon enabled linux commmand line: panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=rxvt Failed to connect to virtio-serial channel. This is a fatal error and the appliance will now exit. Usually this error is caused by either QEMU or the appliance kernel not supporting the vmchannel method that the libguestfs library chose to use. Please run 'libguestfs-test-tool' and provide the complete, unedited output to the libguestfs developers, either in a bug report or on the libguestfs redhat com mailing list. Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
On Fri, Aug 12, 2011 at 01:23:33PM -0700, David Konerding wrote:
Yeah. It gets as far as this (which surprised me since I grabbed a recent qemu-kvm that should have virtio-serial support)
Fri Aug 12 20:20:57 UTC 2011 uptime: 0.52 0.19 verbose daemon enabled linux commmand line: panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=rxvt
Failed to connect to virtio-serial channel.
Almost certainly kernel version <= 2.6.34-ish (whichever version it was that added virtio-serial support, definitely 2.6.32 does NOT work and 2.6.36 DOES work). I'd be able to tell for sure if I saw the complete output. Rich. -- 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. http://et.redhat.com/~rjones/virt-df/
On Fri, Aug 12, 2011 at 09:49:13PM +0100, Richard W.M. Jones wrote:
On Fri, Aug 12, 2011 at 01:23:33PM -0700, David Konerding wrote:
Yeah. It gets as far as this (which surprised me since I grabbed a recent qemu-kvm that should have virtio-serial support)
Fri Aug 12 20:20:57 UTC 2011 uptime: 0.52 0.19 verbose daemon enabled linux commmand line: panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=rxvt
Failed to connect to virtio-serial channel.
Almost certainly kernel version <= 2.6.34-ish (whichever version it was that added virtio-serial support, definitely 2.6.32 does NOT work and 2.6.36 DOES work).
By the way, as you're using a very recent febootstrap (3.8+) then you have fine control over which kernel is used: http://libguestfs.org/guestfs.3.html#environment_variables You just have to download and unpack the new kernel anywhere on your system and point these variables at it. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
On Fri, Aug 12, 2011 at 09:57:47PM +0100, Richard W.M. Jones wrote:
You just have to download and unpack the new kernel anywhere on your system and point these variables at it.
More documentation: http://libguestfs.org/febootstrap-supermin-helper.8.html#environment_variabl... Rich. -- 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. http://et.redhat.com/~rjones/virt-df/
On Fri, Aug 12, 2011 at 1:57 PM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Fri, Aug 12, 2011 at 09:49:13PM +0100, Richard W.M. Jones wrote:
On Fri, Aug 12, 2011 at 01:23:33PM -0700, David Konerding wrote:
Yeah. It gets as far as this (which surprised me since I grabbed a recent qemu-kvm that should have virtio-serial support)
Fri Aug 12 20:20:57 UTC 2011 uptime: 0.52 0.19 verbose daemon enabled linux commmand line: panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=rxvt
Failed to connect to virtio-serial channel.
Almost certainly kernel version <= 2.6.34-ish (whichever version it was that added virtio-serial support, definitely 2.6.32 does NOT work and 2.6.36 DOES work).
By the way, as you're using a very recent febootstrap (3.8+) then you have fine control over which kernel is used:
http://libguestfs.org/guestfs.3.html#environment_variables
You just have to download and unpack the new kernel anywhere on your system and point these variables at it.
By download and unpack, do you mean a kernel source package, or a kernel package from a later Ubuntu release such as 10.10?
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
On Fri, Aug 12, 2011 at 02:00:20PM -0700, David Konerding wrote:
By download and unpack, do you mean a kernel source package, or a kernel package from a later Ubuntu release such as 10.10?
You could compile it from source, but it'd be easier to just take a compiled binary from any later Ubuntu (11.04 seems like the best bet since it's the one we use). Don't forget you need the modules directory as well as vmlinuz. Rich. -- 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. http://et.redhat.com/~rjones/virt-df/
On Fri, Aug 12, 2011 at 2:12 PM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Fri, Aug 12, 2011 at 02:00:20PM -0700, David Konerding wrote:
By download and unpack, do you mean a kernel source package, or a kernel package from a later Ubuntu release such as 10.10?
You could compile it from source, but it'd be easier to just take a compiled binary from any later Ubuntu (11.04 seems like the best bet since it's the one we use). Don't forget you need the modules directory as well as vmlinuz.
Looks like this is moot. Turns out my kernel team has a test kernel (2.6.38, I feel like I'm in the 23rd century) and I'm getting my workstation converted to that.
Rich.
-- 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. http://et.redhat.com/~rjones/virt-df/
OK. So now I am trying with a 2.6.38 kernel. Surprising result: some confusion about ext2 root filesystem. I can confirm the /var/tmp/.guestfs has a root file that is a valid ext2 file system. libguestfs: new guestfs handle 0x22df410 ===== Test starts here ===== LIBGUESTFS_DEBUG=1 library version: 1.12.3 guestfs_get_append: (null) guestfs_get_attach_method: appliance guestfs_get_autosync: 1 guestfs_get_direct: 0 guestfs_get_memsize: 500 guestfs_get_network: 0 guestfs_get_path: /usr/local/home/dek/sw/libguestfs-1.12.3/lib/guestfs guestfs_get_pgroup: 0 guestfs_get_qemu: /home/dek/sw/qemu-kvm-0.14.1/bin/qemu-system-x86_64 guestfs_get_recovery_proc: 1 guestfs_get_selinux: 0 guestfs_get_trace: 0 guestfs_get_verbose: 1 host_cpu: x86_64 Launching appliance, timeout set to 120 seconds. libguestfs: [00000ms] febootstrap-supermin-helper --verbose -f checksum '/usr/local/home/dek/sw/libguestfs-1.12.3/lib/guestfs/supermin.d' x86_64 supermin helper [00000ms] whitelist = (not specified), host_cpu = x86_64, kernel = (null), initrd = (null), appliance = (null) supermin helper [00000ms] inputs[0] = /usr/local/home/dek/sw/libguestfs-1.12.3/lib/guestfs/supermin.d checking modpath /lib/modules/2.6.32-gg508-generic.disabled is a directory picked vmlinuz-2.6.32-gg508-generic.disabled because modpath /lib/modules/2.6.32-gg508-generic.disabled exists checking modpath /lib/modules/2.6.38.8-experimental4 is a directory picked vmlinuz-2.6.38.8-experimental4 because modpath /lib/modules/2.6.38.8-experimental4 exists supermin helper [00000ms] finished creating kernel supermin helper [00000ms] visiting /usr/local/home/dek/sw/libguestfs-1.12.3/lib/guestfs/supermin.d supermin helper [00000ms] visiting /usr/local/home/dek/sw/libguestfs-1.12.3/lib/guestfs/supermin.d/base.img supermin helper [00000ms] visiting /usr/local/home/dek/sw/libguestfs-1.12.3/lib/guestfs/supermin.d/daemon.img supermin helper [00000ms] visiting /usr/local/home/dek/sw/libguestfs-1.12.3/lib/guestfs/supermin.d/hostfiles supermin helper [00016ms] visiting /usr/local/home/dek/sw/libguestfs-1.12.3/lib/guestfs/supermin.d/init.img supermin helper [00049ms] finished creating appliance libguestfs: [00053ms] begin testing qemu features libguestfs: [00065ms] finished testing qemu features libguestfs: accept_from_daemon: 0x22df410 g->state = 1 libguestfs: [00066ms] /home/dek/sw/qemu-kvm-0.14.1/bin/qemu-system-x86_64 \ -drive file=/tmp/libguestfs-test-tool-sda-iWMYOJ,cache=off,format=raw,if=virtio \ -nodefconfig \ -enable-kvm \ -nodefaults \ -nographic \ -m 500 \ -no-reboot \ -no-hpet \ -device virtio-serial \ -serial stdio \ -chardev socket,path=/tmp/libguestfsMqHmAh/guestfsd.sock,id=channel0 \ -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \ -kernel /var/tmp/.guestfs-88619/kernel.23376 \ -initrd /var/tmp/.guestfs-88619/initrd.23376 \ -append 'panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=rxvt ' \ -drive file=/var/tmp/.guestfs-88619/root.23376,snapshot=on,if=virtio,cache=unsafe [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Linux version 2.6.38.8-experimental4 (root@redacted.com) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #2 SMP Mon Jun 27 14:14:51 PDT 2011 [ 0.000000] Command line: panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=rxvt [ 0.000000] BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: 0000000000000000 - 000000000009bc00 (usable) [ 0.000000] BIOS-e820: 000000000009bc00 - 00000000000a0000 (reserved) [ 0.000000] BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved) [ 0.000000] BIOS-e820: 0000000000100000 - 000000001f3fd000 (usable) [ 0.000000] BIOS-e820: 000000001f3fd000 - 000000001f400000 (reserved) [ 0.000000] BIOS-e820: 00000000feffc000 - 00000000ff000000 (reserved) [ 0.000000] BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved) [ 0.000000] NX (Execute Disable) protection: active [ 0.000000] DMI 2.4 present. [ 0.000000] No AGP bridge found [ 0.000000] last_pfn = 0x1f3fd max_arch_pfn = 0x400000000 [ 0.000000] PAT not supported by CPU. [ 0.000000] found SMP MP-table at [ffff8800000fdbf0] fdbf0 [ 0.000000] init_memory_mapping: 0000000000000000-000000001f3fd000 [ 0.000000] RAMDISK: 1f2fc000 - 1f3f0000 [ 0.000000] No NUMA configuration found [ 0.000000] Faking a node at 0000000000000000-000000001f3fd000 [ 0.000000] Initmem setup node 0 0000000000000000-000000001f3fd000 [ 0.000000] NODE_DATA [000000001f3f5000 - 000000001f3f9fff] [ 0.000000] kvm-clock: Using msrs 12 and 11 [ 0.000000] kvm-clock: cpu 0, msr 0:1a93a41, boot clock [ 0.000000] Zone PFN ranges: [ 0.000000] DMA 0x00000010 -> 0x00001000 [ 0.000000] DMA32 0x00001000 -> 0x00100000 [ 0.000000] Normal empty [ 0.000000] Movable zone start PFN for each node [ 0.000000] early_node_map[2] active PFN ranges [ 0.000000] 0: 0x00000010 -> 0x0000009b [ 0.000000] 0: 0x00000100 -> 0x0001f3fd [ 0.000000] SFI: Simple Firmware Interface v0.81 http://simplefirmware.org [ 0.000000] Intel MultiProcessor Specification v1.4 [ 0.000000] MPTABLE: OEM ID: BOCHSCPU [ 0.000000] MPTABLE: Product ID: 0.1 [ 0.000000] MPTABLE: APIC at: 0xFEE00000 [ 0.000000] Processor #0 (Bootup-CPU) [ 0.000000] IOAPIC[0]: apic_id 1, version 17, address 0xfec00000, GSI 0-23 [ 0.000000] Processors: 1 [ 0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs [ 0.000000] PM: Registered nosave memory: 000000000009b000 - 000000000009c000 [ 0.000000] PM: Registered nosave memory: 000000000009c000 - 00000000000a0000 [ 0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000f0000 [ 0.000000] PM: Registered nosave memory: 00000000000f0000 - 0000000000100000 [ 0.000000] Allocating PCI resources starting at 1f400000 (gap: 1f400000:dfbfc000) [ 0.000000] Booting paravirtualized kernel on KVM [ 0.000000] setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:1 nr_node_ids:1 [ 0.000000] PERCPU: Embedded 28 pages/cpu @ffff88001f000000 s83648 r8192 d22848 u2097152 [ 0.000000] kvm-clock: cpu 0, msr 0:1f013a41, primary cpu clock [ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 126124 [ 0.000000] Policy zone: DMA32 [ 0.000000] Kernel command line: panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=rxvt [ 0.000000] Disabling memory control group subsystem [ 0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes) [ 0.000000] Checking aperture... [ 0.000000] No AGP bridge found [ 0.000000] Memory: 489508k/511988k available (5440k kernel code, 468k absent, 22012k reserved, 5307k data, 840k init) [ 0.000000] SLUB: Genslabs=15, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] Hierarchical RCU implementation. [ 0.000000] RCU-based detection of stalled CPUs is disabled. [ 0.000000] NR_IRQS:4352 nr_irqs:256 16 [ 0.000000] Console: colour dummy device 80x25 [ 0.000000] console [ttyS0] enabled [ 0.000000] Detected 2666.760 MHz processor. [ 0.000000] TSC resynchronization disabled on non-AMD processors [ 0.020000] Calibrating delay loop (skipped) preset value.. 5333.52 BogoMIPS (lpj=26667600) [ 0.020000] pid_max: default: 32768 minimum: 301 [ 0.020000] Security Framework initialized [ 0.020000] AppArmor: AppArmor initialized [ 0.020000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes) [ 0.020000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes) [ 0.020000] Mount-cache hash table entries: 256 [ 0.020000] Initializing cgroup subsys ns [ 0.020000] ns_cgroup deprecated: consider using the 'clone_children' flag without the ns_cgroup. [ 0.020000] Initializing cgroup subsys cpuacct [ 0.020000] Initializing cgroup subsys memory [ 0.020000] Initializing cgroup subsys devices [ 0.020000] Initializing cgroup subsys freezer [ 0.020000] Initializing cgroup subsys net_cls [ 0.020000] mce: CPU supports 10 MCE banks [ 0.020000] SMP alternatives: switching to UP code [ 0.031479] Freeing SMP alternatives: 24k freed [ 0.031811] ftrace: allocating 20794 entries in 82 pages [ 0.040051] Setting APIC routing to flat [ 0.040385] CPU0: Intel QEMU Virtual CPU version 0.14.1 stepping 03 [ 0.160050] Performance Events: unsupported p6 CPU model 2 no PMU driver, software events only. [ 0.160898] Brought up 1 CPUs [ 0.161167] Total of 1 processors activated (5333.52 BogoMIPS). [ 0.161686] devtmpfs: initialized [ 0.162127] print_constraints: dummy: [ 0.162469] NET: Registered protocol family 16 [ 0.163074] PCI: Using configuration type 1 for base access [ 0.164322] bio: create slab <bio-0> at 0 [ 0.164848] ACPI: Interpreter disabled. [ 0.165193] vgaarb: loaded [ 0.165576] SCSI subsystem initialized [ 0.166057] usbcore: registered new interface driver usbfs [ 0.166485] usbcore: registered new interface driver hub [ 0.166864] usbcore: registered new device driver usb [ 0.167280] PCI: Probing PCI hardware [ 0.168467] pci 0000:00:01.3: quirk: [io 0xb000-0xb03f] claimed by PIIX4 ACPI [ 0.168965] pci 0000:00:01.3: quirk: [io 0xb100-0xb10f] claimed by PIIX4 SMB [ 0.170864] pci 0000:00:01.0: PIIX/ICH IRQ router [8086:7000] [ 0.171473] NetLabel: Initializing [ 0.171709] NetLabel: domain hash size = 128 [ 0.172013] NetLabel: protocols = UNLABELED CIPSOv4 [ 0.172365] NetLabel: unlabeled traffic allowed by default [ 0.172774] Switching to clocksource kvm-clock [ 0.174699] AppArmor: AppArmor Filesystem Enabled [ 0.175040] pnp: PnP ACPI: disabled [ 0.176383] NET: Registered protocol family 2 [ 0.176729] IP route cache hash table entries: 4096 (order: 3, 32768 bytes) [ 0.177329] TCP established hash table entries: 16384 (order: 6, 262144 bytes) [ 0.177878] TCP bind hash table entries: 16384 (order: 6, 262144 bytes) [ 0.178349] TCP: Hash tables configured (established 16384 bind 16384) [ 0.178807] TCP reno registered [ 0.179024] UDP hash table entries: 256 (order: 1, 8192 bytes) [ 0.179418] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) [ 0.179887] NET: Registered protocol family 1 [ 0.179887] Switched to NOHz mode on CPU #0 [ 0.179887] pci 0000:00:00.0: Limiting direct PCI/PCI transfers [ 0.179887] pci 0000:00:01.0: PIIX3: Enabling Passive Release [ 0.179887] pci 0000:00:01.0: Activating ISA DMA hang workarounds [ 0.179887] Trying to unpack rootfs image as initramfs... [ 0.180065] Freeing initrd memory: 976k freed [ 0.180573] platform rtc_cmos: registered platform RTC device (no PNP device found) [ 0.181267] audit: initializing netlink socket (disabled) [ 0.181672] type=2000 audit(1313186460.170:1): initialized [ 0.192617] HugeTLB registered 2 MB page size, pre-allocated 0 pages [ 0.194333] VFS: Disk quotas dquot_6.5.2 [ 0.194657] Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.195424] fuse init (API version 7.16) [ 0.195797] msgmni has been set to 958 [ 0.196211] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253) [ 0.196722] io scheduler noop registered [ 0.197009] io scheduler deadline registered (default) [ 0.197406] pci_hotplug: PCI Hot Plug PCI Core version: 0.5 [ 0.197820] pciehp: PCI Express Hot Plug Controller Driver version: 0.4 [ 0.198454] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 0.219964] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A [ 0.220670] Linux agpgart interface v0.103 [ 0.221807] brd: module loaded [ 0.222457] loop: module loaded [ 0.223121] scsi0 : ata_piix [ 0.223395] scsi1 : ata_piix [ 0.223622] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc000 irq 14 [ 0.224054] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc008 irq 15 [ 0.224753] Fixed MDIO Bus: probed [ 0.225021] PPP generic driver version 2.4.2 [ 0.225354] tun: Universal TUN/TAP device driver, 1.6 [ 0.225682] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com> [ 0.226144] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.226601] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 0.227009] uhci_hcd: USB Universal Host Controller Interface driver [ 0.227482] i8042: PNP: No PS/2 controller found. Probing ports directly. [ 0.228324] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 0.228658] serio: i8042 AUX port at 0x60,0x64 irq 12 [ 0.229349] mousedev: PS/2 mouse device common for all mice [ 0.229918] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0 [ 0.230707] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0 [ 0.231159] rtc0: alarms up to one day, 114 bytes nvram [ 0.231590] device-mapper: ioctl: 4.19.1-ioctl (2011-01-07) initialised: dm-devel@redhat.com [ 0.232208] device-mapper: multipath: version 1.2.0 loaded [ 0.232579] device-mapper: multipath round-robin: version 1.0.0 loaded [ 0.233113] cpuidle: using governor ladder [ 0.233384] cpuidle: using governor menu [ 0.233784] TCP cubic registered [ 0.234107] NET: Registered protocol family 10 [ 0.234712] NET: Registered protocol family 17 [ 0.235019] Registering the dns_resolver key type [ 0.235458] registered taskstats version 1 [ 0.235914] rtc_cmos rtc_cmos: setting system clock to 2011-08-12 22:00:59 UTC (1313186459) [ 0.236474] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found [ 0.236860] EDD information not available. [ 0.384308] Freeing unused kernel memory: 840k freed [ 0.385874] Write protecting the kernel read-only data: 10240k [ 0.393138] Freeing unused kernel memory: 684k freed [ 0.402678] Freeing unused kernel memory: 1776k freed febootstrap: mounting /proc febootstrap: uptime: 0.40 0.19 febootstrap: ext2 mini initrd starting up febootstrap: mounting /sys febootstrap: internal insmod libcrc32c.ko insmod: init_module: libcrc32c.ko: Unknown symbol in module febootstrap: internal insmod crc32c-intel.ko insmod: init_module: crc32c-intel.ko: No such device febootstrap: internal insmod crc-itu-t.ko febootstrap: internal insmod crc32c.ko febootstrap: internal insmod crc-ccitt.ko febootstrap: internal insmod crc7.ko febootstrap: internal insmod scsi_transport_spi.ko febootstrap: internal insmod sym53c8xx.ko febootstrap: internal insmod sparse-keymap.ko febootstrap: internal insmod ideapad-laptop.ko insmod: init_module: ideapad-laptop.ko: No such device febootstrap: internal insmod virtio_ring.ko febootstrap: internal insmod virtio.ko febootstrap: internal insmod virtio-rng.ko febootstrap: internal insmod virtio_console.ko febootstrap: internal insmod virtio_balloon.ko febootstrap: no ext2 root device found Please include FULL verbose output in your bug report. [ 0.423999] Kernel panic - not syncing: Attempted to kill init! [ 0.424572] Pid: 1, comm: init Not tainted 2.6.38.8-experimental4 #2 [ 0.425087] Call Trace: [ 0.425298] [<ffffffff81542e4d>] ? panic+0x91/0x1b0 [ 0.425757] [<ffffffff810eaaa0>] ? perf_event_exit_task+0xc0/0x210 [ 0.426266] [<ffffffff8105f2c8>] ? do_exit+0x728/0x860 [ 0.426669] [<ffffffff8105f451>] ? do_group_exit+0x51/0xc0 [ 0.427089] [<ffffffff8105f4d7>] ? sys_exit_group+0x17/0x20 [ 0.427515] [<ffffffff8100bf82>] ? system_call_fastpath+0x16/0x1b [ 0.428127] Rebooting in 1 seconds..libguestfs: error: unexpected end of file when reading from daemon. See earlier debug messages. Or you can run 'libguestfs-test-tool' and post the complete output into a bug report or message to the libguestfs mailing list. libguestfs: child_cleanup: 0x22df410: child process died libguestfs-test-tool: failed to launch appliance libguestfs: closing guestfs handle 0x22df410 (state 0) On Fri, Aug 12, 2011 at 2:35 PM, David Konerding <dek@konerding.com> wrote:
On Fri, Aug 12, 2011 at 2:12 PM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Fri, Aug 12, 2011 at 02:00:20PM -0700, David Konerding wrote:
By download and unpack, do you mean a kernel source package, or a kernel package from a later Ubuntu release such as 10.10?
You could compile it from source, but it'd be easier to just take a compiled binary from any later Ubuntu (11.04 seems like the best bet since it's the one we use). Don't forget you need the modules directory as well as vmlinuz.
Looks like this is moot. Turns out my kernel team has a test kernel (2.6.38, I feel like I'm in the 23rd century) and I'm getting my workstation converted to that.
Rich.
-- 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. http://et.redhat.com/~rjones/virt-df/
On Fri, Aug 12, 2011 at 03:13:30PM -0700, David Konerding wrote:
febootstrap: mounting /proc febootstrap: uptime: 0.40 0.19 febootstrap: ext2 mini initrd starting up febootstrap: mounting /sys febootstrap: internal insmod libcrc32c.ko insmod: init_module: libcrc32c.ko: Unknown symbol in module febootstrap: internal insmod crc32c-intel.ko insmod: init_module: crc32c-intel.ko: No such device febootstrap: internal insmod crc-itu-t.ko febootstrap: internal insmod crc32c.ko febootstrap: internal insmod crc-ccitt.ko febootstrap: internal insmod crc7.ko febootstrap: internal insmod scsi_transport_spi.ko febootstrap: internal insmod sym53c8xx.ko febootstrap: internal insmod sparse-keymap.ko febootstrap: internal insmod ideapad-laptop.ko insmod: init_module: ideapad-laptop.ko: No such device febootstrap: internal insmod virtio_ring.ko febootstrap: internal insmod virtio.ko febootstrap: internal insmod virtio-rng.ko febootstrap: internal insmod virtio_console.ko febootstrap: internal insmod virtio_balloon.ko febootstrap: no ext2 root device found
It appears the kernel doesn't include an ext2 driver or module. The Ubuntu kernel that we use has ext2 compiled in: CONFIG_EXT2_FS=y Also the Fedora kernels have direct ext2 support compiled in. febootstrap *ought* to be able to find the ext2.ko module for your kernel and load it into the initrd. According to the output above, this didn't happen, which would indicate one of: - you don't have ext2.ko under the modules path - the module should be ext4.ko (because the kernel option CONFIG_EXT4_USE_FOR_EXT23=y is enabled) -- this is a bug in febootstrap - you have the module, but the appliance wasn't rebuilt (did you rm -rf {/var,}/tmp/.guestfs-* ?) - it's not a well-tested path because everyone else has this compiled in, so febootstrap is broken for some other reason Here is the code: http://git.annexia.org/?p=febootstrap.git;a=blob;f=helper/ext2initrd.c;h=da4... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
On Fri, Aug 12, 2011 at 03:13:30PM -0700, David Konerding wrote:
febootstrap: internal insmod virtio_ring.ko febootstrap: internal insmod virtio.ko febootstrap: internal insmod virtio-rng.ko febootstrap: internal insmod virtio_console.ko febootstrap: internal insmod virtio_balloon.ko febootstrap: no ext2 root device found Please include FULL verbose output in your bug report.
Sorry, disregard the previous answer. The real reason is that you don't have a virtio block driver (virtio_blk.ko). This needs to be built as a module in your kernel. Is this a standard Ubuntu kernel? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
On Fri, Aug 12, 2011 at 3:30 PM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Fri, Aug 12, 2011 at 03:13:30PM -0700, David Konerding wrote:
febootstrap: internal insmod virtio_ring.ko febootstrap: internal insmod virtio.ko febootstrap: internal insmod virtio-rng.ko febootstrap: internal insmod virtio_console.ko febootstrap: internal insmod virtio_balloon.ko febootstrap: no ext2 root device found Please include FULL verbose output in your bug report.
Sorry, disregard the previous answer.
The real reason is that you don't have a virtio block driver (virtio_blk.ko). This needs to be built as a module in your kernel.
Is this a standard Ubuntu kernel?
Mostly, but there are some modifications. I think the kernel team just didn't compile it in. I'll check with them but probably nothing will be done until next week. Dave Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
On Fri, Aug 12, 2011 at 3:34 PM, David Konerding <dek@konerding.com> wrote:
On Fri, Aug 12, 2011 at 3:30 PM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Fri, Aug 12, 2011 at 03:13:30PM -0700, David Konerding wrote:
febootstrap: internal insmod virtio_ring.ko febootstrap: internal insmod virtio.ko febootstrap: internal insmod virtio-rng.ko febootstrap: internal insmod virtio_console.ko febootstrap: internal insmod virtio_balloon.ko febootstrap: no ext2 root device found Please include FULL verbose output in your bug report.
Sorry, disregard the previous answer.
The real reason is that you don't have a virtio block driver (virtio_blk.ko). This needs to be built as a module in your kernel.
Is this a standard Ubuntu kernel?
OK, I have a new 2.6.38 kernel with virtio_blk.ko. This solves the failure to find ext2 root device. Still not having any luck running the test-tool to completion. There is no /sys in the guest root image. There is also no /etc/fstab (is that expected?) There is no ethernet interface even though it looks like it can load virtio_net. febootstrap: internal insmod virtio_balloon.ko febootstrap: picked /sys/block/vdb/dev as root device febootstrap: creating /dev/root as block special 251:16 febootstrap: mounting new root on /root febootstrap: chroot /proc/uptime: No such file or directory Starting /init script ... warning: can't open /etc/fstab: No such file or directory mount: mount point /sys does not exist cannot open /dev/null [ 1.518238] udevd (45): /proc/45/oom_adj is deprecated, please use /proc/45/oom_score_adj instead. Cannot access the Hardware Clock via any known method. Use the --debug option to see the details of our search for an access method. SIOCSIFADDR: No such device eth0: ERROR while getting interface flags: No such device SIOCADDRT: No such process Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory /init: line 73: /sys/block/vd*/queue/rotational: No such file or directory /dev: total 4 -rw-r--r-- 1 0 0 30 Aug 15 22:12 kmsg rootfs / rootfs rw 0 0 proc /proc proc rw,relatime 0 0 /dev/root / ext2 rw,noatime,errors=continue 0 0 /proc /proc proc rw,relatime 0 0 Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface Module Size Used by virtio_balloon 4416 0 virtio_pci 6621 0 virtio_net 13053 0 virtio_blk 5631 1 virtio_console 14773 0 virtio_rng 2308 0 virtio 4824 6 virtio_balloon,virtio_pci,virtio_net,virtio_blk,virtio_console,virtio_rng virtio_ring 5807 6 virtio_balloon,virtio_pci,virtio_net,virtio_blk,virtio_console,virtio_rng sparse_keymap 4178 0 sym53c8xx 75987 0 scsi_transport_spi 25047 1 sym53c8xx crc7 1458 0 crc_ccitt 1707 0 crc32c 3015 0 crc_itu_t 1747 0 Mon Aug 15 22:12:41 UTC 2011 uptime: 1.76 0.21 verbose daemon enabled linux commmand line: panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=rxvt Failed to connect to virtio-serial channel. Mostly, but there are some modifications. I think the kernel team just
didn't compile it in. I'll check with them but probably nothing will be done until next week.
Dave
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
On Mon, Aug 15, 2011 at 03:21:25PM -0700, David Konerding wrote:
OK, I have a new 2.6.38 kernel with virtio_blk.ko. This solves the failure to find ext2 root device.
Still not having any luck running the test-tool to completion. There is no /sys in the guest root image. There is also no /etc/fstab (is that expected?) There is no ethernet interface even though it looks like it can load virtio_net.
In my appliance, there is /sys, /etc/fstab (present but empty) and eth0.
Starting /init script ... warning: can't open /etc/fstab: No such file or directory mount: mount point /sys does not exist
Next step would be to add some debugging to appliance/init to show what commands are being executed, and what's in the filesystem. Also if you do: $ ./run rescue/virt-rescue -a /dev/null then it may manage to get to a shell, in which case you can poke around in the appliance by hand. Rich. -- 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. http://et.redhat.com/~rjones/virt-df/
On Mon, Aug 15, 2011 at 3:33 PM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Mon, Aug 15, 2011 at 03:21:25PM -0700, David Konerding wrote:
OK, I have a new 2.6.38 kernel with virtio_blk.ko. This solves the failure to find ext2 root device.
Still not having any luck running the test-tool to completion. There is no /sys in the guest root image. There is also no /etc/fstab (is that expected?) There is no ethernet interface even though it looks like it can load virtio_net.
In my appliance, there is /sys, /etc/fstab (present but empty) and eth0.
Starting /init script ... warning: can't open /etc/fstab: No such file or directory mount: mount point /sys does not exist
Next step would be to add some debugging to appliance/init to show what commands are being executed, and what's in the filesystem.
Also if you do:
$ ./run rescue/virt-rescue -a /dev/null
then it may manage to get to a shell, in which case you can poke around in the appliance by hand.
Interesting. yes, this booted into a pretty dysfunctional host, but I did get a shell. The error messages are the same. I'll investigate some more. Dave
Rich.
-- 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. http://et.redhat.com/~rjones/virt-df/
On Mon, Aug 15, 2011 at 3:49 PM, David Konerding <dek@konerding.com> wrote:
On Mon, Aug 15, 2011 at 3:33 PM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Mon, Aug 15, 2011 at 03:21:25PM -0700, David Konerding wrote:
OK, I have a new 2.6.38 kernel with virtio_blk.ko. This solves the failure to find ext2 root device.
Still not having any luck running the test-tool to completion. There is no /sys in the guest root image. There is also no /etc/fstab (is that expected?) There is no ethernet interface even though it looks like it can load virtio_net.
In my appliance, there is /sys, /etc/fstab (present but empty) and eth0.
OK. I fixed the /sys problem: no /sys directory exists in the base image, so mounting fails. I edited inittab, and added mkdir /sys , this seems to help. Isn't this normally created by febootstrap? I have no fstab, but this doesn't really cause any problems AFAICT. The next one is eth0. The KVM invocation in test-tools is this; I see no -net option to setup a network interface. libguestfs: [12474ms] /home/dek/sw/qemu-kvm-0.14.1/bin/qemu-system-x86_64 \ -drive file=/tmp/libguestfs-test-tool-sda-KUZzVU,cache=off,format=raw,if=virtio \ -nodefconfig \ -enable-kvm \ -nodefaults \ -nographic \ -m 500 \ -no-reboot \ -no-hpet \ -device virtio-serial \ -serial stdio \ -chardev socket,path=/tmp/libguestfsgIrcIo/guestfsd.sock,id=channel0 \ -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \ -kernel /var/tmp/.guestfs-88619/kernel.28112 \ -initrd /var/tmp/.guestfs-88619/initrd.28112 \ -append 'panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=rxvt ' \ -drive file=/var/tmp/.guestfs-88619/root.28112,snapshot=on,if=virtio,cache=unsafe
Starting /init script ...
warning: can't open /etc/fstab: No such file or directory mount: mount point /sys does not exist
Next step would be to add some debugging to appliance/init to show what commands are being executed, and what's in the filesystem.
Also if you do:
$ ./run rescue/virt-rescue -a /dev/null
then it may manage to get to a shell, in which case you can poke around in the appliance by hand.
Interesting. yes, this booted into a pretty dysfunctional host, but I did get a shell. The error messages are the same. I'll investigate some more.
Dave
Rich.
-- 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. http://et.redhat.com/~rjones/virt-df/
On Mon, Aug 15, 2011 at 08:49:01PM -0700, David Konerding wrote: [..] I forgot to add last night that your problem sounds like missing udev. If you get a process listing (ps ax) is udevd running? On Ubuntu 11.04 in virt-rescue I get: 43 ? S<s 0:00 /sbin/udevd --daemon 367 ? S< 0:00 /sbin/udevd --daemon 368 ? S< 0:00 /sbin/udevd --daemon
OK. I fixed the /sys problem: no /sys directory exists in the base image, so mounting fails. I edited inittab, and added mkdir /sys , this seems to help. Isn't this normally created by febootstrap?
In Ubuntu 11.04 it's created by the initscripts package.
I have no fstab, but this doesn't really cause any problems AFAICT.
This is correct in fact. In the Ubuntu 11.04 appliance there is no /etc/fstab and it doesn't affect anything.
The next one is eth0. The KVM invocation in test-tools is this; I see no -net option to setup a network interface.
eth0 isn't really important. It's only added if you add the --network option to virt-rescue. I think there is something far more fundamental broken in your appliance. Missing udev would be my guess. Is /dev there? What does it contain? For my Ubuntu 11.04 appliance: # ls -l /dev/ | wc -l 175 Rich. -- 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. http://et.redhat.com/~rjones/virt-df/
On Tue, Aug 16, 2011 at 12:25 AM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Mon, Aug 15, 2011 at 08:49:01PM -0700, David Konerding wrote: [..]
I forgot to add last night that your problem sounds like missing udev. If you get a process listing (ps ax) is udevd running? On Ubuntu 11.04 in virt-rescue I get:
43 ? S<s 0:00 /sbin/udevd --daemon 367 ? S< 0:00 /sbin/udevd --daemon 368 ? S< 0:00 /sbin/udevd --daemon
udevd is definitely there (I see 1 instance, not three). udevd complains about /dev/null being missing, and /dev is pretty empty (there is only a kmsg file there). The other big problem I see right now is that virtio-serial isn't working properly (which is the ultimate message I see). I'm trying to debug that a bit by manually starting a simple KVM with the virtio-console flags and seeing if that works. Dave
OK. I fixed the /sys problem: no /sys directory exists in the base image, so mounting fails. I edited inittab, and added mkdir /sys , this seems to help. Isn't this normally created by febootstrap?
In Ubuntu 11.04 it's created by the initscripts package.
I have no fstab, but this doesn't really cause any problems AFAICT.
This is correct in fact. In the Ubuntu 11.04 appliance there is no /etc/fstab and it doesn't affect anything.
The next one is eth0. The KVM invocation in test-tools is this; I see no -net option to setup a network interface.
eth0 isn't really important. It's only added if you add the --network option to virt-rescue.
I think there is something far more fundamental broken in your appliance. Missing udev would be my guess. Is /dev there? What does it contain?
For my Ubuntu 11.04 appliance:
# ls -l /dev/ | wc -l 175
Rich.
-- 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. http://et.redhat.com/~rjones/virt-df/
On Tue, Aug 16, 2011 at 06:54:23AM -0700, David Konerding wrote:
On Tue, Aug 16, 2011 at 12:25 AM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Mon, Aug 15, 2011 at 08:49:01PM -0700, David Konerding wrote: [..]
I forgot to add last night that your problem sounds like missing udev. If you get a process listing (ps ax) is udevd running? On Ubuntu 11.04 in virt-rescue I get:
43 ? S<s 0:00 /sbin/udevd --daemon 367 ? S< 0:00 /sbin/udevd --daemon 368 ? S< 0:00 /sbin/udevd --daemon
udevd is definitely there (I see 1 instance, not three). udevd complains about /dev/null being missing, and /dev is pretty empty (there is only a kmsg file there).
So I'm assuming /dev exists, and is a directory?
The other big problem I see right now is that virtio-serial isn't working properly (which is the ultimate message I see). I'm trying to debug that a bit by manually starting a simple KVM with the virtio-console flags and seeing if that works.
Yeah, one thing about this which I forgot. guestfsd opens /dev/virtio-ports/org.libguestfs.channel.0, see http://git.annexia.org/?p=libguestfs.git;a=blob;f=daemon/guestfsd.c;h=eb1e82... This device won't exist unless (1) udev is running and populating /dev properly -- see above. And (2) the udev rules exist for virtio-serial. It might be that (2) requires an updated version of udev from a later Ubuntu release. In Ubuntu 11.04 the rules are in '/lib/udev/rules.d/50-udev-default.rules'. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
On Tue, Aug 16, 2011 at 7:17 AM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Tue, Aug 16, 2011 at 06:54:23AM -0700, David Konerding wrote:
On Tue, Aug 16, 2011 at 12:25 AM, Richard W.M. Jones <rjones@redhat.com wrote:
On Mon, Aug 15, 2011 at 08:49:01PM -0700, David Konerding wrote: [..]
I forgot to add last night that your problem sounds like missing udev. If you get a process listing (ps ax) is udevd running? On Ubuntu 11.04 in virt-rescue I get:
43 ? S<s 0:00 /sbin/udevd --daemon 367 ? S< 0:00 /sbin/udevd --daemon 368 ? S< 0:00 /sbin/udevd --daemon
udevd is definitely there (I see 1 instance, not three). udevd complains about /dev/null being missing, and /dev is pretty empty (there is only a kmsg file there).
So I'm assuming /dev exists, and is a directory?
Yes. OK, I fixed the udev problem, there are now three daemons running, and /dev is populated as expected. Looks like the problem was the missing initscripts package, which I shoe-horned into febootstrap_debian.ml.
The other big problem I see right now is that virtio-serial isn't working
properly (which is the ultimate message I see). I'm trying to debug that a bit by manually starting a simple KVM with the virtio-console flags and seeing if that works.
Yeah, one thing about this which I forgot.
guestfsd opens /dev/virtio-ports/org.libguestfs.channel.0, see
http://git.annexia.org/?p=libguestfs.git;a=blob;f=daemon/guestfsd.c;h=eb1e82...
This device won't exist unless (1) udev is running and populating /dev properly -- see above. And (2) the udev rules exist for virtio-serial. It might be that (2) requires an updated version of udev from a later Ubuntu release. In Ubuntu 11.04 the rules are in '/lib/udev/rules.d/50-udev-default.rules'.
Ah. This is what I have on my home machine (Ubuntu 10.10): # virtio serial / console ports KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" This is what I have on my work machine (Ubuntu 10.04 derivative): # virtio serial / console ports KERNEL=="vport*", SYMLINK+="virtio-ports/$ATTR{name}" Do you have something more? I'm tempted to upgrade my home machine to have at least one box I can use to test libguestfs.
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
On Tue, Aug 16, 2011 at 07:27:07AM -0700, David Konerding wrote:
Ah. This is what I have on my home machine (Ubuntu 10.10):
# virtio serial / console ports KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"
This is what I have on my work machine (Ubuntu 10.04 derivative): # virtio serial / console ports KERNEL=="vport*", SYMLINK+="virtio-ports/$ATTR{name}"
Do you have something more?
Ubuntu 11.04 has: # virtio serial / console ports KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" Fedora 15 has the same. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
On Fri, Aug 12, 2011 at 1:49 PM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Fri, Aug 12, 2011 at 01:23:33PM -0700, David Konerding wrote:
Yeah. It gets as far as this (which surprised me since I grabbed a recent qemu-kvm that should have virtio-serial support)
Fri Aug 12 20:20:57 UTC 2011 uptime: 0.52 0.19 verbose daemon enabled linux commmand line: panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=rxvt
Failed to connect to virtio-serial channel.
Almost certainly kernel version <= 2.6.34-ish (whichever version it was that added virtio-serial support, definitely 2.6.32 does NOT work and 2.6.36 DOES work).
I'd be able to tell for sure if I saw the complete output.
I see. Yeah, we're stuck at 2.6.32. Compelte output: libguestfs: new guestfs handle 0x18e5410 ===== Test starts here ===== LIBGUESTFS_DEBUG=1 library version: 1.12.3 guestfs_get_append: (null) guestfs_get_attach_method: appliance guestfs_get_autosync: 1 guestfs_get_direct: 0 guestfs_get_memsize: 500 guestfs_get_network: 0 guestfs_get_path: /usr/local/home/dek/sw/libguestfs-1.12.3/lib/guestfs guestfs_get_pgroup: 0 guestfs_get_qemu: /home/dek/sw/qemu-kvm-0.14.1/bin/qemu-system-x86_64 guestfs_get_recovery_proc: 1 guestfs_get_selinux: 0 guestfs_get_trace: 0 guestfs_get_verbose: 1 host_cpu: x86_64 Launching appliance, timeout set to 120 seconds. libguestfs: [00000ms] febootstrap-supermin-helper --verbose -f checksum '/usr/local/home/dek/sw/libguestfs-1.12.3/lib/guestfs/supermin.d' x86_64 supermin helper [00000ms] whitelist = (not specified), host_cpu = x86_64, kernel = (null), initrd = (null), appliance = (null) supermin helper [00000ms] inputs[0] = /usr/local/home/dek/sw/libguestfs-1.12.3/lib/guestfs/supermin.d checking modpath /lib/modules/2.6.32-gg465-generic is a directory picked vmlinuz-2.6.32-gg465-generic because modpath /lib/modules/2.6.32-gg465-generic exists checking modpath /lib/modules/2.6.32-gg508-generic is a directory picked vmlinuz-2.6.32-gg508-generic because modpath /lib/modules/2.6.32-gg508-generic exists supermin helper [00000ms] finished creating kernel supermin helper [00000ms] visiting /usr/local/home/dek/sw/libguestfs-1.12.3/lib/guestfs/supermin.d supermin helper [00000ms] visiting /usr/local/home/dek/sw/libguestfs-1.12.3/lib/guestfs/supermin.d/base.img supermin helper [00000ms] visiting /usr/local/home/dek/sw/libguestfs-1.12.3/lib/guestfs/supermin.d/daemon.img supermin helper [00000ms] visiting /usr/local/home/dek/sw/libguestfs-1.12.3/lib/guestfs/supermin.d/hostfiles supermin helper [00017ms] visiting /usr/local/home/dek/sw/libguestfs-1.12.3/lib/guestfs/supermin.d/init.img supermin helper [00048ms] finished creating appliance libguestfs: [00052ms] begin testing qemu features libguestfs: [00065ms] finished testing qemu features libguestfs: accept_from_daemon: 0x18e5410 g->state = 1 libguestfs: [00066ms] /home/dek/sw/qemu-kvm-0.14.1/bin/qemu-system-x86_64 \ -drive file=/tmp/libguestfs-test-tool-sda-pujJJr,cache=off,format=raw,if=virtio \ -nodefconfig \ -enable-kvm \ -nodefaults \ -nographic \ -m 500 \ -no-reboot \ -no-hpet \ -device virtio-serial \ -serial stdio \ -chardev socket,path=/tmp/libguestfss6CTYG/guestfsd.sock,id=channel0 \ -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \ -kernel /var/tmp/.guestfs-88619/kernel.4273 \ -initrd /var/tmp/.guestfs-88619/initrd.4273 \ -append 'panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=rxvt ' \ -drive file=/var/tmp/.guestfs-88619/root.4273,snapshot=on,if=virtio,cache=unsafe [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 2.6.32-gg508-generic ( corp-kernel-prebuild@redacted.com) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #gg508-Ubuntu SMP Tue May 24 05:09:12 PDT 2011 (Ubuntu 2.6.32-gg508-generic 2.6.32.38+drm33.16) [ 0.000000] Command line: panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=rxvt [ 0.000000] KERNEL supported cpus: [ 0.000000] Intel GenuineIntel [ 0.000000] AMD AuthenticAMD [ 0.000000] Centaur CentaurHauls [ 0.000000] BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: 0000000000000000 - 000000000009bc00 (usable) [ 0.000000] BIOS-e820: 000000000009bc00 - 00000000000a0000 (reserved) [ 0.000000] BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved) [ 0.000000] BIOS-e820: 0000000000100000 - 000000001f3fd000 (usable) [ 0.000000] BIOS-e820: 000000001f3fd000 - 000000001f400000 (reserved) [ 0.000000] BIOS-e820: 00000000feffc000 - 00000000ff000000 (reserved) [ 0.000000] BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved) [ 0.000000] DMI 2.4 present. [ 0.000000] last_pfn = 0x1f3fd max_arch_pfn = 0x400000000 [ 0.000000] PAT not supported by CPU. [ 0.000000] Scanning 1 areas for low memory corruption [ 0.000000] modified physical RAM map: [ 0.000000] modified: 0000000000000000 - 0000000000001000 (usable) [ 0.000000] modified: 0000000000001000 - 0000000000006000 (reserved) [ 0.000000] modified: 0000000000006000 - 000000000009bc00 (usable) [ 0.000000] modified: 000000000009bc00 - 00000000000a0000 (reserved) [ 0.000000] modified: 00000000000f0000 - 0000000000100000 (reserved) [ 0.000000] modified: 0000000000100000 - 000000001f3fd000 (usable) [ 0.000000] modified: 000000001f3fd000 - 000000001f400000 (reserved) [ 0.000000] modified: 00000000feffc000 - 00000000ff000000 (reserved) [ 0.000000] modified: 00000000fffc0000 - 0000000100000000 (reserved) [ 0.000000] init_memory_mapping: 0000000000000000-000000001f3fd000 [ 0.000000] NX (Execute Disable) protection: active [ 0.000000] RAMDISK: 1f2f8000 - 1f3efa00 [ 0.000000] No NUMA configuration found [ 0.000000] Faking a node at 0000000000000000-000000001f3fd000 [ 0.000000] Bootmem setup node 0 0000000000000000-000000001f3fd000 [ 0.000000] NODE_DATA [0000000000009000 - 000000000000dfff] [ 0.000000] bootmap [000000000000e000 - 0000000000011e7f] pages 4 [ 0.000000] (7 early reservations) ==> bootmem [0000000000 - 001f3fd000] [ 0.000000] #0 [0000000000 - 0000001000] BIOS data page ==> [0000000000 - 0000001000] [ 0.000000] #1 [0000006000 - 0000008000] TRAMPOLINE ==> [0000006000 - 0000008000] [ 0.000000] #2 [0001000000 - 0001a423a4] TEXT DATA BSS ==> [0001000000 - 0001a423a4] [ 0.000000] #3 [001f2f8000 - 001f3efa00] RAMDISK ==> [001f2f8000 - 001f3efa00] [ 0.000000] #4 [000009bc00 - 0000100000] BIOS reserved ==> [000009bc00 - 0000100000] [ 0.000000] #5 [0001a43000 - 0001a43049] BRK ==> [0001a43000 - 0001a43049] [ 0.000000] #6 [0000008000 - 0000009000] PGTABLE ==> [0000008000 - 0000009000] [ 0.000000] found SMP MP-table at [ffff8800000fdbf0] fdbf0 [ 0.000000] kvm-clock: cpu 0, msr 0:1859d01, boot clock [ 0.000000] Zone PFN ranges: [ 0.000000] DMA 0x00000000 -> 0x00001000 [ 0.000000] DMA32 0x00001000 -> 0x00100000 [ 0.000000] Normal 0x00100000 -> 0x00100000 [ 0.000000] Movable zone start PFN for each node [ 0.000000] early_node_map[3] active PFN ranges [ 0.000000] 0: 0x00000000 -> 0x00000001 [ 0.000000] 0: 0x00000006 -> 0x0000009b [ 0.000000] 0: 0x00000100 -> 0x0001f3fd [ 0.000000] SFI: Simple Firmware Interface v0.7 http://simplefirmware.org [ 0.000000] Intel MultiProcessor Specification v1.4 [ 0.000000] MPTABLE: OEM ID: BOCHSCPU [ 0.000000] MPTABLE: Product ID: 0.1 [ 0.000000] MPTABLE: APIC at: 0xFEE00000 [ 0.000000] Processor #0 (Bootup-CPU) [ 0.000000] I/O APIC #1 Version 17 at 0xFEC00000. [ 0.000000] Processors: 1 [ 0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs [ 0.000000] PM: Registered nosave memory: 0000000000001000 - 0000000000006000 [ 0.000000] PM: Registered nosave memory: 000000000009b000 - 000000000009c000 [ 0.000000] PM: Registered nosave memory: 000000000009c000 - 00000000000a0000 [ 0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000f0000 [ 0.000000] PM: Registered nosave memory: 00000000000f0000 - 0000000000100000 [ 0.000000] Allocating PCI resources starting at 1f400000 (gap: 1f400000:dfbfc000) [ 0.000000] Booting paravirtualized kernel on KVM [ 0.000000] NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:1 nr_node_ids:1 [ 0.000000] PERCPU: Embedded 30 pages/cpu @ffff880001c00000 s91992 r8192 d22696 u2097152 [ 0.000000] pcpu-alloc: s91992 r8192 d22696 u2097152 alloc=1*2097152 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] kvm-clock: cpu 0, msr 0:1c15d01, primary cpu clock [ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 126037 [ 0.000000] Policy zone: DMA32 [ 0.000000] Kernel command line: panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=rxvt [ 0.000000] Disabling memory control group subsystem [ 0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes) [ 0.000000] Initializing CPU#0 [ 0.000000] Checking aperture... [ 0.000000] No AGP bridge found [ 0.000000] Memory: 491628k/511988k available (5418k kernel code, 424k absent, 19936k reserved, 3040k data, 888k init) [ 0.000000] SLUB: Genslabs=14, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] Hierarchical RCU implementation. [ 0.000000] NR_IRQS:4352 nr_irqs:256 [ 0.000000] Console: colour dummy device 80x25 [ 0.000000] console [ttyS0] enabled [ 0.000000] Detected 2666.884 MHz processor. [ 0.000000] TSC resynchronization disabled on non-AMD processors [ 0.020000] Calibrating delay loop (skipped) preset value.. 5333.76 BogoMIPS (lpj=26668840) [ 0.020000] Security Framework initialized [ 0.020000] AppArmor: AppArmor initialized [ 0.020000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes) [ 0.020000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes) [ 0.020000] Mount-cache hash table entries: 256 [ 0.020000] Initializing cgroup subsys ns [ 0.020000] Initializing cgroup subsys cpuacct [ 0.020000] Initializing cgroup subsys memory [ 0.020000] Initializing cgroup subsys devices [ 0.020000] Initializing cgroup subsys freezer [ 0.020000] Initializing cgroup subsys net_cls [ 0.020000] CPU: L1 I cache: 32K, L1 D cache: 32K [ 0.020000] CPU: L2 cache: 4096K [ 0.020000] CPU 0/0x0 -> Node 0 [ 0.020000] mce: CPU supports 10 MCE banks [ 0.020000] Performance Events: unsupported p6 CPU model 2 no PMU driver, software events only. [ 0.020000] SMP alternatives: switching to UP code [ 0.039423] Freeing SMP alternatives: 40k freed [ 0.039810] ftrace: converting mcount calls to 0f 1f 44 00 00 [ 0.040011] ftrace: allocating 22510 entries in 89 pages [ 0.060104] Setting APIC routing to flat [ 0.060557] CPU0: Intel QEMU Virtual CPU version 0.14.1 stepping 03 [ 0.190180] Brought up 1 CPUs [ 0.190463] Total of 1 processors activated (5333.76 BogoMIPS). [ 0.191134] devtmpfs: initialized [ 0.191671] regulator: core version 0.5 [ 0.192059] Time: 20:50:19 Date: 08/12/11 [ 0.192469] NET: Registered protocol family 16 [ 0.193003] PCI: Using configuration type 1 for base access [ 0.194005] bio: create slab <bio-0> at 0 [ 0.194414] ACPI: Interpreter disabled. [ 0.194796] vgaarb: loaded [ 0.195119] SCSI subsystem initialized [ 0.195576] usbcore: registered new interface driver usbfs [ 0.196063] usbcore: registered new interface driver hub [ 0.196566] usbcore: registered new device driver usb [ 0.197130] PCI: Probing PCI hardware [ 0.198308] pci 0000:00:01.3: quirk: region b000-b03f claimed by PIIX4 ACPI [ 0.198919] pci 0000:00:01.3: quirk: region b100-b10f claimed by PIIX4 SMB [ 0.200719] pci 0000:00:01.0: PIIX/ICH IRQ router [8086:7000] [ 0.201406] NetLabel: Initializing [ 0.201693] NetLabel: domain hash size = 128 [ 0.202070] NetLabel: protocols = UNLABELED CIPSOv4 [ 0.202496] NetLabel: unlabeled traffic allowed by default [ 0.203001] Switching to clocksource kvm-clock [ 0.205013] AppArmor: AppArmor Filesystem Enabled [ 0.205437] pnp: PnP ACPI: disabled [ 0.205897] NET: Registered protocol family 2 [ 0.206343] IP route cache hash table entries: 4096 (order: 3, 32768 bytes) [ 0.207139] TCP established hash table entries: 16384 (order: 6, 262144 bytes) [ 0.207975] TCP bind hash table entries: 16384 (order: 6, 262144 bytes) [ 0.208718] TCP: Hash tables configured (established 16384 bind 16384) [ 0.209265] TCP reno registered [ 0.209601] NET: Registered protocol family 1 [ 0.209977] pci 0000:00:00.0: Limiting direct PCI/PCI transfers [ 0.210000] pci 0000:00:01.0: PIIX3: Enabling Passive Release [ 0.210000] pci 0000:00:01.0: Activating ISA DMA hang workarounds [ 0.210000] platform rtc_cmos: registered platform RTC device (no PNP device found) [ 0.210000] Scanning for low memory corruption every 60 seconds [ 0.210000] audit: initializing netlink socket (disabled) [ 0.210000] type=2000 audit(1313182219.207:1): initialized [ 0.217321] Trying to unpack rootfs image as initramfs... [ 0.219411] Freeing initrd memory: 990k freed [ 0.219983] HugeTLB registered 2 MB page size, pre-allocated 0 pages [ 0.221547] VFS: Disk quotas dquot_6.5.2 [ 0.221952] Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.223071] fuse init (API version 7.13) [ 0.223488] msgmni has been set to 962 [ 0.223996] alg: No test for stdrng (krng) [ 0.224412] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253) [ 0.225040] io scheduler noop registered [ 0.225390] io scheduler anticipatory registered [ 0.225793] io scheduler deadline registered [ 0.226182] io scheduler cfq registered (default) [ 0.226648] pci_hotplug: PCI Hot Plug PCI Core version: 0.5 [ 0.227127] pciehp: PCI Express Hot Plug Controller Driver version: 0.4 [ 0.228689] Linux agpgart interface v0.103 [ 0.229072] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 0.229761] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A [ 0.231199] brd: module loaded [ 0.231860] loop: module loaded [ 0.232187] input: Macintosh mouse button emulation as /devices/virtual/input/input0 [ 0.233082] scsi0 : ata_piix [ 0.233436] scsi1 : ata_piix [ 0.233733] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc000 irq 14 [ 0.234324] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc008 irq 15 [ 0.235293] Fixed MDIO Bus: probed [ 0.235615] PPP generic driver version 2.4.2 [ 0.236035] tun: Universal TUN/TAP device driver, 1.6 [ 0.236457] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com> [ 0.237063] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.237616] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 0.238156] uhci_hcd: USB Universal Host Controller Interface driver [ 0.238735] PNP: No PS/2 controller found. Probing ports directly. [ 0.239705] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 0.240333] serio: i8042 AUX port at 0x60,0x64 irq 12 [ 0.240854] mice: PS/2 mouse device common for all mice [ 0.241531] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1 [ 0.242487] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0 [ 0.243070] rtc0: alarms up to one day, 114 bytes nvram [ 0.243610] device-mapper: uevent: version 1.0.3 [ 0.244112] device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com [ 0.244917] device-mapper: multipath: version 1.1.0 loaded [ 0.245391] device-mapper: multipath round-robin: version 1.0.0 loaded [ 0.246062] cpuidle: using governor ladder [ 0.246447] cpuidle: using governor menu [ 0.246989] TCP cubic registered [ 0.247390] NET: Registered protocol family 10 [ 0.248099] lo: Disabled Privacy Extensions [ 0.248633] NET: Registered protocol family 17 [ 0.249120] registered taskstats version 1 [ 0.249662] Magic number: 7:822:851 [ 0.250053] rtc_cmos rtc_cmos: setting system clock to 2011-08-12 20:50:19 UTC (1313182219) [ 0.250749] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found [ 0.251271] EDD information not available. [ 0.400285] Freeing unused kernel memory: 888k freed [ 0.401497] Write protecting the kernel read-only data: 7752k febootstrap: mounting /proc febootstrap: uptime: 0.40 0.20 febootstrap: ext2 mini initrd starting up febootstrap: mounting /sys febootstrap: internal insmod libcrc32c.ko insmod: init_module: libcrc32c.ko: Unknown symbol in module febootstrap: internal insmod crc32c-intel.ko insmod: init_module: crc32c-intel.ko: No such device febootstrap: internal insmod crc-itu-t.ko febootstrap: internal insmod crc32c.ko febootstrap: internal insmod crc-ccitt.ko febootstrap: internal insmod crc7.ko febootstrap: internal insmod scsi_transport_spi.ko febootstrap: internal insmod sym53c8xx.ko febootstrap: internal insmod virtio.ko febootstrap: internal insmod virtio-rng.ko febootstrap: internal insmod virtio_console.ko febootstrap: internal insmod virtio_blk.ko febootstrap: internal insmod virtio_net.ko febootstrap: internal insmod virtio_ring.ko febootstrap: internal insmod virtio_pci.ko [ 0.423800] virtio-pci 0000:00:02.0: found PCI INT A -> IRQ 10 [ 0.424959] virtio-pci 0000:00:03.0: found PCI INT A -> IRQ 11 [ 0.425886] vda: unknown partition table [ 0.427214] virtio-pci 0000:00:04.0: found PCI INT A -> IRQ 11 [ 0.428160] vdb: unknown partition table febootstrap: internal insmod virtio_balloon.ko febootstrap: picked /sys/block/vdb/dev as root device febootstrap: creating /dev/root as block special 251:16 febootstrap: mounting new root on /root febootstrap: chroot /proc/uptime: No such file or directory Starting /init script ... warning: can't open /etc/fstab: No such file or directory mount: mount point /sys does not exist cannot open /dev/null Cannot access the Hardware Clock via any known method. Use the --debug option to see the details of our search for an access method. SIOCSIFADDR: No such device eth0: ERROR while getting interface flags: No such device SIOCADDRT: No such process Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory /init: line 73: /sys/block/vd*/queue/rotational: No such file or directory ls: error while loading shared libraries: libattr.so.1: cannot open shared object file: No such file or directory rootfs / rootfs rw 0 0 proc /proc proc rw,relatime 0 0 /dev/root / ext2 rw,noatime,errors=continue 0 0 /proc /proc proc rw,relatime 0 0 Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory Failed to find sysfs mount point read_urandom: /dev/urandom: open failed: No such file or directory lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface Module Size Used by virtio_balloon 3724 0 virtio_pci 6964 0 virtio_ring 4664 1 virtio_pci virtio_net 13459 0 virtio_blk 5138 1 virtio_console 3063 0 [permanent] virtio_rng 2493 0 virtio 4952 6 virtio_balloon,virtio_pci,virtio_net,virtio_blk,virtio_console,virtio_rng sym53c8xx 79704 0 scsi_transport_spi 26316 1 sym53c8xx crc7 1426 0 crc_ccitt 1675 0 crc32c 2983 0 crc_itu_t 1715 0 Fri Aug 12 20:50:19 UTC 2011 uptime: 0.56 0.20 verbose daemon enabled linux commmand line: panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=rxvt Failed to connect to virtio-serial channel. This is a fatal error and the appliance will now exit. Usually this error is caused by either QEMU or the appliance kernel not supporting the vmchannel method that the libguestfs library chose to use. Please run 'libguestfs-test-tool' and provide the complete, unedited output to the libguestfs developers, either in a bug report or on the libguestfs redhat com mailing list. /dev/virtio-ports/org.libguestfs.channel.0: No such file or directory [ 0.630463] md: stopping all md devices. [ 1.730332] Restarting system. [ 1.730623] machine restart libguestfs: error: unexpected end of file when reading from daemon. See earlier debug messages. Or you can run 'libguestfs-test-tool' and post the complete output into a bug report or message to the libguestfs mailing list. libguestfs: child_cleanup: 0x18e5410: child process died libguestfs-test-tool: failed to launch appliance libguestfs: closing guestfs handle 0x18e5410 (state 0)
Rich.
-- 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. http://et.redhat.com/~rjones/virt-df/
BTW, our distribution engineers have suggesting using 'apt-rdepends' instead of 'apt-cache depends'. I verified that works better on my system (that is, querying on bash returns libc6). But it doesn't actually work if I put that in febootstrap_debian.ml in place of apt-cache depends. febootstrap -v -o supermin.d --names bsdmainutils btrfs-tools cryptsetup diff e2fsprogs gfs-tools gfs2-tools grub-pc hfsplus iproute libaugeas0 linux-image nilfs-tools ntfs-3g ntfsprogs reiserfsprogs udev ufsutils util-linux vim-tiny xz-utils zfs-fuse acl attr bash libc6 binutils coreutils cpio dosfstools file findutils gawk grep gzip jfsutils lsof lvm2 module-init-tools net-tools parted procps scrub strace tar zerofree --exclude ^perl --exclude ^python --exclude ^plymouth --exclude ^linux-firmware --exclude ^kbd-misc --exclude ^file-rc ... No candidate version found for debconf-2.0 No candidate version found for awk No candidate version found for upstart-job No candidate version found for linux-initramfs-tool No candidate version found for fileutils ... febootstrap: aptitude: error: no file was downloaded corresponding to package debconf-2.0 make: *** [stamp-supermin] Error 1 On Fri, Aug 12, 2011 at 11:46 AM, Richard W.M. Jones <rjones@redhat.com>wrote:
On Fri, Aug 12, 2011 at 11:22:01AM -0700, David Konerding wrote:
On Fri, Aug 12, 2011 at 11:03 AM, Richard W.M. Jones <rjones@redhat.com wrote:
On Fri, Aug 12, 2011 at 10:45:48AM -0700, David Konerding wrote:
I see, so you're suggesting I just manually add a package to pkgs right after
http://git.annexia.org/?p=febootstrap.git;a=blob;f=febootstrap_debian.ml;h=4...
Yup, something like:
let pkgs = pkgs @ [ "libc6" ] in
Thanks for all the help. I can confirm that shoehorning libc6 in allows invoking init. The next step is /bin/sh failing to run because libncurses.so.5 can't be loaded.
Another thing to do would be to modify the grep command here:
http://git.annexia.org/?p=febootstrap.git;a=blob;f=febootstrap_debian.ml;h=4...
in order to make it include all the Depends and Pre-Depends packages (assuming that ncurses is amongst those).
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
On Fri, Aug 12, 2011 at 01:16:44PM -0700, David Konerding wrote:
BTW, our distribution engineers have suggesting using 'apt-rdepends' instead of 'apt-cache depends'. I verified that works better on my system (that is, querying on bash returns libc6). But it doesn't actually work if I put that in febootstrap_debian.ml in place of apt-cache depends.
febootstrap -v -o supermin.d --names bsdmainutils btrfs-tools cryptsetup diff e2fsprogs gfs-tools gfs2-tools grub-pc hfsplus iproute libaugeas0 linux-image nilfs-tools ntfs-3g ntfsprogs reiserfsprogs udev ufsutils util-linux vim-tiny xz-utils zfs-fuse acl attr bash libc6 binutils coreutils cpio dosfstools file findutils gawk grep gzip jfsutils lsof lvm2 module-init-tools net-tools parted procps scrub strace tar zerofree --exclude ^perl --exclude ^python --exclude ^plymouth --exclude ^linux-firmware --exclude ^kbd-misc --exclude ^file-rc ... No candidate version found for debconf-2.0 No candidate version found for awk
... because eg: $ aptitude download awk No candidate version found for awk I just downloaded and had a look at apt-rdepends, and I'm a bit confused by its output. It doesn't appear to resolve meta-packages at all, which would explain the above error, because awk is a meta-package implemented by (eg) original-awk or gawk. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
David, 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: http://git.annexia.org/?p=febootstrap.git;a=commitdiff;h=e4c7daf8bcdcf094719... http://git.annexia.org/?p=febootstrap.git;a=commitdiff;h=72101b100aa33b0b987... http://git.annexia.org/?p=febootstrap.git;a=commitdiff;h=3ac623701e5fe5ce94b... 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: http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=5b012024c49672cc6963... 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 oneiric: - 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. Rich. -- 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. http://et.redhat.com/~rjones/virt-df/
https://rwmj.wordpress.com/2011/09/01/libguestfs-packages-for-ubuntu-10-04lt... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v
On Thu, Sep 1, 2011 at 5:21 AM, Richard W.M. Jones <rjones@redhat.com>wrote:
David,
Better late than never ... I have fixed all the problems with the Ubuntu 10.04 LTS build, and libguestfs works and passes the testsuite.
Great!
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:
http://git.annexia.org/?p=febootstrap.git;a=commitdiff;h=e4c7daf8bcdcf094719...
http://git.annexia.org/?p=febootstrap.git;a=commitdiff;h=72101b100aa33b0b987...
http://git.annexia.org/?p=febootstrap.git;a=commitdiff;h=3ac623701e5fe5ce94b...
Thanks.
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:
http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=5b012024c49672cc6963...
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 oneiric:
- 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.
Thanks. unfortunately, I can't (by security policy) install unapproved packages on my system (even if they are backported). I did build hivex and qemu-kvm from scratch on my machine previously. If I want to go forward with testing this, should I just go to your git HEAD and live there? Dave
Rich.
-- 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. http://et.redhat.com/~rjones/virt-df/
On Thu, Sep 01, 2011 at 02:32:30PM -0700, David Konerding wrote:
Thanks. unfortunately, I can't (by security policy) install unapproved packages on my system (even if they are backported). I did build hivex and qemu-kvm from scratch on my machine previously.
It's possible (but a pain) to do all of this in your local directory. You don't really need hivex. If you don't have it then Windows guest inspection features will be disabled. You can run febootstrap from a locally compiled git copy. You just have to add two extra paths to $PATH before compiling libguestfs: PATH=/path/to/febootstrap/src:/path/to/febootstrap/helper:$PATH export PATH (Note the path changed slightly in febootstrap >= 3.10) Qemu is very easy to compile from upstream git. You can run qemu from a locally compiled git copy. You need to write a tiny shell script wrapper, and set an environment variable, see: http://libguestfs.org/guestfs.3.html#qemu_wrappers http://libguestfs.org/guestfs.3.html#libguestfs_qemu You can download a recent Ubuntu kernel from an Ubuntu .deb (make sure it's at least >= 2.6.36). You can unpack this by hand (dpkg-deb) and set some environment variables up so that libguestfs can find it: http://libguestfs.org/febootstrap-supermin-helper.8.html#febootstrap_kernel Finally you can run libguestfs itself from the locally compiled git copy without needing to install libguestfs. Use the './run' script in the top level directory. For instructions, read the README file. http://libguestfs.org/README.txt
If I want to go forward with testing this, should I just go to your git HEAD and live there?
All the changes are in git (in febootstrap.git and libguestfs.git) except those two patches. The two extra patches you need were attached to that email, or you can get them from here: http://libguestfs.org/download/binaries/ubuntu1004-packages/ Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
participants (2)
-
David Konerding -
Richard W.M. Jones