I am using gentoo, kernel 2.6.19-vs2.3.0.6.
I am trying to start qemu as a non-root user with the following option: qemu-system-x86_64 -net nic -net tap,script=/etc/qemu-ifup.
Unfortunately this fails.
Let me show you what I do:
- Code: Select all
kb2qzv@localhost ~ $ sudo /sbin/modprobe tun
kb2qzv@localhost ~ $ sudo tunctl -t tap0
Set 'tap0' persistent and owned by uid 0
kb2qzv@localhost ~ $ win2k-qemu
warning: could not open /dev/net/tun: no virtual network emulation
Could not initialize device 'tap'
win2k-qemu is just a script to launch qemu.
The above suggests that /dev/net/tun is either not present or the non-root user has no permission, right? OK lets do this as root:
- Code: Select all
localhost ~ # ls /dev/net/tun -l
crw------- 1 root root 10, 200 sty 29 20:08 /dev/net/tun
Well, we will now change this into:
- Code: Select all
localhost ~ # chmod 0666 /dev/net/tun -v
permissions changed `/dev/net/tun' to 0666 (rw-rw-rw-)
And now can we start qemu as a regular user?
- Code: Select all
kb2qzv@localhost ~ $ win2k-qemu
warning: could not configure /dev/net/tun: no virtual network emulation
Could not initialize device 'tap'
How am I to tackle this issue, please?
