Saturday, July 2, 2011

VBoxHeadless - Running Virtual Machines With VirtualBox 4.0 On A Headless Debian Squeeze Server

apt-key add -

... and update our package database:

# apt-get update

Now we bring our system up to date:

# apt-get upgrade

(It is possible that the kernel gets updated. If this is the case, reboot the system...

# reboot

... log in as the normal user again and become root:

$ su

)

Afterwards, we install VirtualBox 4.0 as follows:

# apt-get install linux-headers-$(uname -r) build-essential virtualbox-4.0 dkms

(The dkms package ensures that the VirtualBox host kernel modules are properly updated if the Linux kernel version changes.)

Starting with version 4.0, VirtualBox has introduced so called "extension packs" and has outsourced some functionality like remote desktop connection support (VRDP) that was part of VirtualBox packages before version 4.0 into these extension packs. Because we need remote desktop connections to control our virtual machines, we need to install the appropriate extension pack now. Go to http://www.virtualbox.org/wiki/Downloads, and you will find a link to the following extension pack:

VirtualBox 4.0.6 Oracle VM VirtualBox Extension Pack
Support for USB 2.0 devices, VirtualBox RDP and PXE boot for Intel cards.

Download and install the extension pack as follows:

# cd /tmp
# wget http://download.virtualbox.org/virtualbox/4.0.6/Oracle_VM_VirtualBox_Extension_Pack-4.0.6-71344.vbox-extpack
# VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.0.6-71344.vbox-extpack

(Make sure you grab the latest version from the VirtualBox web site.)

(Make sure you run the last command with root privileges - # VBoxManage extpack install ... - because otherwise you will get an error like this:

administrator

View the Original article