Introduction

VirtualBox is a virtual machine created by InnoTek for Windows, 32 and 64-bit GNU/Linux, and Mac OS X hosts supporting Windows (including Vista), Linux 2.x, OS/2 Warp, OpenBSD, and FreeBSD as guest systems. After several years of development, VirtualBox was released under the GNU GPL license in January 2007.

Installation

Debian

Once you’ve downloaded the version, installation is quite simple:

1
dpkg -i virtualbox*.deb

Then you’ll need the bridge utilities:

1
apt-get install bridge-utils

Solaris

Once you’ve downloaded the version, installation is quite simple:

1
2
3
gtar -xzvf virtualbox*.tgz
pkgadd -G -d VirtualBoxKern*.pkg
pkgadd -d VirtualBox-*.pkg

Configuration

Networks

Note that since version 2.1.0, it is no longer necessary to manage the network configuration as explained below, as everything is pre-configured.

Network Card Configuration

Here’s the necessary network configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo eth0 br0
iface lo inet loopback

# The primary network interface
iface eth0 inet static

iface br0 inet dhcp
bridge_ports eth0

Now let’s restart the network:

1
/etc/init.d/networking restart

Bridged Interfaces Configuration

If you want to use your VMs in bridge mode (as if they were separate computers on the network), you need to bridge your network cards. Add interfaces planned for this purpose:

1
2
3
4
VBoxAddIF vbox0 pmavro br0
VBoxAddIF vbox1 pmavro br0
VBoxAddIF vbox2 pmavro br0
VBoxAddIF vbox3 pmavro br0

Here, I’ve added 4 to have some margin.

Adding the User to the vboxusers Group

Next, add your current user to the vboxusers group.

And that’s it! Log out and log back in, and you’re all set!

FAQ

I Changed Kernel and VirtualBox No Longer Starts VMs

Simply run this command:

1
/etc/init.d/vboxdrv setup

Failed to open/create the internal network…

This small issue on Solaris can be resolved as follows:

1
2
rem_drv vboxflt
add_drv vboxflt

verr_vm_driver_not_installed

To solve this problem:

1
ln -s /devices/pseudo/vboxdrv\@0\:vboxdrv /dev/vboxdrv

Ubuntu: Virtualbox Ubuntu unable to boot please use a kernel appropriate

This is due to the default kernel of the server version which is 686. Change it to 386 and everything will work like magic.

At the end of the installation, you can chroot into your new system and install the kernel: linux-image-386.

Resources

Last updated 28 Jan 2009, 03:17 +0200. history