aboutsummaryrefslogtreecommitdiffstats
path: root/testing/stop-testing
blob: 0f38bc4c4c1fc0f223af8945e158cdb8737f6ed0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/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"