blob: 10ceb92e0879963ed2dbe17e249d4af38d171e6c [file] [log] [blame]
#!/bin/bash
function print_help {
echo "Missing parameters: del_vm.sh <cmp_node> <instance-XXXXXX>"
exit 1
}
if [[ -z ${1+x} ]]; then
print_help
fi
if [[ -z ${2+x} ]]; then
print_help
fi
echo "Destroy-n-undefine a VM..."
salt ${1}\* cmd.run "virsh destroy ${2}; virsh undefine ${2}"