This page details the ongoing effort of porting VirtualBox to FreeBSD.

VirtualBox has been committed to the FreeBSD portstree. There is also a chapter about VirtualBox on FreeBSD in the Handbook.


Contact

The following individuals are reachable on #fbsd-mentors, irc.unixfreunde.de, or Mailinglist freebsd-emulation(at)FreeBSD.org


Update VirtualBox to 3.1.2

Port renaming:

How to upgrade:

 # portsnap fetch update

 # cd  /usr/ports/emulators/virtualbox-ose-kmod && make
 # cd ../virtualbox-ose && make

 # pkg_delete virtualbox-\*

 # cd ../virtualbox-ose-kmod && make install clean
 # cd ../virtualbox-ose && make install clean

Virtualbox 3.1.2 no longer requires procfs. If no other program requires /proc mounted you could remove /proc from /etc/fstab.

Please load the virtualbox kernel module via /boot/loader.conf:

vboxdrv_load="YES"

If you are using the kernel modules for bridged or host-only networking remove vboxnetflt or vboxnetadp entries from /boot/loader.conf and add this to /etc/rc.conf and reboot the machine afterwards:

vboxnet_enable="YES"

Guest Additions for FreeBSD guests:

 # portsnap fetch update
 # cd /usr/ports/emulators/virtualbox-ose-additions && make install clean

vboxguest_enable="YES"

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        Identifier  "Card0"
        Driver      "vboxvideo"
        VendorName  "InnoTek Systemberatung GmbH"
        BoardName   "VirtualBox Graphics Adapter"
        BusID       "PCI:0:2:0"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "vboxmouse"
EndSection

<?xml version="1.0" encoding="UTF-8"?>
<!--
# Sun VirtualBox
# Hal driver description for the vboxmouse driver
# $Id: 90-vboxguest.fdi 21412 2009-07-08 21:18:57Z vboxsync $

     Copyright (C) 2008-2009 Sun Microsystems, Inc.

     This file is part of VirtualBox Open Source Edition (OSE), as
     available from http://www.virtualbox.org. This file is free software;
     you can redistribute it and/or modify it under the terms of the GNU
     General Public License (GPL) as published by the Free Software
     Foundation, in version 2 as it comes in the "COPYING" file of the
     VirtualBox OSE distribution. VirtualBox OSE is distributed in the
     hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.

     Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
     Clara, CA 95054 USA or visit http://www.sun.com if you need
     additional information or have any questions.
-->
<deviceinfo version="0.2">
  <device>
    <match key="info.subsystem" string="pci">
      <match key="info.product" string="VirtualBox Guest Service">
        <append key="info.capabilities" type="strlist">input</append>
        <append key="info.capabilities" type="strlist">input.mouse</append>
        <merge key="input.x11_driver" type="string">vboxmouse</merge>
        <merge key="input.device" type="string">/dev/vboxguest</merge>
      </match>
    </match>
  </device>
</deviceinfo>

# VBoxClient --clipboard


Known Issues

Known Issues in previous versions of the port

If one of this problem occure, please consider updating to the latest version of the VirtualBox port:


Hints

Host DVD/CD access

Bridged Networking

# not done via loader, kernel init required first
kldload vboxnetflt vboxnetadp

vboxnet_enable="YES"

If the VM will not start up with an "Unable to create" error, unload both vboxnet modules again and reload them. There is a kernel initialization race that breaks pre-loading these modules. Loading the modules from /boot/loader.conf will usually not work.


Troubleshooting

VirtualBox (last edited 2010-02-09 21:38:30 by BeatGaetzi)