On Thu, Dec 02, 2010 at 11:15:43PM -0700, Thomas S Hatch wrote:
Hello, I am looking into porting libguestfs to Archlinux, as I
understand it
I need to add a stanza to the if/else statement in the
appliance/make.sh.into handle the image creation for ArchLinux.
But I am wondering, the image used in the binary libguestfs is much larger
than the one in the fedora libguestfs, and they appear to be packaged as
initramfs images.
In the Fedora libguestfs we use a supermin appliance, which means we
don't actually ship the whole of the appliance since it can be
(re-)constructed on the fly from files found on the host. eg. If the
appliance needs to contain /sbin/mkfs then there is no point shipping
that file separately in the appliance since we can copy the same file
from the host (and add an RPM dependency on the package to force that
file to exist).
https://rwmj.wordpress.com/2009/10/22/supermin-appliance-now-in-febootstrap/
Currently the supermin appliance is built as an ext2 disk image, but
this only exists temporarily while libguestfs is run. The initramfs
that you see in supermin.d/ is the skeleton of the appliance -- files
that we ship because they don't exist on the host at run time (mainly
configuration files, since the admin can edit these we can't use the
ones from the host).
The binaries have to contain the complete appliance (shipped currently
as an initramfs), hence the binaries are much larger and slower than
what we ship to users in Fedora.
So my question is this, should I mimic the files in the fedora
package in
the supermin.d directory? of should I mimic the binary dist. And should the
image me made to act as an initramfs with setup scripts? or just be a cpio
gzipped os root?
Building the supermin appliance is hard work. You can take a look at
the scripts that we use here:
http://git.annexia.org/?p=febootstrap.git;a=tree
http://people.redhat.com/~rjones/febootstrap/
So it's probably easier to start with an ordinary appliance that you
just "zip up" into an initramfs.
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/