Install Ubuntu server in a virtual machine

These instructions use VirtualBox as an example. Instructions for other virtual machines are likely to be similar.

There is a version of the Ubuntu server that is optimized for usage within a virtual machine. It is provided on the Ubuntu Server edition LiveCD. The LiveCD image (.iso) found here can be downloaded onto your hard drive. It can then be installed directly into your virtual machine from the hard drive. Alternatively, you can also burn the .iso image onto a CD and install Ubuntu Server into the virtual machine from the CD. Both methods work identically during the Ubuntu Server installation process.

VirtualBox supports both 32 and 64-bit guest OSs. See this list for known supported operating systems. However, if your host OS is 32-bit you cannot run 64-bit guest OSs. Other virtual machines may have similar limitations, so in general a 32-bit Ubuntu OS is safest.

Note that the "minimal virtual machine" install of Ubuntu Server 10.04 doesn't recognize the SATA disk controller which VirtualBox 3.2.8 uses by default. If you find you can't boot your new installation and get dropped to an initramfs prompt on first boot, stop the VM and reconfigure it to use a SCSI disk controller instead as described here.

*Start the virtual machine you created in the previous step.

Virtualbox -> Ubuntu Virtual Server (highlighted) -> Start

Media Source:

-> Next ->

* Install Ubuntu server virtual machine edition:

The First Run Wizard will automatically start the LiveCD from the location you indicated, and you will see the Ubuntu Server LiveCD screen.

* Finish the remainder of the Ubuntu server installation. At the conclusion the Ubuntu system will automatically reboot within the virtual machine. When it restarts, you will then have a fully function Ubuntu Server within the virtual machine. Immediately update the operating system:

 sudo apt-get update
 sudo apt-get upgrade

Installing missing kernel modules

The kernel package installed by the "minimal virtual machine" option only contains a small number of modules. It's possible you may need one of the "missing" modules to get extra hardware supported. (In my case I wanted to access my MacBook Pro's internal USB Bluetooth device from Ubuntu.)

You *don't* have to build the modules yourself, you can simply install the associated "linux-image-extra-virtual" package and all the missing modules will be installed (at the cost of some extra disk space). (The description of the package currently implies a kernel image is also installed but that's not the case.)

Ubuntu_as_Guest_OS (last edited 2015-01-08 01:12:38 by 36-225-88-36)