5
DIST=$(lsb_release -c -s)
8
echo "need distro codename to create as first argument "
13
if [ ! -f /usr/bin/ubuntu-vm-builder ]; then
14
apt-get install -y ubuntu-vm-builder
17
if [ ! -f /usr/bin/kvm ]; then
18
apt-get install -y kvm
21
# create a default ssh key
22
if [ ! -e ssh-key ]; then
23
ssh-keygen -N '' -f ssh-key
27
if [ "$1" = "dapper" ]; then
32
ubuntu-vm-builder kvm $1 --kernel-flavour $KERNEL --ssh-key $(pwd)/ssh-key.pub \
33
--components main,restricted --rootsize 80000 --arch i386 --dest ubuntu-$1
36
mv ubuntu-$1/*.qcow2 $1-i386.qcow2