This page details the ongoing effort of porting VirtualBox to FreeBSD. If you would like to help please have a look at the VirtualBox ToDo.

Want to help testing latest VirtualBox versions? You can find a description of how to use the development repository at Redports Currently Offline.

There is also a chapter about VirtualBox on FreeBSD in the Handbook.


The following individuals are reachable on IRC #freebsd-vbox or Mailinglist freebsd-emulation (at)

Installing VirtualBox

VirtualBox is already quite stable on FreeBSD but it is a complex piece of software so you should regularly update to the latest patch release.

Update your ports tree:

# portsnap fetch update

Build and install virtualbox:

# cd /usr/ports/emulators/virtualbox-ose && make install clean

Load the virtualbox kernel module via /boot/loader.conf:


If you are using the kernel modules for bridged or host-only networking add this to /etc/rc.conf and reboot the machine afterwards:


Add all users that need virtualbox to the vboxusers group:

# pw groupmod vboxusers -m yourusername

USB support

Your users need to be in the operator group and need read and write permissions to the USB device.

# pw groupmod operator -m jerry

Add the following to /etc/devfs.rules (create if it doesn't exist):

add path 'usb/*' mode 0660 group operator

To load these new rule add the following to /etc/rc.conf:


Then restart devfs to load the new rules:

# /etc/rc.d/devfs restart

Now you can enable USB for the guest and should be able to see the USB devices in the VirtualBox preferences.

Host DVD/CD access

atapicam kernel module needs to be loaded via /boot/loader.conf:


HAL has to run at the moment so enable it in /etc/rc.conf and start it if not yet done:


# /usr/local/etc/rc.d/hald start

Your account needs permissions to access /dev/xpt0, /dev/cdN and /dev/passN so add this to /etc/devfs.conf:

perm cd0 0660
perm xpt0 0660
perm pass0 0660 

Installing Guest Additions for FreeBSD guests

For FreeBSD guests within VirtualBox please install emulators/virtualbox-ose-additions in the FreeBSD guest.

They provide support for:

Install virtualbox-ose-additions in the FreeBSD guest:

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

Add this to /etc/rc.conf in the FreeBSD guest:


If you want to use ntpd(8) or ntpdate(8) for some reason then you should disable host time synchronization:


The vboxvideo_drv should be recognized by Xorg -configure. If not, use something like this in your xorg.conf for the video card:

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"

To use vboxmouse_drv please adjust the mouse section in your xorg.conf like this:

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

HAL users should create this in /usr/local/etc/hal/fdi/policy/90-vboxguest.fdi or copy it from /usr/local/share/hal/fdi/policy/10osvendor/90-vboxguest.fdi:

<?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 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 if you need
     additional information or have any questions.
<deviceinfo version="0.2">
    <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>


VirtualBox (last edited 2016-01-25 17:25:12 by LiWenHsu)