diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-03-16 19:04:03 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-03-16 19:04:03 -0300 |
commit | d20c87e198e00a62299047943dcc3d08deb6917c (patch) | |
tree | 44ab1fb82a028338ad826c23e07a29865f427d99 | |
parent | 50befeec4ac5b37c84c7287df8385c93d48f598f (diff) | |
download | kvmx-d20c87e198e00a62299047943dcc3d08deb6917c.tar.gz kvmx-d20c87e198e00a62299047943dcc3d08deb6917c.tar.bz2 |
adds kvmx_hibernate
-rwxr-xr-x | kvmx | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -380,6 +380,20 @@ function kvmx_down { kvmx_poweroff } +# Hibernate +function kvmx_hibernate { + if ! kvmx_running; then + echo "$BASENAME: guest $VM is not running" + exit 1 + fi + + echo "which s2disk &> /dev/null && /usr/bin/sudo s2disk" | kvmx_ssh &> /dev/null + + echo "Checking if guest is stopped..." + sleep 3 + kvmx_status +} + # Reboot the guest function kvmx_reboot { if ! kvmx_running; then |