diff options
-rwxr-xr-x | bifrost/scripts/destroy-env.sh | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/bifrost/scripts/destroy-env.sh b/bifrost/scripts/destroy-env.sh index 7d3db90b..ce9d5353 100755 --- a/bifrost/scripts/destroy-env.sh +++ b/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 |