[Pkg-xen-devel] Bug#658100: Bug#658100: xl: hangs in qemu-dm when trying to run PV domU

Witold Baryluk baryluk at smp.if.uj.edu.pl
Tue Jan 31 17:41:40 UTC 2012


On 01-31 16:51, Ian Campbell wrote:
> On Tue, 2012-01-31 at 12:32 +0100, Witold Baryluk wrote:
> > I found NetBSD user/developer had very similar problem (when using xl as TOOLSTACK,
> > just like me!) about year ago (Mar 2011).
> > 
> > http://mail-index.netbsd.org/port-xen/2011/03/31/msg006552.html
> > with some discussion, that NetBSD doesn't have gnttap implemented in kernel:
> 
> I think that is correct and I'm afraid this will prevent the use of
> either vfb or qdisk (which is what file:// becomes in the absence of
> blktap, which freebsd does not have) disk backends. Userspace PV device
> backends simply cannot work without a gnttab device.
> 
> There has been some work on xen-unstable (by Roger Pau Monet) to make
> file:// type disks use the in kernel vbd backend (which won't need vbd)
> but this is still a work in progress and won't be in 4.1. Hopefully this
> will be in in time for 4.2.
> 
> As a workaround in the meantime you can use the FreeBSD equivalent of
> losetup (vnconfig?) to manually turn your file:/path/etc into a
> phy:/dev/vndN which will use the in kernel vbd backend.
> 
> (I'm not a FreeBSD guy so I may have got some of the names above wrong)


I do not know what you are talking about. Im using Debian's Xen and
Debian/GNU Linux 3.2 kernel as dom0. The same happens with freebsd and linux
kernels as domU. Clearly I expect Linux dom0 (and domU) to support
gnttab. (btw. there is NO dom0 support in FreeBSD).


> 
> The vfb stuff cannot, AFAIK, ever work without a gnttab or equivalent
> and therefore without this kernel feature there is no chance of it
> working. I'm afraid that what's needed is for a FreeBSD kernel hacker to
> work on making this stuff work :-/

I do not think this has nothing to do with freebsd! I was trying to boot
exactly same kernel in domU as in dom0, and effect was the same. In
fact, kernel is not even started in domU, it is qemu or dom0 issue!
qemu-dm is hanging (busylooping) waiting for proper devices to appear,
but this never happens because of problem in dom0.




In fact I was able to fix my problem by simply 'modprobe xen-gntdev'.
kFreeBSD booted without problem, and started installation over serial
console. It booted installer from supplied .iso file as 'sdb' disk, it
also sees disk image as 'sda', and is installing just now! Also
Debian/Linux domU started without problem. Also gnumach (Hurd) kernel
starts!


So problem lies in not loading proper modules automatically by init scripts.
This may be xl-only problem.

I think this is because /dev/xen/gntdev file was provided by xen-evtchn
or xenfs module in previous kernels (like 2.6.32 in squeeze), but is now
in separate module (xen-gntdev).


I performed 'lsmod' after reboot, and there was NO single xen releated
module loaded, even after 'xl create ...'. So clearly something is not doing
its job. I guess, 'xl' tool should make sure proper modules are loaded,
or /etc/init.d/xen(d) should modprobe them.

I loaded xen-gntdev xen-evtchn xen-blkback xen-netback (not in this
order) manually, and now everything works.


Regards,
Witek

-- 
Witold Baryluk





More information about the Pkg-xen-devel mailing list