WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] how to fix problems with ioemu, tap, windows and qemu.

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] how to fix problems with ioemu, tap, windows and qemu.
From: Ryan Worsley <R.C.Worsley@xxxxxxxxxxxx>
Date: Mon, 11 Dec 2006 14:43:32 +0000
Delivery-date: Mon, 11 Dec 2006 06:43:40 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.8 (X11/20061025)
Hey all,

I've just finished getting windows xp working properly in xen under RHELx 2.6.9-42.0.2. The primary problem I had was that the domain would be created but wouldn't get any further than that, an xm list would show the domain but the running time would not increase and the status would not be listed. This is a bad thing. Looking through the logs isn't very revealing until you look at the qemu logs (in /var/log/xen). The show the following error;

domid: 2
qemu: the number of cpus is 1
/etc/xen/qemu-ifup: could not launch network script
Could not initialize device 'tap'

Some looking around taught me that I didn't have the tap device installed, so I went and installed it. You can load it as a kernel module by doing the usual make menuconfig and going into Device drivers --> networking --> Universal TUN/TAP adapter. Once installed it can be loaded with the usual insmod or modprobe tun. That should be it, however it isn't the problem doesn't go away quite that easy. One may then notice that attempting to do

ifconfig tap0 0.0.0.0 up

which is what is done by /etc/xen/qemu-ifup will result in an error along the lines of no such device tap0. It turns out there's a UML tool called tunctl that allows you to create a tap device with something like;

tunctl -d tap0

You can then create interfaces and everything is lovely :D If you, like me, don't have this tunctl tool, then you should google for tunctl.c and its makefile. You can then create it and put it somewhere pretty like /bin.

However this still isn't the end of the story, I found that to get things to work properly I had to modify the qemu-ifup script to do the following;

/bin/tunctl -d $1
ifconfig $1 0.0.0.0 up
brctl addif $2 $1

This simply attempts to create the tap interface tap0 (normally) and then attempts to configure this. Which is all groovy.

So this is all as cool as a big tree.

Thanks and good luck to whoever might read this.  Any comments welcome.

Ryan.


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>