Yes, it's possible.
See my post here for the basics: [url]
http://forums.virtualbox.org/viewtopic. ... 2512#52512[/url[, but the gist is, just because it pulls in a few X libraries, doesn't mean it needs the rest of X.
You
need libxml2 and libxslt for reading VBox's XML config files. Here's what happens:
Code: Select all
#Install JeOS.
apt-get update && apt-get upgrade
apt-get install wget psmisc libxslt1.1 libxml2
wget Vbox2.1.0
dpkg -i vbox2.1.0.deb
Unpacking....
"Aieee, missing dependencies, but I put the files in the right places anyway!"
From there, VBoxManage and VBoxHeadless work fine after you build and install a proper kernel module yourself. (Which requires dkms, which requires gcc, the list is long, Dirac Angestun Gesept)
It's easy enough to generate the kernel module on another box with the same kernel type & version and just copy it over to the VMHost.
I'm in the process of playing with remastersys, trying to generate just such a menace in an installable LiveCD form.
--
So basically, just apt-get install virtualbox-2.1 will pull in a bunch of QT4 library dependencies, but no actual xserver, windowmanager, or xutils.
I think it's enough to set DISPLAY=elsewhere:0 to pull the GUI up on a remote xserver at this point, but I haven't tried this myself.
(Personally, I use freenx over ssh & sftp on my headless servers, so I have the X libs and bits lying around already.)
--
Edit: here's the actual output:
Code: Select all
root@dbmail:/home/kamilion# dpkg -i virtualbox-2.1_2.1.0-41146_Ubuntu_intrepid_amd64.deb
Selecting previously deselected package virtualbox-2.1.
(Reading database ... 11217 files and directories currently installed.)
Unpacking virtualbox-2.1 (from virtualbox-2.1_2.1.0-41146_Ubuntu_intrepid_amd64.deb) ...
dpkg: dependency problems prevent configuration of virtualbox-2.1:
virtualbox-2.1 depends on libqt4-network (>= 4.4.3); however:
Package libqt4-network is not installed.
virtualbox-2.1 depends on libqtcore4 (>= 4.4.3); however:
Package libqtcore4 is not installed.
virtualbox-2.1 depends on libqtgui4 (>= 4.4.3); however:
Package libqtgui4 is not installed.
virtualbox-2.1 depends on libsdl1.2debian (>= 1.2.10-1); however:
Package libsdl1.2debian is not installed.
virtualbox-2.1 depends on libxcursor1 (>> 1.1.2); however:
Package libxcursor1 is not installed.
virtualbox-2.1 depends on libxmu6; however:
Package libxmu6 is not installed.
virtualbox-2.1 depends on libxt6; however:
Package libxt6 is not installed.
dpkg: error processing virtualbox-2.1 (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
virtualbox-2.1
root@dbmail:/home/kamilion# VBoxManage list vms
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (2.6.27-9-server) or it failed to
load. Please recompile the kernel module and install it by
sudo /etc/init.d/vboxdrv setup
You will not be able to start VMs until this problem is fixed.
VirtualBox Command Line Management Interface Version 2.1.0
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.
root@dbmail:/home/kamilion# VBoxHeadless
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (2.6.27-9-server) or it failed to
load. Please recompile the kernel module and install it by
sudo /etc/init.d/vboxdrv setup
You will not be able to start VMs until this problem is fixed.
VBoxHeadless: Error -1908 in suplibOsInit!
VBoxHeadless: VERR_VM_DRIVER_NOT_INSTALLED
VBoxHeadless: Tip! Make sure the kernel module is loaded. It may also help to reinstall VirtualBox.
root@dbmail:/home/kamilion#