First off, you will want to build images on a KVM capable machine. If not, you will be missing out on the hardware acceleration and your install will take forever!

virt-install

This is a command line tool written in python that will allow you to specify the layout of a guest, and do an installation of that guest.

Since the man page for this program contains most information you would want to know, I will keep this section short with just an example and a few quick notes.

This example will create a 10GB disk image and start the installation from an iso located at /home/bob/sl52DVD.iso. The guest is given 512MB of memory, and it will use br0 for its network connection.

virt-install --connect qemu:///system
             --name sl52base \
             --ram 512 \
             --file /opt/workspace/images/sl52base \
             --file-size 10 \
             --network BRIDGE:br0 \
             --accelerate \
             --os linux \
             --os-variant rhel5 \
             --cdrom /home/bob/sl52DVD.iso

NOTES:

  • When creating a KVM guest you must always use the --accelerate option. If you do not, it will fall back to QEMU emulation.
  • the --cdrom option can point to an actual drive (ie, /dev/hdc), or a iso file on your local machine, or even a remote file (ftp, http, etc.).
  • ram is specified in MB, disk size is specified in GB.
  • the --disk option may be of more use to you the --file.

virt-manager

One of the features of virt-manager is the ability to create new guests by using a nice GUI. There are some features you will not have access to with this approach, but the majority of features you need will be there.

virt-clone

This is another command line program that will take an existing guest image and create a copy of it. Assignment of new UUIDs and network MACs is easily handeled here.

-- MattVliet - 04 Mar 2009

Edit | Attach | Watch | Print version | History: r6 | r4 < r3 < r2 < r1 | Backlinks | Raw View | More topic actions...
Topic revision: r2 - 2009-03-05 - mvliet
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback