Created
December 12, 2018 06:20
-
-
Save anjannath/083c09b5f84555c53b047591e740c1d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
vol_list=$(sudo virsh vol-list --pool default | grep test1 | awk '{print $1}') | |
for vol in $vol_list | |
do | |
sudo virsh vol-delete $vol --pool default | |
done | |
sudo virsh net-destroy test1 | |
sudo virsh net-undefine test1 | |
dom_list=$(sudo virsh list --all | grep test1 | awk '{print $2}') | |
for dom in $dom_list | |
do | |
sudo virsh destroy $dom | |
sudo virsh undefine $dom | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment