Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Aug 2009 16:48:50 +0200
From:      Fredrik Lindberg <fli@shapeshifter.se>
To:        freebsd-emulation@freebsd.org
Subject:   VirtualBox bridged adapter (vboxnetflt)
Message-ID:  <4A8EB3D2.7010109@shapeshifter.se>

next in thread | raw e-mail | index | archive | help
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



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