From owner-freebsd-emulation@FreeBSD.ORG Thu Aug 20 20:19:38 2009 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 34E1C106564A for ; Thu, 20 Aug 2009 20:19:38 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (mail.farley.org [IPv6:2001:470:1f0f:20:2::11]) by mx1.freebsd.org (Postfix) with ESMTP id D65808FC60 for ; Thu, 20 Aug 2009 20:19:37 +0000 (UTC) Received: from thor.farley.org (HPooka@thor.farley.org [IPv6:2001:470:1f0f:20:1::5]) by mail.farley.org (8.14.3/8.14.3) with ESMTP id n7KKJatG070836; Thu, 20 Aug 2009 15:19:36 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Thu, 20 Aug 2009 15:19:36 -0500 (CDT) From: "Sean C. Farley" To: Juergen Lock In-Reply-To: <20090819185448.GA8386@triton8.kn-bremen.de> Message-ID: References: <20090819185448.GA8386@triton8.kn-bremen.de> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail.farley.org Cc: vbox-dev@virtualbox.org, freebsd-emulation@FreeBSD.org Subject: Re: tuntap hacks for FreeBSD vbox hosts (bandaid till vbox-net driver...) 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: Thu, 20 Aug 2009 20:19:38 -0000 On Wed, 19 Aug 2009, Juergen Lock wrote: > Hi! > > After inquiring on the #vbox-dev channel whether the tuntap code could > be resurrected for hosts that don't have vbox net/bridge drivers yet > (like FreeBSD :) I now got it working - except the config gui and > ifup/down scripts, the code for at least the latter seems to have been > ripped out for good indeed... So for now you have to use VBoxManage > something like this, > VBoxManage modifyvm --nic1 bridged --bridgeadapter1 tap0 > and manually configure your tap interface and (optionally) add it to a > bridge before the VM starts. If you already have setup your host > system to use tuntap networking with qemu you probably can just > chown/chmod /dev/tap0 (or whichever one you use) to 660 root:vboxusers > and then run your /usr/local/etc/qemu-ifup script with the same tap > interface as arg, otherwise do something like... > kldload if_tap if_bridge > sysctl net.link.tap.user_open=1 > chown root:vboxusers /dev/tap0 > chmod 660 /dev/tap0 > ifconfig bridge0 create > ifconfig bridge0 addm > ifconfig tap0 netmask > ifconfig bridge0 addm tap0 > and then start the guest. (You'll have to rerun the `ifconfig tap0 > ...' each time before you start the guest again.) Thank you! I had started looking at the code to try to figure out why I could not force the use of a tap device via VBoxManage. This patch works for me with FreeBSD 7-STABLE. BTW, you should not need the ifconfig tap0 line above since the VM is getting or setting its own IP. Is there a reason to do it? If you want it to have it look even more authenticate, you can always rename the tap device to vboxnet0 with ifconfig. :) Sean -- scf@FreeBSD.org