summaryrefslogtreecommitdiffstats
path: root/prototypes
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2017-03-29 13:46:33 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-29 13:46:33 +0000
commit04f931b3ee3f3226426e384cc379aeb32f5064d0 (patch)
treec7477b76ff8866cefa0ed705262c5d5944e6abeb /prototypes
parent9951290d0a2fe9c8d60ce5d95abcd3b8b7dabb32 (diff)
parent6299cd14079d45937261790d71f7f55187b41289 (diff)
Merge "xci: Destroy/undefine only the VMs we created"
Diffstat (limited to 'prototypes')
-rwxr-xr-xprototypes/bifrost/scripts/destroy-env.sh8
1 files changed, 2 insertions, 6 deletions
diff --git a/prototypes/bifrost/scripts/destroy-env.sh b/prototypes/bifrost/scripts/destroy-env.sh
index 7d3db90b0..ce9d53538 100755
--- a/prototypes/bifrost/scripts/destroy-env.sh
+++ b/prototypes/bifrost/scripts/destroy-env.sh
@@ -14,14 +14,10 @@ if [[ $(whoami) != "root" ]]; then
exit 1
fi
-# Delete all VMs on the slave since proposed patchsets
-# may leave undesired VM leftovers
-for vm in $(virsh list --all --name); do
+# Delete all libvirt VMs and hosts from vbmc (look for a port number)
+for vm in $(vbmc list | awk '/[0-9]/{{ print $2 }}'); do
virsh destroy $vm || true
virsh undefine $vm || true
-done
-# Delete all hosts from vbmc (look for a port number)
-for vm in $(vbmc list | awk '/[0-9]/{{ print $2 }}'); do
vbmc delete $vm
done