Domain Destruction
domain_destouy.sh
NAME="" LVM_GROUP="vg2" if [ $# -gt 0 ] then NAME=${1} fi LVM_NAME="kvm_${NAME}_vda" if [ -e /dev/${LVM_GROUP}/${LVM_NAME} ] then # destrouy a running domain virsh destroy ${NAME} # undefine the domain virsh undefine ${NAME} # remove the volume lvremove /dev/${LVM_GROUP}/${LVM_NAME} else echo "${0}: no such domain" fi
Destroy the domain
./domain_destroy.sh clone