Installing VirtualBox for only-headless operation

Discussions related to using VirtualBox on Linux hosts.
Post Reply
jcalvetm
Posts: 1
Joined: 23. Oct 2009, 13:43
Primary OS: Debian Lenny
VBox Version: PUEL
Guest OSses: Linux

Installing VirtualBox for only-headless operation

Post by jcalvetm »

I am now currently developing a server installation project as an university course task.

My aim is trying to make minimalist installations in order to make the best of the available hardware, so I install the servers in the following way :

Host operating system : Debian Lenny
Guest operating system : whichever necessary.

First step : Debian Leny basic installation (netinstall CD) : Boot from CD - installation steps - When reaching dselect screen I leave all options unmarked : That lefts a really basic install.

Second step : As stated in VirtualBox download page for Linux Hosts, I make the needed modifications in /etc/apt/sources.list and I add the public key (see http://www.virtualbox.org/wiki/Linux_Downloads)

Third step : apt-get virtualbox-3.0

PROBLEM : VirtualBox 3.0 package dependences include (big) parts of xwindows (and KDE) system - see list at the end.

What I really need is to keep the installation as small as possible for headless operation: guest OS are to be managed through telnet, ssh or rdp. Host computer does not even have neither screen nor keyboard - I do not need graphical evironment.

Is there a way (or an alternate package) to avoid extra packages installation ?

Thanks in advance.

Jordi Calvet

PS: packages installed when running apt-get install virtualbox-3.0. Total 516 Mb

binutils ca-certificates cpp cpp-4.1 cpp-4.3 dbus dbus-x11 defoma djvulibre-desktop fam file fontconfig
fontconfig-config gcc gcc-4.1 gcc-4.1-base gcc-4.3 ghostscript gs-common gsfonts hal hal-info
hicolor-icon-theme htdig kde-icons-oxygen kdebase-runtime kdebase-runtime-bin-kde4 kdebase-runtime-data
kdebase-runtime-data-common kdelibs-bin kdelibs5 kdelibs5-data khelpcenter4 libaa1 libasound2 libasyncns0
libatk1.0-0 libatk1.0-data libaudio2 libavc1394-0 libavcodec51 libavutil49 libc6-dev libcaca0 libcairo2
libcap1 libclucene0ldbl libcroco3 libcucul0 libcups2 libcupsimage2 libcurl3 libdatrie0 libdb4.5 libdbus-1-3
libdbus-glib-1-2 libdirectfb-1.0-0 libdirectfb-extra libdjvulibre21 libdrm2 libenchant1c2a libexpat1 libfaad0
libfam0 libflac8 libfontconfig1 libfontenc1 libfreebob0 libfreetype6 libgd2-noxpm libgif4 libgl1-mesa-glx
libglib2.0-0 libglib2.0-data libglu1-mesa libgmp3c2 libgomp1 libgpm2 libgraphviz4 libgs8 libgsf-1-114
libgsf-1-common libgsm1 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libhal-storage1 libhal1 libhunspell-1.2-0
libice6 libidn11 libiec61883-0 libilmbase6 libjack0 libjasper1 libjpeg62 liblcms1 libldap-2.4-2 liblockfile1
libltdl3 liblzo2-2 libmad0 libmagic1 libmagick10 libmalaga7 libmng1 libmodplug0c2 libmpcdec3 libmpfr1ldbl
libmysqlclient15off libogg0 libokularcore1 libopenexr6 libpango1.0-0 libpango1.0-common libpaper-utils
libpaper1 libpci3 libpcre3 libphonon4 libpixman-1-0 libpng12-0 libpoppler-qt4-3 libpoppler3 libpostproc51
libpq5 libpulse0 libqca2 libqimageblitz4 libqt4-core libqt4-dbus libqt4-designer libqt4-network
libqt4-qt3support libqt4-script libqt4-sql libqt4-sql-mysql libqt4-svg libqt4-test libqt4-xml libqtcore4
libqtgui4 libraptor1 librasqal0 libraw1394-8 librdf0 librsvg2-2 libsdl-ttf2.0-0 libsdl1.2debian
libsdl1.2debian-alsa libsm6 libsmbclient libsmbios-bin libsmbios2 libsoprano4 libspectre1 libspeex1
libsplashy1 libsqlite3-0 libssh2-1 libstreamanalyzer0 libstreams0 libstrigiqtdbusclient0 libsvga1 libsysfs2
libtalloc1 libthai-data libthai0 libtheora0 libtiff4 libts-0.0-0 libvoikko1 libvorbis0a libvorbisenc2
libwavpack1 libwbclient0 libwmf0.2-7 libx86-1 libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0
libxcb-xv0 libxcomposite1 libxcursor1 libxdamage1 libxfixes3 libxfont1 libxft2 libxi6 libxine1 libxine1-bin
libxine1-console libxine1-ffmpeg libxine1-misc-plugins libxine1-plugins libxine1-x libxinerama1 libxml2
libxml2-utils libxmu6 libxrandr2 libxrender1 libxslt1.1 libxt6 libxtst6 libxv1 libxvmc1 libxxf86vm1
linux-headers-2.6-486 linux-headers-2.6.26-2-486 linux-headers-2.6.26-2-common linux-kbuild-2.6.26
linux-libc-dev lockfile-progs make mime-support myspell-en-us mysql-common okular openssl pciutils phonon
phonon-backend-xine pm-utils pmount portmap powermgmt-base psfontmgr psmisc python python-central
python-minimal python2.5 python2.5-minimal qt4-qtconfig radeontool raptor-utils redland-utils sgml-base
shared-mime-info svgalibg1 ttf-dejavu ttf-dejavu-core ttf-dejavu-extra ucf uswsusp vbetool virtualbox-3.0
x-ttcidfont-conf xfonts-encodings xfonts-utils xml-core
mscdex
Posts: 2
Joined: 6. Dec 2009, 09:56
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Many

Re: Installing VirtualBox for only-headless operation

Post by mscdex »

Did you ever find a solution to this? I'm wanting to do the same thing, but I too found it wants to pull in a bunch of GUI-related packages including KDE stuff.
mscdex
Posts: 2
Joined: 6. Dec 2009, 09:56
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Many

Re: Installing VirtualBox for only-headless operation

Post by mscdex »

I admit I hadn't tried much before I made my previous post. I did end up getting Virtualbox installed and working just fine via rdp without having to install all those X-related packages. Here's what I did (using a fresh install of Ubuntu Server 9.10 x64):
sudo apt-get install build-essential libcurl3 linux-headers-2.6.31-14-server
sudo dpkg --force-depends -i virtualbox-package-name.deb
From there, if all went well, virtualbox should now be installed and the vboxdrv kernel module should also have been built and installed. Now you can create your virtual machines using VBoxManage, etc.

The only problem now is that any time you use apt-get to install anything (after performing that second command above), it results in an error about unmet dependencies. I'm not sure of a way at the moment to remove these errors, but there may be a way to modify the virtualbox .deb package to change the dependency listing (and then re-package it back into a .deb again). That solution isn't very good though, since you'd probably have to do it with every new virtualbox release when it comes time to update?

It would be nice if Sun provided a download without these X dependencies for those of us running headless servers and virtualbox machines via rdp.

EDIT: Here's a (quick and dirty) way to get rid of the unmet dependencies afterwards:
sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.vboxorig
sudo sed 's/Depends: libc6 (>= 2.7), libcurl3 (>= 7.16.2-1), libgcc1 (>= 1:4.1.1), libgl1-mesa-glx | libgl1, libpng12-0 (>= 1.2.13-4), libpython2.6 (>= 2.6), libqt4-network (>= 4.5.1), libqt4-opengl (>= 4.5.1), libqtcore4 (>= 4.5.1), libqtgui4 (>= 4.5.1), libsdl1.2debian (>= 1.2.10-1), libssl0.9.8 (>= 0.9.8f-5), libstdc++6 (>= 4.4.0), libx11-6, libxcursor1 (>> 1.1.2), libxext6, libxml2 (>= 2.7.4), libxmu6, libxt6, zlib1g (>= 1:1.1.4), psmisc, adduser/Depends: libc6 (>= 2.7), libcurl3 (>= 7.16.2-1), libgcc1 (>= 1:4.1.1), libpng12-0 (>= 1.2.13-4), libpython2.6 (>= 2.6), libssl0.9.8 (>= 0.9.8f-5), libstdc++6 (>= 4.4.0), libxml2 (>= 2.7.4), zlib1g (>= 1:1.1.4), psmisc, adduser/' status > /var/lib/dpkg/status
Post Reply