So I got a lot further building libguestfs on Ubuntu, up to the point where I can boot the appliance and run some simple commands. We need to push some patches upstream, and there are still some things in Ubuntu itself which are broken. This documents how far I've got. (1) libguestfs from git, Ubuntu 9.10, all updated to the latest versions. You will of course also need to read the README file and install the long list of dependencies, all of which are in the Ubuntu repositories. http://git.annexia.org/?p=libguestfs.git;a=summary http://libguestfs.org/README.txt (2) I'm going to post patches as follow-ups to this email, of which most/all will be required. (3) You will need debirf 0.25. I installed it from: http://gb.archive.ubuntu.com/ubuntu/pool/universe/d/debirf/ (4) This is how I'm configuring: ./autogen.sh \ --with-readline \ --with-repo=karmic \ --with-mirror=http://gb.archive.ubuntu.com/ubuntu/ \ --enable-debug-command (5) make (6) 'make check' fails during the Gnulib tests. (7) After building you can do a quick sanity check: $ ./fish/guestfish alloc /tmp/test.img 10M : run : list-devices /dev/sda If it doesn't work, add the '-v' option and post the full output here. I was able to run some basic guestfish commands, but I didn't yet test it extensively. Rich. ---------------------------------------------------------------------- $ ./fish/guestfish Welcome to guestfish, the libguestfs filesystem interactive shell for editing virtual machine filesystems. Type: 'help' for help with commands 'quit' to quit the shell><fs> alloc /tmp/test.imguse 'alloc file size' to create an image><fs> alloc /tmp/test.img 10M ><fs> runopen /dev/kvm: No such file or directory Could not initialize KVM, will disable KVM support><fs> list-devices/dev/sda><fs> help part-diskNAME part-disk - partition whole disk with a single primary partition SYNOPSIS part-disk device parttype DESCRIPTION This command is simply a combination of "part_init" followed by "part_add" to create a single primary partition covering the whole disk. "parttype" is the partition table type, usually "mbr" or "gpt", but other possible values are described in "part_init". This command is dangerous. Without careful use you can easily destroy all your data.><fs> part-disk /dev/sda mbr ><fs> mkfs ext3 /dev/sda1 ><fs> mount /dev/sda1 / ><fs> touch /hello ><fs> umount-all ><fs> list-partitions/dev/sda1><fs> sync ><fs>$ strings /tmp/test.img lost+found hello lost+found hello -- 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
Richard W.M. Jones
2009-Dec-21 15:59 UTC
[Libguestfs] [PATCH 0/5] Various fixes related to Ubuntu support
These are some experimental patches. By applying all 5 I was able to get Ubuntu to build and work (but see parent message, you still need debirf 0.25). 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, Dec 21, 2009 at 03:43:57PM +0000, Richard W.M. Jones wrote:> So I got a lot further building libguestfs on Ubuntu, up to the point > where I can boot the appliance and run some simple commands. We needVery cool! -- Guido
[I have CC'd this to some people who have asked about libguestfs on Ubuntu on the mailing list.] I made some experimental, lightly tested, unsupported packages for Ubuntu available here: http://www.annexia.org/tmp/debian/ You will need Ubuntu 9.10 & amd64. These are based on the Debian packaging[1] done by Guido Gunther and Laurent Leonard, many thanks to them: http://git.debian.org/?p=pkg-libvirt/libguestfs.git;a=summary http://wiki.debian.org/Teams/DebianLibvirtTeam The five Ubuntu patches from before are straight rebases, and you can find a few other things I changed in the sources. What is missing is libsys-virt-perl (Sys::Virt, the Perl bindings for libvirt). Since this doesn't exist on Ubuntu, you will have to supply it yourself, or install the package with a broken dependency (dpkg seems to allow this? - I was a bit surprised). Without this package, virt-inspector and a few other bits won't work. If you want help, please post on the mailing list: http://www.redhat.com/mailman/listinfo/libguestfs Rich. [1] The Debian packaging doesn't work on Debian, because of what appears to be a bug in fakeroot: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=561991 -- 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
Possibly Parallel Threads
- Re: error when compiling libguestfs on Ubuntu 9.04
- Re: error when compiling libguestfs on Ubuntu 9.04
- [PATCH x 3] Three small fixes for Debian
- Re: [PATCH] New API: part_get_part_type for showing partition type
- [PATCH 2/2] New API: part_get_part_type for showing partition type