Page 1 of 1

Ubuntu Server "minimal virtual machine"

Posted: 2. May 2011, 01:40
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.

Re: Ubuntu Server "minimal virtual machine"

Posted: 3. May 2011, 21:42
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.

Re: Ubuntu Server "minimal virtual machine"

Posted: 4. May 2011, 05:47
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.

Re: Ubuntu Server "minimal virtual machine"

Posted: 4. May 2011, 20:16
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.