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
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"> <name>images</name> <target> <path>/mnt/veewee/images/</path> <format type='qcow2'/> </target> </pool>
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 https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer sh rvm-installer source /etc/profile.d/rvm.sh rvm install 1.9.2 git clone https://github.com/jedi4ever/veewee.git 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
vda in the file
ks.cfg. Also I changed the used mirror in
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.