From owner-freebsd-emulation@FreeBSD.ORG Sat Mar 8 22:39:27 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 035E8106566B for ; Sat, 8 Mar 2008 22:39:27 +0000 (UTC) (envelope-from per@hedeland.org) Received: from pluto.hedeland.org (1-1-1-13a.mal.sth.bostream.se [82.182.84.27]) by mx1.freebsd.org (Postfix) with ESMTP id 5488E8FC1C for ; Sat, 8 Mar 2008 22:39:26 +0000 (UTC) (envelope-from per@hedeland.org) Received: from pluto.hedeland.org (localhost [127.0.0.1]) by pluto.hedeland.org (8.13.6/8.13.1) with ESMTP id m28M5O9M061935 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 8 Mar 2008 23:05:24 +0100 (CET) (envelope-from per@pluto.hedeland.org) Received: (from per@localhost) by pluto.hedeland.org (8.13.6/8.13.1/Submit) id m28M5NTM061934; Sat, 8 Mar 2008 23:05:23 +0100 (CET) (envelope-from per) Date: Sat, 8 Mar 2008 23:05:23 +0100 (CET) From: Per Hedeland Message-Id: <200803082205.m28M5NTM061934@pluto.hedeland.org> To: ulrich@pukruppa.net In-Reply-To: <20080308054515.V19713@pukruppa.net> X-Scanned-By: MIMEDefang 2.48 on 10.1.1.1 Cc: freebsd-emulation@freebsd.org Subject: Re: Qemu: bridging on FreeBSD 7.0-STABLE X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 22:39:27 -0000 Peter Ulrich Kruppa 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