summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2015-09-24 12:09:44 +0200
committerjose.lausuch <jose.lausuch@ericsson.com>2015-09-24 15:05:28 +0200
commit954b399b68e10fe668c6ff5e07fe1ac0654e97d3 (patch)
tree31cd07555a8d37629e9cb59aa240856cfb022e9c
parent83d962fe37b093656fc032fed9ee1f7ad815b89e (diff)
Add removing existing VMs in clean.sh
There might be VMs leftovers sometimes, then, the command 'rmmod kvm_intel' fails. Change-Id: Iaacfa2182a8f867f5f28a79930f5520d9689156f Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
-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