Subject: qemu networking under -current
To: None <netbsd-help@netbsd.org>
From: Thierry Lacoste <th.lacoste@wanadoo.fr>
List: netbsd-help
Date: 03/17/2005 15:58:53
I built and installed qemu on netbsd-current.

I downloaded http://fabrice.bellard.free.fr/qemu/linux-test-0.5.1.tar.gz
which seems to work except for networking.
I tried about a dozen ways to run qemu, but the boot of the linux guest
invariably ends up with
   SIOCSIFADDR: No such device
   eth0: unknown interface: No such device

When I run "qemu -n script ..." where script contains 
   #!/bin/sh
   /sbin/ifconfig $1 172.20.0.1
I have
   warning: could not open /dev/tap: no virtual network emulation
just before qemu starts
When I run "qemu -user-net ..." I have no warning but no eth0
on the linux guest either.

When I run "qemu -user-net ..." with
http://www.freeoszoo.org/ftp/images/netbsd_1.6.2_20040525.tar.bz2 
"dhclient ne2" works on the guest. I can ping the host from the guest
but don't know how to do the opposite.
When I run "qemu -n script ..." I have the above warning and
"dhclient ne2" is unable to get an IP address.

I searched docs, man pages, the web (for qemu, tap, tun, etc ...).
I'm aware that I probably missed something obvious but I really
have no idea on where to go now.
It would be very kind if someone could point me to some docs
on how to provide virtual networking for qemu.

Ragards,
Thierry.