blob: 10ceb92e0879963ed2dbe17e249d4af38d171e6c [file] [log] [blame]
Alexe286dbd2020-10-16 12:47:54 -05001#!/bin/bash
2function print_help {
3 echo "Missing parameters: del_vm.sh <cmp_node> <instance-XXXXXX>"
4 exit 1
5}
6if [[ -z ${1+x} ]]; then
7 print_help
8fi
9if [[ -z ${2+x} ]]; then
10 print_help
11fi
12
13echo "Destroy-n-undefine a VM..."
14salt ${1}\* cmd.run "virsh destroy ${2}; virsh undefine ${2}"