modified to support the ha deployment in case of virtual machine.
[joid.git] / ci / cleanvm.sh
1 #!/bin/bash
2
3 set -ex
4
5 #use the below commands if you needs to delete the virtual machine
6 # also along with envuronment destroy.
7
8 echo " Cleanup Started ..."
9 ./clean.sh
10  
11  virsh destroy opnfv-maas || true
12  virsh destroy bootstrap || true
13  virsh destroy node1-control || true
14  virsh destroy node3-control || true
15  virsh destroy node4-control || true
16  virsh destroy node2-compute || true
17  virsh destroy node5-compute || true
18  virsh undefine opnfv-maas || true
19  virsh undefine bootstrap || true
20  virsh undefine node1-control || true
21  virsh undefine node3-control || true
22  virsh undefine node4-control || true
23  virsh undefine node2-compute || true
24  virsh undefine node5-compute || true
25  sudo rm -rf  /var/lib/libvirt/images/opnfv-maas.img /var/lib/libvirt/images/bootstrap.img /var/lib/libvirt/images/node1-control.img /var/lib/libvirt/images/node3-control.img /var/lib/libvirt/images/node4-control.img /var/lib/libvirt/images/node2-compute.img /var/lib/libvirt/images/node5-compute.img || true
26  
27 echo " Cleanup Finished ..."