strongswan/testing/start-testing
Reto Buerki 8ed98c1373 Switch from raw images to qcow2 format
This allows to use minimal copy-on-write clones of the base image as
guest images, which in turn saves a lot of disk space.
2013-01-17 16:54:54 +01:00

29 lines
607 B
Bash
Executable File

#!/bin/bash
. $PWD/scripts/function.sh
NETWORKS="vnet1 vnet2 vnet3"
CONFDIR=$PWD/config/kvm
KNLSRC=$BUILDDIR/$KERNEL/arch/x86/boot/bzImage
KNLTARGET=/var/run/kvm-swan-kernel
echo "Starting test environment"
[ `id -u` -eq 0 ] || die "You must be root to run $0"
log_action "Deploying kernel $KERNEL"
execute "ln -fs $KNLSRC $KNLTARGET"
for net in $NETWORKS
do
log_action "Network $net"
execute "virsh net-create $CONFDIR/$net.xml"
done
for host in $STRONGSWANHOSTS
do
ln -fs $ROOTFSDIR/$host.qcow2 $VIRTIMGSTORE/$host.qcow2
log_action "Guest $host"
execute "virsh create $CONFDIR/$host.xml"
done