Ryan Worsley
2006-Dec-11 14:43 UTC
[Xen-users] how to fix problems with ioemu, tap, windows and qemu.
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@lists.xensource.com http://lists.xensource.com/xen-users
Henning Sprang
2006-Dec-12 12:20 UTC
Re: [Xen-users] how to fix problems with ioemu, tap, windows and qemu.
On 12/11/06, Ryan Worsley <R.C.Worsley@sussex.ac.uk> wrote:> [...] > Could not initialize device ''tap''RHEL might require some very special tweaks, but I didn''t have to touch the tap devices manually as of yet. How does youe vm config file lool like? Henning _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ryan Worsley
2006-Dec-12 14:27 UTC
Re: [Xen-users] how to fix problems with ioemu, tap, windows and qemu.
Henning Sprang wrote:> On 12/11/06, Ryan Worsley <R.C.Worsley@sussex.ac.uk> wrote: >> [...] >> Could not initialize device ''tap'' > > RHEL might require some very special tweaks, but I didn''t have to > touch the tap devices manually as of yet. > > How does youe vm config file lool like? > > HenningHey Henning, It looks like this; import os, re arch = os.uname()[4] if re.search(''64'', arch): arch_libdir = ''lib64'' else: arch_libdir = ''lib'' kernel = "/usr/lib/xen/boot/hvmloader" builder=''hvm'' memory = 512 name = "xp" vif = [ ''type=ioemu, mac=00:16:3e:00:10:01, ip=10.0.0.2'' ] disk = [ ''phy:/dev/sys_vg/windows_os,ioemu:hda,w'', ''phy:/dev/hda,hdc:cdrom,r'' ] device_model = ''/usr/lib64/xen/bin/qemu-dm'' cdrom=''/var/scratch/windows_xp_corp.iso'' boot="c" sdl=1 vnc=0 vncviewer=0 ne2000=0 As this is for my windows xp guest, however I haven''t actually gotten the network working yet! All the best, Ryan. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users