# HOWTO: Installing VirtualBox 4 on FreeBSD 8.2



## SIFE (Apr 4, 2011)

HOWTO: Installing VirtualBox 4 on FreeBSD 8.2
VirtualBox 4 had been released few weeks ago, the major new feature that come with release is usb support in guest's, to me, this fix me the problem of installing printer on FreeBSD as I failed before,  unfortunately VirtualBox had not been yes come in ports not in testing, so the only way to get is to grab it from svn:

```
svn http://svn.bluelife.at/index.cgi/blueports 
cd  blueports/emulators/virtualbox-ose
make install clean
```
Now update your source tree, my supfile look like this:

```
*default host=cvsup5.de.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_8
*default delete use-rel-suffix
*default compress
src-all
```
Now update src tree:

```
cvsup stable-supfile
```
Build your kernel then build virtualbox kernel module's:

```
cd /usr/src
make buildkernel
make installkernel
cd /path/to/blueports/emulators/virtualbox-ose-kmod
make install clean
```
In order to use usb in guest's, you have set permission's to usb device's to be accessible by vbox user(s):

```
ee /etc/devfs.rules
[localrules=10]
add path 'usb/*' mode 0660 group operator
```
Add your user account to operator group:

```
pw groupmod -n operator -m SIFE
```
To load this rules automatically add this to /etc/rc.conf:

```
echo 'devfs_system_ruleset="system"' >> /etc/rc.conf
```
Restart /etc/rc.d/devfs to load this rules right now:

```
/etc/rc.d/devfs restart
```
Finally add vbox module to /boot/loader.conf to be loaded automatically when you start your system:

```
echo 'vbox_load=â€YESâ€' >> /boot/loader.conf
```
*Using host CD/DVD in guest:*
The following configuration works to me:

```
ee /etc/devfs.rules
add path 'acd*' mode 0660 group operator
add path 'cd*' mode 0660 group operator
add path 'usb/*' mode 0660 group operator
```
Edit /etc/devfs.conf:

```
link acd0 cd0
own acd* SIFE:wheel
perm acd* 0660
own cd* SIFE:wheel
perm cd* 0660
perm xpt* 0660
perm pass* 0660
```
Also, you have to load atapicam module, or you can add it to /boot/loader.conf:

```
echo 'atapicam_load="YES"' >> /boot/loader.conf
```


----------



## Paul-LKW (Apr 20, 2011)

Many thanks for your full details, but do you know how to make extension pack work? It seems under /usr/local/lib/virtualbox/ExtensionPacks/Oracle_VM_VirtualBox_Extension_Pack/ do not has freebsd.amd64 directory and hence not work for VRDP.


----------



## decke (Apr 25, 2011)

Extension packs are tar archives with binary blobs and the one from Oracle does not support FreeBSD. So this is not a problem that the port can solve.


----------



## decke (Apr 26, 2011)

SIFE said:
			
		

> ```
> svn http://svn.bluelife.at/index.cgi/blueports
> ```



That is wrong and should be:

```
svn co https://svn.bluelife.at/projects/blueports/
```


----------



## SIFE (Apr 29, 2011)

@decke If I am not wrong, 
	
	



```
svn so
```
 is the some 
	
	



```
svn
```
, using *HTTP* or *HTTPS* to fetch files is not difference since there is no password to sent in our case(my opinion).


----------



## decke (Apr 29, 2011)

That's not relevant but /index.cgi is the SVN::Web Perl Webinterface and /projects the WebDAV root for subversion.


----------



## olegrpg (Apr 29, 2011)

Mayby need to change the sequence install:
1. install blueports/emulators/virtualbox-ose-kmod, because by default install old version from /usr/ports 
2. install blueports/emulators/virtualbox-ose


----------

