mirror of
https://github.com/strongswan/strongswan.git
synced 2025-11-22 00:01:45 -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.
27 lines
475 B
Bash
Executable File
27 lines
475 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.qcow2
|
|
done
|
|
|
|
log_action "Removing kernel $KERNEL"
|
|
execute "rm $KNLTARGET"
|