[fedora-virt] [RFC/PATCH] libguestfs: build Debian based appliance

Guido Günther agx at sigxcpu.org
Tue Jun 30 10:19:33 UTC 2009


Hi Rich,
On Tue, Jun 30, 2009 at 10:01:59AM +0100, Richard W.M. Jones wrote:
> On Tue, Jun 30, 2009 at 12:18:30AM +0200, Guido Günther wrote:
> > The first once sets DIST=DEBIAN or DIST=REDHAT if using debootstrap or
> > febootstrap respectively. This allows us to set distro specific package
> > lists as discussed at Fudcon.
> 
> OK, I pushed this one as is:
> 
> http://git.et.redhat.com/?p=libguestfs.git;a=commitdiff;h=b4fade6392ccb2961f0d7e2bf45dfc2e20333aed
Thanks.

> > The second one checks for udev and uses that instead of doing everything
> > by hand. This significantly speeds up booting of the appliance since
> > each MAKEDEV call tages ages here and simplifies the code since we don't
> > need any device probing.
> 
> I modified your patch slightly to add Fedora udev support.  As you
> say, it works better than doing explicit MAKEDEVs:
> 
> http://git.et.redhat.com/?p=libguestfs.git;a=commitdiff;h=284797c1561e5e089986027d469bd16ee1a983df
Even better. Thanks.

> > The third one explicitly sets the device type of attached disk to SCSI,
> > otherwise the tests end up as hda with my version of qemu. Since future
> > versions might pick virtio by default this is probaly safer anyway.
> 
> This one is a bit of trouble.  It broke Fedora support, but I think
> was just because the sym53c8xx.ko module was missing from my
> appliance.  I'm going to try with that.
Attached patch has what I came up with to support most of QEMUs hardware
as used by the appliance.

> 
> I'm slightly doubtful about what is going on here, because the tests
> are *supposed* to deal with the case where devices are named /dev/hda
> etc.  See:
> 
> http://libguestfs.org/guestfs.3.html#block_device_naming
> 
> However your patch could be an improvement if it means that devices
> are always named /dev/sd*, even on our older versions of RHEL.
The problem here is that the "blockdev /dev/sda" call fails since sda is
missing completely with udev. Without having looked at this further I
assume that libguestfs internally expects the blockdev call to succeed
since it assumes /dev/sda is there due to static device node creation.
However if we switch to if=scsi this will work anyways.
Cheers,
 -- Guido
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-whitelist-kernel-modules-for-hardware-emulated-by-QE.patch
Type: text/x-diff
Size: 817 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-virt/attachments/20090630/f2bbdebf/attachment.bin>


More information about the Fedora-virt mailing list