From owner-freebsd-emulation@FreeBSD.ORG Fri Aug 21 14:48:55 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 6F07C1065694 for ; Fri, 21 Aug 2009 14:48:55 +0000 (UTC) (envelope-from fli@shapeshifter.se) Received: from mx1.h3q.net (mx1.h3q.net [IPv6:2001:16d8:ffe5:1::f1]) by mx1.freebsd.org (Postfix) with ESMTP id 373498FC60 for ; Fri, 21 Aug 2009 14:48:55 +0000 (UTC) Received: from smtp-auth.h3q.net (smtp-auth.h3q.net [127.0.0.1]) (Authenticated sender: hidden) by mx1.h3q.net (Postfix) with ESMTPSA id 5040933CB7 for ; Fri, 21 Aug 2009 16:48:53 +0200 (CEST) Message-ID: <4A8EB3D2.7010109@shapeshifter.se> Date: Fri, 21 Aug 2009 16:48:50 +0200 From: Fredrik Lindberg User-Agent: Thunderbird 2.0.0.22 (X11/20090801) MIME-Version: 1.0 To: freebsd-emulation@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: VirtualBox bridged adapter (vboxnetflt) 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: Fri, 21 Aug 2009 14:48:55 -0000 Hi I've started working on the missing bits of the FreeBSD network implementation in VirtualBox. I now have a working vboxnetflt.ko driver that allows automatic bridged networking in VirtualBox (probably what most people want). This allows guests to automatically bridge with your existing network adapter providing seamless network access. Work on host-only adapter mode is in progress (this should not be confused with host-interface in previous vbox 2.x releases). The patch can be found at http://www.shapeshifter.se/pub/patches/vbox-freebsd-network.patch Additional patch for emulators/virtualbox/Makefile http://www.shapeshifter.se/pub/patches/virtualbox-Makefile.patch You'll have to rebuild VirtualBox to make it work, the following lines should do the trick. cd /usr/ports/emulators/virtualbox make clean patch mkdir work/virtualbox-3.0.51r22226/src/VBox/HostDrivers/VBoxNetFlt/freebsd patch -d work/virtualbox-3.0.51r22226 < vbox-freebsd-network.patch patch < virtualbox-Makefile.patch make install In addition to vboxdrv.ko you'll need to load vboxnetflt.ko too. kldload /boot/modules/vboxnetflt.ko In VirtualBox network settings, under "Bridged Adapter" you should now see your available network interfaces. Select the one connected to your network and boot your virtual machine. It should now be connected to your local network as any other machine. Please note that this is just the first iteration of the patch and it should by no means be considered complete. It has only been tested on FreeBSD 8/i386. Slippery when wet :) The kld is also a bit hackish at the moment regarding to how it interfaces with the network stack to avoid kernel code modifications. Fredrik