Ubuntu Server "minimal virtual machine"

Discussions about using Linux guests in VirtualBox.
Post Reply
slowace
Posts: 3
Joined: 1. May 2011, 21:39
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WinXP, Linux

Ubuntu Server "minimal virtual machine"

Post by slowace »

Booting an Ubuntu Server CD, in the main installation menu, you can press F4 and select "Install a minimal virtual machine" before beginning the installation to choose a VM-optimized version of Ubuntu Server.

Before installation:
- In the VM settings, enable the "PAE/NX" processor feature.
- Do not use a SATA boot drive! Installation will appear to work, but you'll get a missing drive error on first boot. IDE, SCSI, and SAS all work fine, best I can tell. (If you create a Linux/Ubuntu VM using the wizard, the boot drive will be SATA by default, but you can move it to a different controller before booting the installation CD.)

After installation:
- Install the package acpid to be able to shutdown the VM from VirtualBox.
- If you want to use Guest Additions, while following the excellent Howto: Install Linux Guest Additions + Xorg config you'll need to install the linux-headers-virtual package instead of linux-headers-generic. You'll still get a "fail!" message when it tries to install the Window System additions, but that's to be expected.

Just how minimal is it? My little one has 80 MB memory, 1 MB video, no absolute pointing device, no audio, no USB. With 32-bit 11.04, the "Basic Ubuntu server" and "SSH server" software packages, and the Guest Additions, it weighs in at around 1 GB on the boot drive. At idle, "free" says 71296 total mem, 39940 used/31356 free.

I haven't measured the performance of the F4 "minimal virtual machine" versus using the standard installation. One advantage, though, is that you won't get the annoying piix4 smbus warning message on bootup, so you won't need this workaround.
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

Re: Ubuntu Server "minimal virtual machine"

Post by Sasquatch »

What I do wonder is how many packages you have installed. Now this might require some more packages, but install aptitude, then you know how many are installed. You could go with a get-selections from dpkg and count the amount of lines, after extracting the top few. 'Cause the way I installed my laptop this weekend gave me a very, very small system, just 170 packages installed ;).
How I did it? Well, if you use F6, you can enable Expert mode. With that, I let it only install a the base system, skipping the "select and install packages" (the step after setting up the package manager). You do miss a lot of packages, like wget and such, but it is really minimal.
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.
slowace
Posts: 3
Joined: 1. May 2011, 21:39
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WinXP, Linux

Re: Ubuntu Server "minimal virtual machine"

Post by slowace »

Guess what, aptitude's already there! It says 297 packages. This is after the Guest Additions install, which adds quite a bit, but the "Basic Ubuntu Server" selection obviously includes a few less-than-vital packages: wget, w3m, gnupg, eject, sed, mawk, lots of perl and python packages, and of course aptitude. Some X11 stuff snuck in there somehow as well. I guess expert mode is the way to go if you want finer control over this stuff.

Expert mode also gives you the choice NOT to install USB mass storage drivers during the installation, which the normal and "minimal virtual" installation still include even when the machine has no USB.
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

Re: Ubuntu Server "minimal virtual machine"

Post by Sasquatch »

No idea about the USB not installing thing, but all you get during Expert mode installation is the question to load USB storage modules or not. This is in case you need to load network modules or storage modules during installation to detect or use certain hardware. Debian needs this when installing on server hardware, since that has some proprietary hardware most of the time, like Broadcom interfaces. These modules aren't on the install disc/ISO, so you have to download the package that contains the modules separately and load it through USB. Your VM will still have USB support in all it's glory, it's part of the kernel, just not the installation. Storage only.
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.
Post Reply