VirtualBox Guest Additions

According to https://www.freebsd.org/doc/handbook/virtualization-guest-virtualbox-guest-additions.html,

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

But this results in an error:

===>  virtualbox-ose-additions-4.3.30 requires kernel source files in /usr/src.
*** Error code 1

Stop.
make: stopped in /usr/ports/emulators/virtualbox-ose-additions

Instead:

# pkg install emulators/virtualbox-ose-additions
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 65 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        virtualbox-ose-additions: 4.3.38
        libXcursor: 1.1.14_3
        xproto: 7.0.28
        libXrender: 0.9.9
        renderproto: 0.11.1
        libX11: 1.6.3,1
        libXdmcp: 1.1.2
        libxcb: 1.11.1
        libpthread-stubs: 0.3_6
        libXau: 1.0.8_3
        kbproto: 1.0.7
        libXfixes: 5.0.1_3
        fixesproto: 5.0
        libXrandr: 1.5.0
        randrproto: 1.5.0
        libXext: 1.3.3_1,1
        xextproto: 7.3.0
        libXmu: 1.1.2_3,1
        libXt: 1.1.5,1
        libSM: 1.2.2_3,1
        libICE: 1.0.9_1,1
        xorg-server: 1.17.4,1
        font-util: 1.3.1
        libepoxy: 1.3.1
        libglesv2: 11.2.2
        expat: 2.1.1_2
        libXdamage: 1.1.4_3
        damageproto: 1.2.1
        libglapi: 11.2.2
        libdevq: 0.0.2_1
        libxshmfence: 1.2
        libXvMC: 1.0.9
        libXv: 1.0.10_3,1
        videoproto: 2.3.2
        libdrm: 2.4.66,1
        libpciaccess: 0.13.4
        pciids: 20160621
        libEGL: 11.2.2
        gbm: 11.2.2
        llvm37: 3.7.1_2
        python27: 2.7.12
        libffi: 3.2.1
        libedit: 3.1.20150325_2,1
        libXfont: 1.5.1,2
        fontsproto: 2.1.3,1
        freetype2: 2.6.3
        libfontenc: 1.1.3
        libXxf86misc: 1.0.3_3
        libXinerama: 1.1.3_3,1
        xineramaproto: 1.2.1
        libXxf86vm: 1.1.4_1
        xf86vidmodeproto: 2.3.1
        pixman: 0.34.0
        xkbcomp: 1.3.1
        libxkbfile: 1.0.9
        dri: 11.2.2,2
        libXaw: 1.0.13,2
        libXpm: 3.5.11_4
        printproto: 1.0.5
        libXp: 1.0.3,1
        libGL: 11.2.2
        dri2proto: 2.8
        xkeyboard-config: 2.17
        libxkbui: 1.0.2_4

Number of packages to be installed: 65

The process will require 298 MiB more space.
54 MiB to be downloaded.

... accept, installs bunch of stuff

Message from python27-2.7.12:
===========================================================================

Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:

bsddb           databases/py-bsddb
gdbm            databases/py-gdbm
sqlite3         databases/py-sqlite3
tkinter         x11-toolkits/py-tkinter

===========================================================================
Message from virtualbox-ose-additions-4.3.38:
=============================================================================

VirtualBox Guest Additions were installed.


You need to enable the vboxguest startscript to load the kernel module and
vboxservice to use host time synchronization.

vboxguest_enable="YES"
vboxservice_enable="YES"

You also have to add all X11 users that want to use any of the additional
features (clipboard sharing, window scaling) to the wheel group.

% pw groupmod wheel -m jerry

Reboot the machine to load the needed kernel modules.

For detailed informations please visit http://wiki.freebsd.org/VirtualBox

=============================================================================

Add two lines to /etc/rc.conf:

vboxguest_enable="YES"
vboxservice_enable="YES"