how do i use a blob appliance the compiling from source
Hi, Since I've never succeeded to compile libguestfs from source on Gentoosince the build process of the appliance based on debootstrap fails, I'm wondering how can I tell the compilation process to use a precompiled blob appliance? Also can I use non fedora & debian but use some minimal gentoo based appliance I have? Thanks Alex
On Wed, Jan 27, 2010 at 12:14:23AM +0200, Piavlo wrote:
Since I've never succeeded to compile libguestfs from source on Gentoosince the build process of the appliance based on debootstrap fails, I'm wondering how can I tell the compilation process to use a precompiled blob appliance?
OK so I guess you've read this: http://libguestfs.org/FAQ.html#distros You want to take option (3). You will need a Fedora virtual machine in order to create the appliance. Install (eg) Fedora 12 [Note 1] or Fedora Rawhide in a virtual machine on your Gentoo system, and inside the Fedora virtual machine install libguestfs: # yum install '*guestf*' You can then use libguestfs itself to create the appliance: $ libguestfs-supermin-helper /usr/lib64/guestfs /tmp/kernel /tmp/initrd [Note 2] /tmp/kernel will be a symbolic link to the kernel which you should copy out. /tmp/initrd will be the appliance (quite a large file: usually around 100 MB). Those two files are the precompiled "blob" appliance as you call it. You can compile the rest of libguestfs, but first copy the 'kernel' file into 'appliance/vmlinuz.fedora-12.x86_64.img' and the 'initrd' file into 'appliance/initramfs.fedora-12.x86_64.img', before doing the rest of the build. I'm hoping that the build will notice that these files have already been created and not try to rebuild them, but I haven't actually tried this. You might want to read the Makefile.am's and ping me on our IRC channel for a bit more help with this.
Also can I use non fedora & debian but use some minimal gentoo based appliance I have?
Probably not. You cannot use any random appliance, since it needs to have specific software installed, and a specific /init script etc. However you can use the Fedora or Debian appliance _on_ a Gentoo host no problem (ie. option (3)). It should also be possible to (e)build a Gentoo appliance, which would definitely be the best option here! Rich. Notes ----- [1] http://fedoraproject.org/en/get-fedora [2] In libguestfs 1.0.82 we will change the command line arguments to this command slightly, see my post earlier today on this list. -- 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 Tue, Jan 26, 2010 at 11:59:34PM +0000, Richard W.M. Jones wrote:
/tmp/initrd will be the appliance (quite a large file: usually around 100 MB).
I should add that because of the way we do supermin appliances [Note 1] this initrd file is quite large. You can actually compress this file with gzip (or even bzip2??), but when you copy it into the build it must always be called: 'appliance/initramfs.fedora-12.x86_64.img' (no .gz extension). Rich. [1] http://rwmj.wordpress.com/2009/10/22/supermin-appliance-now-in-febootstrap/ We don't compress the initrd because it's an intermediate file that normally just gets passed straight to qemu. It's too slow to compress it temporarily and decompress it during the boot. -- 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://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html
Hi Richard,
You can compile the rest of libguestfs, but first copy the 'kernel' file into 'appliance/vmlinuz.fedora-12.x86_64.img' and the 'initrd' file into 'appliance/initramfs.fedora-12.x86_64.img', before doing the rest of the build.
The configure will still require for febootstrap or debootstrap, and I've no febootstrap ported to gentoo. So If configure detects debootstrap the compilation will probably look for debian appliance, so I can probably simply rename the fedora appliance/{initramfs,vmlinuz}.fedora-12.x86_64.img to whatever the debian based make will be looking for, if so to what names should i rename the fedora initramfs and vmlinuz?
I'm hoping that the build will notice that these files have already been created and not try to rebuild them, but I haven't actually tried this. You might want to read the Makefile.am's and ping me on our IRC channel for a bit more help with this.
It would be nice if there would be a configure option to tell the build process to use a specified appliance.
Also can I use non fedora & debian but use some minimal gentoo based appliance I have?
Probably not. You cannot use any random appliance, since it needs to have specific software installed, and a specific /init script etc.
How/where do i find the specific requirements of libguestfs appliance so that I could try to build a gentoo appliance meeting these requirements? Thanks Alex
However you can use the Fedora or Debian appliance _on_ a Gentoo host no problem (ie. option (3)).
It should also be possible to (e)build a Gentoo appliance, which would definitely be the best option here!
On Wed, Jan 27, 2010 at 12:24:52PM +0200, Piavlo wrote:
Hi Richard,
You can compile the rest of libguestfs, but first copy the 'kernel' file into 'appliance/vmlinuz.fedora-12.x86_64.img' and the 'initrd' file into 'appliance/initramfs.fedora-12.x86_64.img', before doing the rest of the build.
The configure will still require for febootstrap or debootstrap, and
You'll have to modify the configure.ac file so that it doesn't look for febootstrap. This is a simple change. Or we could do this:
It would be nice if there would be a configure option to tell the build process to use a specified appliance.
.. if you want to supply a patch.
How/where do i find the specific requirements of libguestfs appliance so that I could try to build a gentoo appliance meeting these requirements?
Look at appliance/packagelist[.in] 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)
-
Piavlo -
Richard W.M. Jones