Installation without a GUI

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Bobthegoldfish
Posts: 7
Joined: 28. Sep 2008, 06:33

Installation without a GUI

Post by Bobthegoldfish »

Can Virtualbox be installed without having the GUI front end, using VRDP to connect to the virtual machines and command line only to administer them?

I want to install Virtualbox on a headless server (Ubuntu 8.04 Server) that does not have an X Server installed. No one will ever be using the box for anything that requires a GUI so I would rather not install one; it is currently being used as a file server. Attempting to install from the .deb shows a number of dependencies that are not satisfied, most of which seem to be for X11.

Is there a way to accomplish this?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

There are some hard dependendies to Xorg/X11. You can try to extract the deb file and install it like that. You do have to run the kernel module installer manually though.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Kamilion
Posts: 6
Joined: 13. Jul 2008, 19:36

Post by Kamilion »

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#
Bobthegoldfish
Posts: 7
Joined: 28. Sep 2008, 06:33

Post by Bobthegoldfish »

Thanks for taking the time to reply.

From the sound of it, my best bet might be to install something like XFCE and disable it after I have installed the .deb. I assume that there is some setting in a config file somewhere that I can change to not load the X11 server when it starts up.

This sounds like the best option because it will enable me to do all the GUI things easily, disk space is cheap (100mb or so is basically lost in the rounding) and I can start/stop the GUI from the command line.

Again, thanks. :D
Kamilion
Posts: 6
Joined: 13. Jul 2008, 19:36

Post by Kamilion »

Bobthegoldfish wrote:From the sound of it, my best bet might be to install something like XFCE and disable it after I have installed the .deb. I assume that there is some setting in a config file somewhere that I can change to not load the X11 server when it starts up.

This sounds like the best option because it will enable me to do all the GUI things easily, disk space is cheap (100mb or so is basically lost in the rounding) and I can start/stop the GUI from the command line.
Yeah, I use openbox or fluxbox myself as I don't need an entire desktop environment.

Best way to get a GUI imo would be

apt-get install openssh-server
(NX runs over SSH, also gets you sftp-server for filetransfer with winscp)
apt-get install openbox
(Pulls in necessary X deps)

Add Freenx from instructions here: http://alandoyle.com/2008/12/16/setup-f ... epid-ibex/. And you can use nomachine's windows nxclient out of the box by getting it from http://www.nomachine.com/.

(Freenx is a free nx-server replacement, because nomachine's is limited to only two simultaneous user connections, while freenx is unencumbered. Long story, TL;DR.)

Only one problem right now: Nomachine's vista client REALLY dislikes my Vista x64 install. Works great on Vista32 though. YMMV.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Kamilion, BTW a belated welcome to our forum. Have a browse of the Forum Posting Guide which contains some useful search tips, etc.
Kamilion wrote: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)
Actaully I just do a sudo apt-get build-essential linux-headers-$(uname- r), do the install and then remove them after and clean the cache. With a decent internet connection, this is pretty fast and leaves little debris on the HDD.

Another interesting topic is Debian headless which discusses how to tweak the deb package to remove the X dependencies. As you say the two real dependencies are on the libxml2 and libxslt packages so that VB can parse its XML files and the minimal X client packages to support QT4. Unfortunately some poorly written package dependencies can result in you pulling in the entire X server package set, which you don't need if your DISPLAY is being served by a different workstation over ssh.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Post Reply