Use uuids for deletion

pull/5378/head
Thomas Stromberg 2019-09-16 21:02:31 -07:00
parent 3f38e63d5c
commit 6a0ec545a6
1 changed files with 2 additions and 1 deletions

View File

@ -125,7 +125,7 @@ if [[ "${zombie_defuncts}" != "" ]]; then
fi
if type -P virsh; then
virsh -c qemu:///system list --all \
virsh -c qemu:///system list --all --uuid \
| awk '{ print $2 }' \
| xargs -I {} sh -c "virsh -c qemu:///system destroy {}; virsh -c qemu:///system undefine {}" \
|| true
@ -136,6 +136,7 @@ fi
if type -P vboxmanage; then
vboxmanage list vms || true
vboxmanage list vms \
| egrep -o '{.*?}' \
| xargs -I {} sh -c "vboxmanage startvm {} --type emergencystop; vboxmanage unregistervm {} --delete" \
|| true