You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
326 B

  1. #!/bin/bash
  2. set -euxo pipefail
  3. # Cleanup vagrant VMs to avoid name conflicts
  4. for i in $(virsh list --name)
  5. do
  6. virsh destroy "$i"
  7. virsh undefine "$i"
  8. done
  9. # Cleanup domain volumes
  10. for i in $(virsh vol-list default|grep \.img |grep -v VAGRANTSLASH | cut -f 2 -d ' ')
  11. do
  12. virsh vol-delete "$i" --pool default
  13. done