Install VirtualBox on server without GUI

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Anubite
Posts: 3
Joined: 21. Jan 2011, 19:01
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: windows

Install VirtualBox on server without GUI

Post by Anubite »

Please help me .
Can I install VirtualBox on Ubuntu Server 10.04.1 LTS 64bit ??
When I follow this tutorial

Code: Select all

http://www.howtoforge.com/vboxheadless-running-virtual-machines-with-virtualbox-4.0-on-a-headless-ubuntu-10.10-server
Install with virtualbox-4.0 all GUI cca 580 Mb ?
I don't want install GUI only for virtualbox....

Has anybody a solution ?
Thanks
airvb
Posts: 10
Joined: 25. Jan 2008, 15:00

Re: Install VirtualBox on server without GUI

Post by airvb »

Even if it's in french, maybe it can help you !

http://forum.ubuntu-fr.org/viewtopic.php?id=439063
Anubite
Posts: 3
Joined: 21. Jan 2011, 19:01
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: windows

Re: Install VirtualBox on server without GUI

Post by Anubite »

airvb wrote:Even if it's in french, maybe it can help you !

http://forum.ubuntu-fr.org/viewtopic.php?id=439063
This tutorial describe : create and run vm machine on CLI .
I need tutorial when desctibe install virtualbox on server without gui.

Thanks
williamx
Posts: 27
Joined: 18. Dec 2010, 05:58
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 10.10

Re: Install VirtualBox on server without GUI

Post by williamx »

OK I done a similar setup some weeks ago. In my case I used Ubuntu server 10.10LTS 32bit but it should work also with 64bit.

I used a second PC to do all the setup remotely. when installing the server I also installed OpenSSH on it so i can access the server from my second computer with an SSH client (i used putty). However you can do all the setup at the tty1-6 of the server locally.

First you need to install some dependencies

dkms
build-essential
linux-headers-"yourversion here" (to know your version type "uname -r")

in my case it is 2.6.35-22-generic

Code: Select all

uname -r
2.6.35-22-generic
To install dependencies

Code: Select all

sudo apt-get install dkms build-essential linux-headers-2.6.35-22-generic
Now from my second computer I open my web browser, went to virtualbox.org, click on downloads, linux, and right click on the one corresponding to my linux (in my case is Ubuntu 10.10 maverik i386) and copy the link. Now open putty, ssh to the server, authenticate. Now type wget space and paste the link previously copied, hit enter.

Code: Select all

wget http://download.virtualbox.org/virtualbox/4.0.0/virtualbox-4.0_4.0.0-69151~Ubuntu~maverick_i386.deb 
Now install virtualbox 4.0.0

Code: Select all

sudo dpkg -i virtualbox-4.0_4.0.0-69151~Ubuntu~maverick_i386.deb
if it ask for some dependencies do the following: (perryg was helping me to complete my setup and he recommend me to use the "--nox11" when installing virtualbox but I didn't have that right so I installed all the dependencies and it works)
If you know how to put --nox11 good luck if not the do the following, this will install some X packages but they will be ignored.

Code: Select all

sudo apt-get -f install
edited :: When you run "sudo apt-get -f install" it should install the dependencies and then virtualbox setup, If the VBox setup does not Start.
Then run the installation again.

Code: Select all

sudo dpkg -i virtualbox-4.0_4.0.0-69151~Ubuntu~maverick_i386.deb
After that you have Virtualbox headless installed but you need to add the Extension Pack in order to have vrde and usb support.

First download the Extension Pack

Code: Select all

wget http://download.virtualbox.org/virtualbox/4.0.2/Oracle_VM_VirtualBox_Extension_Pack-4.0.2-69518.vbox-extpack
(note that this link is for the 4.0.2 and I installed the 4.0.0, this is only informational you should change all of the command according with your linux version and VirtualBox version that you want to install. So if you install Vbox 4.0.0 you should install ExtcPack 4.0.0 or if you install VBox 4.0.2 you should install ExtcPack 4.0.2).

to install it type: VBoxManage extpack install "the name of the extension Pack file"
for example

Code: Select all

VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.0.2-69518.vbox-extpack
Now yo can create configure and add vrde capabilities to your VMs.

Hope this helps.
If you aren't in the path to become who you want to be, Then you are in the path to become who you don't want to be!!!
Anubite
Posts: 3
Joined: 21. Jan 2011, 19:01
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: windows

Re: Install VirtualBox on server without GUI

Post by Anubite »

RE : williamx

Thanks for tutorial. This solved my problem !!!!!! :P

It`s work wery well .

p.s. : switch --nox11 where I use it?
williamx
Posts: 27
Joined: 18. Dec 2010, 05:58
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 10.10

Re: Install VirtualBox on server without GUI

Post by williamx »

The --nox11 switch was a recommendation that the moderators give my to avoid the installation of the X package but I never find the way to put it so don't worrie about it, anyways I think that that switch is deprecated.
If you aren't in the path to become who you want to be, Then you are in the path to become who you don't want to be!!!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Install VirtualBox on server without GUI

Post by Perryg »

It's not deprecated. Run the install with --help after to see the CLI switches.
--nox11 tells the installer to not spawn xterm. You still get visual errors but the install should finish and work without the need to install X server and its dependencies. The pre-compiled version of VirtualBox is built with all of the bells and whistles and since servers don't usually have all of these services it makes it a little harder.

You can actually build your own version of VirtualBox without any of the dependencies. I have several tutorials here Building VirtualBox and am working on a build for servers now. This should be up by next week.
williamx
Posts: 27
Joined: 18. Dec 2010, 05:58
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 10.10

Re: Install VirtualBox on server without GUI

Post by williamx »

Thanks for you explanation perryg, I see it is not deprecated then I just didn't find how to place it on the installation command. I will try to build my own VBox on my next education project, I will let you know how it goes.
If you aren't in the path to become who you want to be, Then you are in the path to become who you don't want to be!!!
dimitris
Posts: 5
Joined: 19. May 2010, 17:53
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: WinXP, Ubuntu

Re: Install VirtualBox on server without GUI

Post by dimitris »

Perryg wrote:working on a build for servers now. This should be up by next week.
Please excuse the perhaps dumb question: Do you mean that there will be packages available at, for example, the "standard" debian-oriented repositories on download.virtualbox.org for headless installs?

After I updated my Ubuntu server's sources.list and ran aptitude update, I tried to upgrade from 3.2.12 to 4.0.2. In addition to removing 3.2.12 as expected, aptitude wants to install 180 new, mostly UI, packages. 'aptitude show' lists identical dependencies for 3.2.12 and 4.0.2. Did the dependencies on 4.0.2 and 3.2.12 debian packages change with the move from non-free to contrib (for debian-based distributions)?

I'm asking this because I don't remember doing anything special to avoid pulling in UI dependencies when installing 3.x on that server.

Thanks

D.
dimitris
Posts: 5
Joined: 19. May 2010, 17:53
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: WinXP, Ubuntu

Re: Install VirtualBox on server without GUI

Post by dimitris »

dimitris wrote:After I updated my Ubuntu server's sources.list and ran aptitude update, I tried to upgrade from 3.2.12 to 4.0.2. In addition to removing 3.2.12 as expected, aptitude wants to install 180 new, mostly UI, packages.
Well, I now know this was a dumb question. I just rediscovered aptitude's -R switch (do not treat recommends as dependencies):

Code: Select all

d@greebo:~$ sudo aptitude -R install virtualbox-4.0 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
The following NEW packages will be installed:
  virtualbox-4.0 
The following packages will be REMOVED:
  virtualbox-3.2{a} 
The following packages are RECOMMENDED but will NOT be installed:
  epdfview evince gv libpulse0 libsdl-ttf2.0-0 okular viewpdf.app xpdf-reader xpdf-utils 
0 packages upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Need to get 57.9MB of archives. After unpacking 13.9MB will be used.
Sorry about the noise.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Install VirtualBox on server without GUI

Post by Perryg »

Nope. I create these builds and put up instructions so you can actually build your own.
It's a fairly easy task and you get what you want. Only thing that you need to remember is while you do not need X to be able to use VirtualBox headless, you need some x common libraries to be able to support a guest that does have X or some other type of desktop.

I have managed to create the build but it takes a lot of tweaking to get the amount of depends just right, so it may be a while longer.
biggbuoy
Posts: 1
Joined: 20. Nov 2012, 10:19

Re: Install VirtualBox on server without GUI

Post by biggbuoy »

After reading the above post I am about to embark on the journey... I have a question though... how will I access the virtual machines when I have installed them? If say for example I have installed Windows 7 on a virtualmachine, how do I access it from my sever? I would presume I need some sort of remote desktop solution? Look forward to the replies,

Regards,

Biggbuoy.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Install VirtualBox on server without GUI

Post by Perryg »

Since all servers have no desktop (x11). You run the guests headless and access them via RDP/vRDP, VNC, SSH, Etc.
Post Reply