diff options
Diffstat (limited to 'remove-vm')
-rwxr-xr-x | remove-vm | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -7,14 +7,14 @@ set -eu # Command line parameters. name="$1" -# What volume group should we use? -vg="exolobe1-vg" +# Read config variables. +. "$HOME/.config/ansibleness/vm.conf" # Shut down and remove the VM, if it exists. -if virsh list --all | grep -F "$name" > /dev/null +if virsh -c qemu:///system list --all | grep -F "$name" > /dev/null then - virsh destroy "$name" || true - virsh undefine "$name" + virsh -c qemu:///system destroy "$name" || true + virsh -c qemu:///system undefine "$name" fi # Remove the LV, if it exists. |