summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Bjurel <jonas.bjurel@ericsson.com>2015-09-24 22:06:34 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-09-24 22:06:34 +0000
commit5383bd288bd6915fe706fee3bc09cce2ee015b23 (patch)
tree3694d0aff9b3ba40ff81e1b53398c79b36308cca
parent1333e1c578a0ce79489b75eee42b387ede3c6675 (diff)
parent954b399b68e10fe668c6ff5e07fe1ac0654e97d3 (diff)
Merge "Add removing existing VMs in clean.sh There might be VMs leftovers sometimes, then, the command 'rmmod kvm_intel' fails."
-rwxr-xr-xcommon/ci/clean.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/ci/clean.sh b/common/ci/clean.sh
index caaf88f..4cbc67b 100755
--- a/common/ci/clean.sh
+++ b/common/ci/clean.sh
@@ -220,6 +220,12 @@ else
echo "${blue}libvirt/KVM is not installed${reset}"
fi
+###remove possible VMs (needed for 'rmmod kvm_intel')
+if [ -n "$(ps -ef | grep qemu-kvm | grep -v grep)" ]; then
+ echo "${blue}Removing existing VMs ${reset}"
+ killall -9 qemu-kvm
+fi
+
###remove kernel modules
echo "${blue}Removing kernel modules ${reset}"
for kernel_mod in vboxnetadp vboxnetflt vboxpci vboxdrv kvm_intel kvm; do