Ubuntu 12.04 on Virtualbox 4.1 mini-HOWTO
This mini-HOWTO will guide you though installing Ubuntu Server 12.04 with minimal setup on Virtualbox 4.1.x.
Before start, you should first install latest Virtualbox from https://www.virtualbox.org/wiki/Downloads, including:
- VirtualBox platform packages
- Oracle VM VirtualBox Extension Pack
Also, download the latest Ubuntu Server 12.04 install CD from http://releases.ubuntu.com/12.04/
Assume that your Virtualbox already install correctly, let's create a new VM as below:
Some check points:
- Both number of processor, base memory, video memory and disk storage size are optional, you may scale it up according to your situation
- At least enable 1 network interface with NAT (recommened for testing) or bridge to your public internet connection, else during Ubuntu installation it will not able to fetch latest information from internet
- In the Storage -> IDE Controller -> Attributes -> CD/DVD Driver, choose the Ubuntu Server 12.04 install CD and confirm it
Once start the VM the screen should show up as:
- Press F6 and choose "Expert mode"
- Press F4 and choose "Install a minimal virtual machine"
NOTE: By choosing the "Install a minimal virtual machine" default Linux kernel will only come with limited modules + hardware support, e.g. even without disk quota support. Anyway, for sure that due to the trim down of kernel size memory usage and speed would be better when compare with normal kernal
Just install "linux-image-extra-virtual" to get all available kernel modules if required.
Update the hostname according to your needs.
My reason for using "Expert mode": we can enable root access by default during installation. Usually I will NOT create a normal user account in next step, too (Since for most cases I will combine the server usage with Virtualmin so it will manage that for me).
Choose "Manual" during partition disks.
- Choose "msdos" for Partition table type for most cases (e.g. < 2TB)
- Just create single primary root partition (i.e. no swap partition). This is because as a VM, if it is running out of memory and able to use disk as swap, it may keep on use up all disk I/O so other else VMs may be killed, too. Just give enough base memory for it ;-)
Choose the archive mirror that most close to your location.
Usually I will left this empty selection for manually install after first reboot.
After first reboot, it should looks like this. I would like to add some quick fix once first boot successful:
aptitude update && \ aptitude -y full-upgrade && \ aptitude -y install ubuntu-extras-keyring vim ntp openssh-server rsync colordiff pwgen mlocate
Ok now your Ubuntu 12.04 should ready for on going development ;-)