diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-12-23 22:01:53 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-12-23 22:01:53 -0200 |
commit | c1309add8452dea662d87966f497624ecbbce405 (patch) | |
tree | 7ecc7a1931904e9415244f6a4c3afbbf5cad12cb /share/hydractl | |
parent | da6ab6e65eb502001d949c2783a48fd8ad7f7b91 (diff) | |
download | hydra-c1309add8452dea662d87966f497624ecbbce405.tar.gz hydra-c1309add8452dea662d87966f497624ecbbce405.tar.bz2 |
Adds kvm-stop
Diffstat (limited to 'share/hydractl')
-rwxr-xr-x | share/hydractl/kvm-stop | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/share/hydractl/kvm-stop b/share/hydractl/kvm-stop new file mode 100755 index 0000000..f1a4533 --- /dev/null +++ b/share/hydractl/kvm-stop @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Workaround for stopping kVM-manager instances. +# + +# Parameters +BASENAME="`basename $0`" +VM="$1" + +# Check +if [ -z "$VM" ]; then + echo "usage: $BASENAME <vm>" + exit 1 +fi + +# Run +sv stop $VM ; sv kill $VM ; sv exit $VM +killall $VM +ip link set "${VM}0" down ; ip tuntap del mode tap dev "${VM}0" |