This is my second post regarding virtualization using KVM on Ubuntu. You might want to read the previous tutorial first.
The last thing we did was to install Ubuntu using an ISO file and then after within the new VM, install Apache and show how one could access it from somewhere else at the LAN. This is all you need in order to start create your own VMs. However, the creation process can be improved in several ways. First, there are high-level tools like the virt-* tools, which I will address in some other post. Second there is a way to improve how a Ubuntu VM is defined.
JeOS
There is an ingenious shell script named ubuntu-vm-builder, that both creates the virtual disk and downloads all required packages of Ubuntu and creates a ready to use system, without the need to first download the ISO and then proceed through the (tediuos) installation process.
In addition, the flavour of Ubuntu is (normally) JeOS (Just enough OS), which is a shrink-wrapped Ubuntu Server OS optimized for running within a VM. It’s foot print is just 300Mb.
Installation
Start by installing the script
sudo apt-get install ubuntu-vm-builder
Usage
The minimal command line you can use to create a Ubuntu (8.04) system on KVM is
sudo ubuntu-vm-builder kvm hardy
This will create disk file in a generated sub-directory, download and install the JeOS packages and leave you with a fresh VM which you can launch (as usual) and logon to using ubuntu/ubuntu as usr/pwd. There are of course plenty of command line switches you in practice want to use. See ‘man ubuntu-vm-builder’ and/or ‘ubuntu-vm-builder –help’ för more information.


Add One