3 DIR=$(dirname `readlink -f $0`)
5 . $DIR/scripts/function.sh
7 echo "Stopping test environment"
9 NETWORKS="vnet1 vnet2 vnet3"
10 KNLTARGET=/var/run/kvm-swan-kernel
11 HOSTFSTARGET=/var/run/kvm-swan-hostfs
12 TESTRESULTSTARGET=/var/run/kvm-swan-testresults
14 [ `id -u` -eq 0 ] || die "You must be root to run $0"
20 log_action "Network $net"
21 execute "virsh net-destroy $net"
24 for host in $STRONGSWANHOSTS
26 log_action "Guest $host"
27 execute "virsh shutdown $host"
28 rm -f $VIRTIMGSTORE/$host.$IMGEXT
31 log_action "Removing kernel $KERNEL"
32 execute "rm $KNLTARGET"
34 log_action "Removing link to hostfs"
35 execute "rm $HOSTFSTARGET"
37 log_action "Removing link to testresults"
38 execute "rm $TESTRESULTSTARGET"