Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Mar 2008 23:05:23 +0100 (CET)
From:      Per Hedeland <per@hedeland.org>
To:        ulrich@pukruppa.net
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: Qemu: bridging on FreeBSD 7.0-STABLE
Message-ID:  <200803082205.m28M5NTM061934@pluto.hedeland.org>
In-Reply-To: <20080308054515.V19713@pukruppa.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Ulrich Kruppa <ulrich@pukruppa.net> wrote:
>
>I am afraid I need some help to set up networking for
> 	qemu-0.9.1 on FreeBSD 7.0-STABLE amd64 .

Last week I carried my qemu setup unchanged over from FreeBSD 6.2 /
qemu-0.9.0_3 to FreeBSD 7.0-RELEASE / qemu-0.9.1_1 - worked like a
charm. Most of my setup is in Scott's howto I think, though it's kind of
sprinkled about.:-)

>It seems I don't need to kldload bridge, and don't need to set 
>any sysctl variables anymore (right?).

Whether there's a change in that respect depends on where you're coming
from - there was no *need* to set sysctl variables in 6.x either, but
some of them are very useful (not the bridge ones though). My setup is a
bit more dynamic/flexible/complex than what you describe, allowing for
multiple qemu instances getting started/stopped and/or running
simultaneously - you may not want to copy it if you're only ever going
to run one instance.

>As /etc/qemu-ifup (Permissions 755) I use
>         #!bin/sh
>         ifconfig ${1} 0.0.0.0
>
>Then I try to
> 	# qemu Win2k.img -net nic -net tap
> 	/etc/qemu-ifup: could not launch network script
> 	Could not initialize device 'tap'

AFAIR, that basically means that your qemu-ifup script exited with a
non-zero exit code. I don't know why it would, but you can start by
making sure that it doesn't by putting 'exit 0' at the end. This may of
course mask an actual problem, but at least it should allow qemu to
start, so you can check if there *is* an actual problem.

I would also recommend that you do just 'ifconfig ${1} up' instead of
'ifconfig ${1} 0.0.0.0' - shouldn't be much difference, but I have some
vague memory of the all-zero address causing problems in some case, and
there's certainly nothing good that can come out of it.

>Next thing I tried was
> 	# qemu Win2k.img -net nic -net tap,fd=0
>Now qemu will start (and a lot of strange symbols are running 
>across my terminal) but I can't ping anything.

Well, you just need to copy those symbols and paste them into your
ethernet interface.:-) Seriously, I believe that command tells qemu to
use stdin/stdout for networking - don't do that. And of course, before
you can ping anything, networking must be properly set up (whether
manually or via DHCP) in the guest OS, as described in other posts.

--Per Hedeland



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