aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/scripts
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-07-26 18:53:04 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-07-26 18:56:43 +0200
commit4651bb2a7257be49c9ca6ce5c959de66e6800005 (patch)
tree608f0a05b91557407c5d85a0f4c4ce839e0c9d16 /mcp/scripts
parent5c3b0e9a51e3486ae660685a3c33aed0e39c5ab2 (diff)
lib.sh: cleanup_vms: Also remove stopped MCP VMs
In case the cfg01 & co. VMs are in "shut off" state, `virsh --name` will ommit them, which leads to `cleanup_vms` leaving behind stale VMs. Add `--all` arg to list all VMs, including stopped ones. Change-Id: Ia550a10eb0b40138f87ade709336c2871a8b1cd8 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/scripts')
-rw-r--r--mcp/scripts/lib.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index 1848c7008..6fa330ab7 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -16,7 +16,7 @@ get_base_image() {
cleanup_vms() {
# clean up existing nodes
- for node in $(virsh list --name | grep -P '\w{3}\d{2}'); do
+ for node in $(virsh list --name --all | grep -P '\w{3}\d{2}'); do
virsh destroy $node
virsh undefine $node
done