[fedora-virt] libguestfs under Debian / Ubuntu

Richard W.M. Jones rjones at redhat.com
Fri Jun 12 08:34:45 UTC 2009

On Fri, Jun 12, 2009 at 01:14:07AM +0200, Emre Erenoglu wrote:
> On Thu, Jun 11, 2009 at 10:24 PM, Daniel P. Berrange<berrange at redhat.com> wrote:
> >
> > that repo. libguestfs uses a febootstrap to install a custom Fedora 11
> > appliance which it boots within QEMU in order to access the filesystems.
> If the sole purpose of febootstrap is to install a custom F11
> appliance to boot in qemu, why don't we prepare this image beforehand,
> put it somewhere on the web, so that libguestfs can just use it
> without needing to build this appliance again in each machine with
> febootstrap or debootstrap?

We want you to be able to build everything from source.  Also it
allows you to customize the appliance by editing the script that
builds it (eg. leaving out a feature or adding other kernel modules).

In any case, febootstrap can build the appliance in under 3 minutes on
my machine, so this is hardly a problem for libguestfs.

> I read the documentation of libguestfs, but still didn't understand
> very well why we need to boot an OS within qemu for accessing guest
> file systems. Can't we just use loop devices, kpartx and lvm tools?

Because this would require root, and the point of libguestfs is that
nothing needs to be root.  'libguestfs.so' is a plain library - you
could link it to your webserver running as nobody.nobody, and it still
works.  Using loop devices has other disadvantages: it's liable to
leave temporary mounts & devices around if something fails, and it
doesn't work at all if there are conflicting VG names.

Richard Jones, Emerging Technologies, Red Hat  http://et.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

More information about the Fedora-virt mailing list