mirror of
https://github.com/strongswan/strongswan.git
synced 2025-12-09 00:00:27 -05:00
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.
29 lines
607 B
Bash
Executable File
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
|