From 954b399b68e10fe668c6ff5e07fe1ac0654e97d3 Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Thu, 24 Sep 2015 12:09:44 +0200 Subject: 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 --- common/ci/clean.sh | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit 1.2.3-korg