Build images using VeeWee

VeeWee is an utility for automatically preparing images for use in IAAS environments like OpenStack. VeeWee supports a lot of distributions, for example Fedora, openSUSE, CentOS or Debian.

Before starting make sure that Libvirt and KVM are correctly working. The working directory for the following instructions, tested on Fedora 18, is /mnt/veewee/. There I mounted an ext4 filesystem with 30 GByte capacity.

First stop the IPv4 firewall and restart libvirtd afterwards.

service iptables stop
service libvirtd restart


Next create a storage pool. Write the following definition to the file /tmp/pool.xml and create the storage pool with virsh pool-create /tmp/pool.xml. The directory /mnt/veewee/images should exist.

<pool type="dir">
    <format type='qcow2'/>


Then install necessary packages and continue with the installation of RVM and VeeWee.

yum install libxslt1-devel git patch make 
     bzip2 autoconf automake gcc-c++ readline-devel 
     libyaml-devel libffi-devel openssl-devel bison 
     libtool libvirt-devel
curl -o rvm-installer
sh rvm-installer
source /etc/profile.d/
rvm install 1.9.2
git clone
cd veewee
gem install bundler
bundle install --without restrictions


Now it is possible to define, customize and build images.

veewee kvm define Fedora-18-x86_64 Fedora-18-x86_64
veewee kvm build Fedora-18-x86_64 --workdir=/mnt/veewee/veewee
veewee kvm halt Fedora-18-x86_64

For customization modify the files in definitions/Fedora-18-x86_64/. After the build completed it is also possible to login with SSH.

On my system to get it running I had to change sda to vda in the file ks.cfg. Also I changed the used mirror in definitions.rb.

When the build finished first stop the instance and then publish the image with python-glanceclient on the image service.

glance image-create --container-format bare 
                    --disk-format qcow2 
                    --is-public True 
                    --name Fedora-18-x86_64 
< /mnt/veewee/images/Fedora-18-x86_64.raw


For further details have a look at the following pages.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>