diff options
author | ansible <ansible@exolobe2> | 2015-10-08 21:16:19 +0300 |
---|---|---|
committer | ansible <ansible@exolobe2> | 2015-10-08 21:16:19 +0300 |
commit | 0505986743df1ec93e9eda2f4c0e102350de7e8a (patch) | |
tree | e49260a9abcfa48c4c1d103b5c08963778baf0fc /remove-vm | |
parent | 9a0bf1a425a77b85aa90d22f72a50dc15d709529 (diff) | |
download | ansibleness-0505986743df1ec93e9eda2f4c0e102350de7e8a.tar.gz |
Make create-vm, remove-vm read a config file
This allows me to run them on places other than my laptop.
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. |