Custom Disk Images

From Marss86

To create custom disk images you can use Ubuntu's ubuntu-vm-builder package to create new KVM/QEMU disk images. 'ubuntu-vm-builder' makes it easy to create custom disk images of your choice of distribution version and packages preinstalled.

NOTE: You'll need root access to create new disk image

First install required package:

  $ sudo apt-get install ubuntu-vm-builder

To create a new disk image for x86-64 architecture with default installation use following command:

  $ sudo ubuntu-vm-builder kvm natty --arch amd64

This command will take some time to complete as it retrieves all the default package information.

You can use -c option to provide custom configuration file in which you can set various options like architecture, user-name, password, suite (for example 'natty' for Ubuntu), and package list to install. You can find more information about this configuration file syntax and detail over here.

Sample Configuration File

arch = amd64
user = root
name = root
pass = root
rootsize = 5120
addpkg = openssh-server, openssh-client, vim
Personal tools