目次

FreeBSD 10.1RでVirtualBoxを使う

試した環境

手順

インストール

依存portsが多いのでpackageの方で入れた。

sudo pkg install virtualbox-ose

インストール後の設定

Message for qt4-corelib-4.8.6_5:
======================================================================

Qt 4 can be built with optional support for:
 - Common UNIX Printing System (CUPS) (enabled by default)
 - Network Audio System (NAS)
 - Qt style that renders using GTK (QGTKSTYLE)

In order to enable them, you have to add
        QT4_OPTIONS=    CUPS NAS QGTKSTYLE
to your /etc/make.conf and compile devel/qt4-corelib and
x11-toolkits/qt4-gui ports.

Attention! Whenever you change the QT4_OPTIONS both
devel/qt4-corelib and x11-toolkits/qt4-gui ports must be rebuilt!

======================================================================
Message for qt4-gui-4.8.6_5:
======================================================================

Qt paint engine makes common use of shared memory. To avoid MIT-SHM
errors (i.e., blank windows), you probably need to raise shared memory
limits in loader.conf(5). The following should be safe values for the
KDE Plasma Desktop:

kern.ipc.shmall=32768
kern.ipc.shmmni=1024
kern.ipc.shmseg=1024

======================================================================
Message for cdrtools-3.00_2:
===========================================================================

Note: The location of the cdrtools `defaults' files has been set to

        /usr/local/etc

This is the FreeBSD ports standard config file location, NOT the cdrtools
standard location, which is /etc/default.

The reason for this is that FreeBSD ports and packages should not use
configuration files outside of /usr/local.

===========================================================================
Message for sdl-1.2.15_6,2:
------------------------------------------------------------------------------
 Your SDL library has been built with libvgl support, which means that you
 can run almost any SDL application straight on your console (VESA 2.0
 compatible videocard is required).

 To do this you have to load the vesa kernel module or enable it in your
 kernel, and set environment variable "SDL_VIDEODRIVER=vgl".
------------------------------------------------------------------------------
Message for virtualbox-ose-4.3.26:
=============================================================================

VirtualBox was installed.

You need to load the vboxdrv kernel module via /boot/loader.conf:

vboxdrv_load="YES"

You also have to add all users to your vboxusers group in order to use vbox.

%25 pw groupmod vboxusers -m jerry

Reboot the machine to load the needed kernel modules.


Bridging Support:
=================

For bridged networking please add the following line to your /etc/rc.conf:

vboxnet_enable="YES"


USB Support:
============

For USB support your user needs to be in the operator group and needs read
and write permissions to the USB device.

%25 pw groupmod operator -m jerry

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

[system=10]
add path 'usb/*' mode 0660 group operator

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

devfs_system_ruleset="system"

Then restart devfs to load the new rules:

%25 /etc/rc.d/devfs restart


Troubleshooting:
================

Running VirtualBox as non-root user may fail with a fatal error
NS_ERROR_FACTORY_NOT_REGISTERED. In this case delete /tmp/.vbox-*-ipc file.

Check wiki page for known issues and troubleshooting:
http://wiki.freebsd.org/VirtualBox

Please report any problems to emulation@. Thanks!

こんな感じで諸々設定しろと言われるので設定。