Page 1 of 2

Which Linux disto for hosting VirtualBox

Posted: 8. Dec 2008, 17:27
by NickC
Hi All,

Any suggestions which Linux flavour is best for a minimal install for Hosting VirtualBox only?

The idea is them to run various Windows VMs within this, and in the future to also experiment with various flavours of Linux hosted within this environmenmt.

One thing I guess I should point out is that I am a Linux newby, never installed it before, been working in the Windows environment for the last fifteen years.

Your opinions would be appreciated.

Cheers,
Nick

Posted: 8. Dec 2008, 18:11
by TerryE
If you are a Linux newbie then I would start with one of the standard Distros. If you are unfamiliar with console based administration, then I would avoid server distros to begin with as the learning curve will be greater. IMHO Ubuntu is the best compromise of cleanness and user-friendliness.

Unlike Vista etc, Ubuntu does not introduce a heavy install, memory or HDD burden.

Posted: 14. Dec 2008, 20:02
by NickC
Hi Terry,

I had a few problems with nVidea hardware support but have now finally got Ubuntu 8.10 (AMD64) installed and working correctly. Next stage is obviously to install VirtualBox.

Only question is I notice that Ubuntu ships with OpenOffice and various other tools which as it is going to be used purely as a host for VirtualBox are not necessary. Is there a smaller cleaner Linux distro which would be more suitable as a VirtualBox Host only or might that introduce compatibility issues.

Nick

Posted: 14. Dec 2008, 21:00
by vbox4me2
What about de-installation, you know, to -remove- stuff.

Posted: 14. Dec 2008, 22:22
by NickC
Yep, of course. Just that I wondered if there was a minimal Ubuntu install or similar first.

Posted: 15. Dec 2008, 23:44
by Sasquatch
NickC wrote:Yep, of course. Just that I wondered if there was a minimal Ubuntu install or similar first.
There is, but you have to select that as an install option. This minimal install does not even install Xserver-xorg, so you have to install that manually too. If you want a cleaner system, use Xubuntu instead of Ubuntu. Xubuntu is shipped with Xfce instead of Gnome and uses less resources (like memory) and in Xubuntu, OpenOffice.org is not installed by default. You can use the package manager to remove any other unneeded package as you see fit. Just keep an eye on the dependencies, so you don't remove too much.

Posted: 30. Dec 2008, 22:57
by NickC
Well finally made some progress and got a basic install of Ubuntu 8.10 installed .

First problem I have encountered is that shares on other Windows machines (Win2k3) are not accessible. Machines can be seen but no shares visible within each machine.

Any ideas?

Posted: 31. Dec 2008, 01:20
by Sasquatch
You might want to install the Samba client package and the SambaFS package. With those, you can mount Windows (Samba) shares.

Posted: 31. Dec 2008, 02:56
by TerryE
That's the problem with basic installs: they don't preload the optional extras like smb file access :lol:

Posted: 31. Dec 2008, 03:24
by Kamilion
First off, what you want is the Server edition of Ubuntu 8.10.

From there, you want to install the JeOS subset.
This is the uber-minimal ubuntu machine, normally used as a minimal guest OS within a virtual machine.

You can select JeOS by hitting F4 at the cd's boot menu, and picking either of the two 'minimal' options.

That drops you into a text installer that'll get you to a install of nothing more than apt and the basic init scripts, python, perl, and the normal minimal suite of bash commands and a couple extras.

First off, You need libxml2 and libxslt for reading VBox's XML config files. These dependencies are not optional, or GUI related.

Code: Select all

apt-get update && apt-get upgrade 
apt-get install wget psmisc libxslt1.1 libxml2 
apt-get install linux-generic && apt-get purge linux-virtual linux-server
At this point, I used to switch kernels from linux-server to linux-generic. Recently it seems that my JeOS installations have decided they prefer linux-virtual over linux-server during the initial upgrade, but I just reinstall linux-generic once before I reboot the first time and everything's happy again for a host machine.

You'll want to 'apt-get install openssh-server' as well, to remotely manage the machine.

From there, you'll want to download the virtualbox deb for the installed arch, and ask the machine to install it with 'dpkg -i ./virtualbox-2.1_2.1.0-41146_Ubuntu_intrepid_amd64.deb' as root.

As root, meaning 'sudo su' and entering your user password to get a rootshell.

