diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-03-10 10:19:22 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-03-10 10:19:22 -0300 |
commit | 203d80db1862160e3bf2609da56288c039d436a4 (patch) | |
tree | b25ffe8ec157360b2ff12ae4bbe18cc6ab671de6 | |
parent | 6a24bde9a781220a2cc091d2d0123612ea35cf0f (diff) | |
download | kvmx-203d80db1862160e3bf2609da56288c039d436a4.tar.gz kvmx-203d80db1862160e3bf2609da56288c039d436a4.tar.bz2 |
Adds reboot action
-rwxr-xr-x | kvmx | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -155,6 +155,18 @@ function kvmx_poweroff { kvmx_status } +# Reboot the guest +function kvmx_reboot { + if ! kvmx_running; then + echo "$BASENAME: guest $VM is not running" + exit 1 + fi + + echo /usr/bin/sudo reboot | kvmx_ssh &> /dev/null + sleep 3 + kvmx_status +} + # Rsync files to the guest function kvmx_rsync { if ! kvmx_running; then |