Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Mar 2009 14:29:20 -0700
From:      Steve Franks <bahamasfranks@gmail.com>
To:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   qemu only talks to network on second boot
Message-ID:  <539c60b90903301429o7fcd9edfhe9c995dcb5cb8430@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Got win2k on qemu for a couple years now.  Funny thing is, it never
sees the network or the samba shares on my host the second time I
"boot" qemu on any given day.  First time always times out.  I get no
console output.  My win2k.sh file looks something like this.  All the
tap entries since my system seems to have some issue with naming tap.
Maybe that's the issue, but I'll be darned if I could fix it.  tap0
and nothing else would be just fine with me.  When I just had tap0, it
would make tap1 (then tap2, etc, etc.), but this seems always to wind
up on tap9 and work (the second time I run qemu)....

Goofy.

Best,
Steve

[steve@dynstant /usr/ports/emulators/wine]$ cat ~/bin/win2k
#!/bin/sh
sudo kldload kqemu if_tap if_bridge aio

sudo sysctl net.link.tap.user_open=1
sudo sysctl net.link.tap.devfs_cloning=1
sudo sysctl net.link.tap.up_on_open=1

sudo ifconfig bridge0 create
sudo ifconfig bridge0 addm vr0
sudo ifconfig bridge0 addm tap0
sudo ifconfig bridge0 addm tap1
sudo ifconfig bridge0 addm tap2
sudo ifconfig bridge0 addm tap3
sudo ifconfig bridge0 addm tap4
sudo ifconfig bridge0 addm tap5
sudo ifconfig bridge0 addm tap6
sudo ifconfig bridge0 addm tap7
sudo ifconfig bridge0 addm tap8
sudo ifconfig bridge0 addm tap9
sudo ifconfig bridge0 up
sudo ifconfig vr0 up
sudo ifconfig tap0 up
sudo ifconfig tap1 up
sudo ifconfig tap2 up
sudo ifconfig tap3 up
sudo ifconfig tap4 up
sudo ifconfig tap5 up
sudo ifconfig tap6 up
sudo ifconfig tap7 up
sudo ifconfig tap8 up
sudo ifconfig tap9 up
sudo dhclient bridge0

sudo /etc/rc.d/devfs restart
sudo /etc/rc.d/sysctl restart

qemu -m 384 -net nic -net tap -hda ~/bin/drivec.img -usb -usbdevice
tablet -serial /dev/cuaU0 &



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?539c60b90903301429o7fcd9edfhe9c995dcb5cb8430>