Skip to contentSkip to conversation

Bug of Qemu when running TAP device on Windows?

Qemu-devel Tieu Ma Dau 2 participants 2 messages Aug 9, 2006

lore
Share & tools
lore
#0 lore raw

Hi all,
I ran successfully Qemu to simulate ARM system on Linux host with the following command:
./qemu-system-arm -kernel zImage.integratorCP -append "root=/dev/nfs nfsroot=192.168.7.1:/mnt/nfsqemu rw ip=192.168.7.2::192.168.7.1:255.255.255.0 " -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=./qemu-ifup The content of qemu-ifup script is:
ifconfig tap0 192.168.7.1

But my project demands me to run this ARM system on Windows host. So I modify a bit the qemu-ifup script as:
ipconfig tap0 192.168.7.1 # "ipconfig" , not "ifconfig"
And the corresponding command on Windows is:
qemu-system-arm -kernel zImage.integrator -append "root=/dev/nfs nfsroot=192. 168.7.1:/c/cygwin/openpsionfiltered=192.168.7.2::192.168.7.1:255.255.255.0" -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=./qemu-ifup

But the error I got is:
tap: Could not open 'tap0'
Could not initialize device 'tap

I found that the problem arrives when creating TAP interface on Windos. Do you have any ideas?
Best regards,
Tieu
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#1 lore raw

Hello Tieu,

       Do you think that posting same long mail several times will get you more answers than careful reading of docs/some thought? ;-)

Quoted 1 line · you

Hi all,
I ran successfully Qemu to simulate ARM system on Linux host with the following command:
./qemu-system-arm -kernel zImage.integratorCP -append "root=/dev/nfs nfsroot=192.168.7.1:/mnt/nfsqemu rw ip=192.168.7.2::192.168.7.1:255.255.255.0 " -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=./qemu-ifup The content of qemu-ifup script is:
ifconfig tap0 192.168.7.1

Quoted 1 line

But my project demands me to run this ARM system on Windows host. So I modify a bit the qemu-ifup script as:
ipconfig tap0 192.168.7.1 # "ipconfig" , not "ifconfig"

       Cool solution, but did you try to run that on your own?

Quoted 1 line

And the corresponding command on Windows is:
qemu-system-arm -kernel zImage.integrator -append "root=/dev/nfs nfsroot=192. 168.7.1:/c/cygwin/openpsionfiltered=192.168.7.2::192.168.7.1:255.255.255.0" -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=./qemu-ifup

       Ok, so QEMU under Windows is a bit unlike Linux. There, ifname is what you see in "Network connections", something long incomprehensible like "Local area network connection #N". Be especially wary of localized names. So, you better rename it to contain ASCII only. You can even rename it to "tap0". Also, Windows TAP doesn't require "script" - after all, you set connection's parameters with right-clicking on it, and it's being "upped" automagically on client start (but yes, you can leave it there; that way (assuming renaming conn to "tap0"), you can have portable startup command line ;-) ).

     I'm successfully running Linux/ARM in QEMU booting off NFS in coLinux running on the same machine. Windows XP emulates router between them ;-) : http://handhelds.org/hypermail/familiar/312/31225.html

       Here's my command line:

qemu-system-arm.exe  -L . -kernel zImage-2.6.16-qemuarm-20060525084935.bin -initrd bootstrap-image-bootchart-v0.8.4-rc3-h4000.rootfs.ext2.gz -append "root=/dev/ram0 rw init=/sbin/bootchartd ramdisk_size=16384 ip=192.168.30.2:192.168.30.1:192.168.30.1:255.255.255.0" -net nic,vlan=0 -net tap,vlan=0,ifname="TAP-qemu-arm"

--
Best regards,
 Paul                            mailto:[email protected]