Mark's random ramblings

This is an old revision of the document!

Setting up FreeBSD in VirtualBox

There are a number of tutorials for this, including in the FreeBSD handbook. However VirtualBoxhas some fairly conservative settings by default so I'll share what I have set up.

You should have FreeBSD sources installed as a part of this process (/usr/src should be populated with the source tree and match what you have installed as a kernel). The reason for this is because virtualbox-ose-additions and virtualbox-ose-additions-kmod need to be built against the kernel source and requires the kernel module to match the version of your kernel


  1. Increase Base Memory - VirtualBox defaults to 1GB, if you have more and intend to run X or ZFS it is highly recommended to increase this to at least 4GB
  2. Processor - VirtualBox defaults to 1 CPU at 100%, and again it's recommended to increase this if possible for X or ZFS
  3. Display - it is possible to enable 3D acceleration for X. Increase Video Memory if you intend to do this
  4. Storage - VirtualBox defaults to IDE controllers, not SATA. It is safe to remove the IDE controller and (re)add the HDD and CDROM devices once you have added a SATA controller

This will help speed things up in general. You can also set a dedicated network controller if you have one available in your system, or set up bridging etc.

Setting up virtualbox-ose-additions

This assumes you wish to use X. If not, use /usr/ports/emulators/virtualbox-ose-additions-nox11

Type the following as root in to your console:

# cd /usr/ports/emulators/virtualbox-ose-additions && make config && make -DBATCH

You should see:

You'll see I have selected OpenGL and X11 as I will be using both in the virtual machine. -DBATCH means to build every dependency with the default options selected

Now hit enter. It will begin downloading the source required to build and start compiling

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International