Do NOT set a root password, as ubuntu *disables* the password by default, which locks out the root account from being directly accessed remotely (Always a bad idea, because then it's a PITA to go and chown user.user all.the.files.I.changed) but still allows access to 'sudoers' to run commands or spawn shells. Basically, on ubuntu, the first account created by the installer will effectively be root known by a more common name, using the same concept behind Vista's UAC escalation.

Plus, it leaves an entry in the log for sudo, complete with the username who executed it, perfect for remote servers with multiple admins.

From there, you can use VBoxHeadless and VBoxManage to start and control VMs. You can use a RDP client elsewhere to connect to VM consoles directly.

Documentation for both of these is pretty extensive in the virtualbox manual.

2.1.0's advances with ease of configuring a NIC attached to a host adapter makes running a whole network of VMs easy.

I have a few servers configured as VMHosts with a configuration very similar to this running right now at work. Tacked on a couple simple init scripts to suspend and resume the VMs to disk on shutdown and startup, and now I'm just waiting for Sun to catch up with some of the other virtualization solutions with regards to live migration of VMs between hosts.

Google for JeOS ("Juice"/"JOO-se") if you need more info on it.

Good luck!

Edit:

By the way, don't install samba on the host. No, seriously. Leave that stuff up to the virtual machines.
Having openssh-server installed on the host is all you need.
Use http://WinSCP.net or Filezilla on windows to transfer files to/from the host.

But really, the point of this is to expose the smallest possible wedge of host OS as possible, therefor the only things you want running on it is sshd and vboxheadless's rdp ports.

Now, if your problem is the VMs shares don't show up, that's a relatively easy fix: Switch networking from NAT mode to Host adapter mode (2.1.0+) with VBoxManage modifyvm "Email Server" -nic1 hostif -hostifdev1 eth0

And you can optionally set a MAC by adding -macaddress1 auto or -macaddress1 EA:7D:AB:AD:BE:EF onto that modifyvm command for DHCP purposes. GPXE works great to boot VMs from HTTP!

GPXE Floppy:
http://www.rom-o-matic.net/gpxe/gpxe-gi ... &A=Get+ROM

GPXE ISO:
http://www.rom-o-matic.net/gpxe/gpxe-gi ... &A=Get+ROM

Posted: 31. Dec 2008, 04:07
by TerryE
Kamilion, I use JeOS as my distro of choice for my LAMP VMs, and I really think that it has been optimised for this role, given the tuning of the (default) -virtual kernel. You are correct in saying that there is little to prevent you using this as a VM host OS, but that you do really need to switch to the generic kernel if you choose to do so. The JeOS distro omits quit a few H/W options so you may need to do quite a lot of apt-geting. The one thing that JeOS build comes without any X subsystem, desktop manager, or the GUI based tools such as Synaptic.

This of course has an upside on memory footprint / overhead for the host OS, and in the case of JeOS, this is pretty much minimal if you can do all your system management through a console interface. However, if you don't mind sacrificing the odd Gb of HDD and 128Mb of RAM to load the GDX (or whatever), then a standard Ubuntu distro is a lot easier for the normal user / developer. With this you can always reclaim this RAM in prod by stopping GDX and falling back to ssh for monitoring the system.

Posted: 31. Dec 2008, 04:48
by Kamilion
TerryE wrote:Kamilion, I use JeOS as my distro of choice for my LAMP VMs, and I really think that it has been optimised for this role, given the tuning of the (default) -virtual kernel.
Exactly why I specify using either the Server or Generic kernel, and the -virtual kernel is not installed by the 8.10 ISO, but rather gets pulled down in the first apt-get upgrade automatically.
TerryE wrote:You are correct in saying that there is little to prevent you using this as a VM host OS, but that you do really need to switch to the generic kernel if you choose to do so. The JeOS distro omits quit a few H/W options so you may need to do quite a lot of apt-geting. The one thing that JeOS build comes without any X subsystem, desktop manager, or the GUI based tools such as Synaptic.
Yes, that's why I specified a lot of the CLI commands you can use to manage vbox without any GUI (Or even write your own web-frontend in the language of your choice! Mmm, Rails goodness...)
TerryE wrote:This of course has an upside on memory footprint / overhead for the host OS, and in the case of JeOS, this is pretty much minimal if you can do all your system management through a console interface. However, if you don't mind sacrificing the odd Gb of HDD and 128Mb of RAM to load the GDX (or whatever), then a standard Ubuntu distro is a lot easier for the normal user / developer. With this you can always reclaim this RAM in prod by stopping GDX and falling back to ssh for monitoring the system.
Personally, I don't even have a proper hardware xserver installed, I just use freenx-server from the ~freenx PPA. It sits on top of openssh just like sftp-server and gives me a close-to-native-speed GUI experience even when connecting remotely. No GDM, nothing running while not logged in except sshd. Why reclaim manually when you can have it done for you? :D

More info on how/why the dependency issue affects X (Or rather, doesn't.) here:http://forums.virtualbox.org/viewtopic.php?p=52521.

And here's the output for those of you who are curious:

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# 

Posted: 31. Dec 2008, 14:52
by TerryE
Kamilion, we're really drifting away from the original topic which is "what is the best Linux Distro". The point you are making is that an "X"-less distro is even lighter. Most of the technical issues relating to this are being discussed in the topic Installation without a GUI, so why not just refer to this topic for these details rather than duplicating the discussion here? :-)

Posted: 2. Jan 2009, 23:25
by NickC
OK thanks for the help so far.

Now got Ubuntu 8.10 Desktop (AMD64) running almost fine with VirtualBox 2.1.0 hosting Windows 2003 Server Standard.

Now I say almost, a few minor problems:

1). Ubuntu reports the following error at boot:
Your BIOS doesn't leave a aperture memory hole
Please enable the IOMMU option in the BIOS setup
This costs you 64 MB of RAM.
There is no such BIOS option.

2). I am using various NTFS partitions as shared drives in VirtualBox including the Virtual disk/machine. Problem is I have to mount each one manually in Ubuntu before going into VirtualBox, is there any way of having these mount automatically.

3). Adaptec 29320 SCSI controller is not detected and therefore none of the Tape drives are visible.

Thanks for your help and support.

Nick

Posted: 3. Jan 2009, 00:58
by TerryE
NickC wrote:I am using various NTFS partitions as shared drives in VirtualBox including the Virtual disk/machine.
Nick, if you are using NTFS as raw partitions for W2K3 then fine, but if you are using them to host VDIs, I think that you will find Ext3 as a better choice. The Linux based NTFS defrag tools are patchy and Ext3 is as fast as NTFS but isn't nearly so prone to fragmentation. Of course your FS inside your VDIs should be NTFS for a W2K3 guest.