adding space variable for K8 scenarios.
[joid.git] / ci / cleanvm.sh
index 95c985f..a2609bd 100755 (executable)
@@ -2,7 +2,9 @@
 
 set -x
 
-echo " Cleanup Started ..."
+source tools.sh
+
+echo_info "Cleanup Started..."
 
 #use the below commands if you needs to delete the virtual machine
 # also along with environment destroy.
@@ -16,8 +18,8 @@ for vm in node1-control node2-compute node3-control node4-control \
 do
     echo "$vm_list" | grep -q " $vm " || continue
     sudo virsh destroy $vm
-    sudo virsh undefine $vm
+    sudo virsh undefine --nvram $vm
     sudo rm -f /var/lib/libvirt/images/${vm}.qcow2
 done
 
-echo " Cleanup Finished ..."
+echo_info "Cleanup Finished!"