strongswan/testing/stop-testing
Reto Buerki 9b3316ed27 Use qemu/KVM virtualization instead of UML
Guest and network configuration is setup using the libvirt
virtualization API. The [start|stop]_testing scripts have been updated
accordingly.

qemu/KVM does not currently support a hostfs, so the shared build tree
mount has been dropped for now.
2013-01-17 16:54:52 +01:00

27 lines
473 B
Bash
Executable File

#!/bin/bash
. $PWD/scripts/function.sh
echo "Stopping test environment"
NETWORKS="vnet1 vnet2 vnet3"
KNLTARGET=/var/run/kvm-swan-kernel
[ `id -u` -eq 0 ] || die "You must be root to run $0"
for net in $NETWORKS
do
log_action "Network $net"
execute "virsh net-destroy $net"
done
for host in $STRONGSWANHOSTS
do
log_action "Guest $host"
execute "virsh destroy $host"
rm -f $VIRTIMGSTORE/$host.img
done
log_action "Removing kernel $KERNEL"
execute "rm $KNLTARGET"