From: Silvio Rhatto Date: Thu, 16 Mar 2017 22:23:48 +0000 (-0300) Subject: Better check at kvmx_hibernate X-Git-Tag: 0.1.0~521 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=bad3481d39faa886c63844449763fdd1cd5b7fc5;p=kvmx.git Better check at kvmx_hibernate --- diff --git a/kvmx b/kvmx index 295256a..a6bd52c 100755 --- a/kvmx +++ b/kvmx @@ -389,9 +389,15 @@ function kvmx_hibernate { echo "which s2disk &> /dev/null && /usr/bin/sudo s2disk" | kvmx_ssh &> /dev/null - echo "Checking if guest is stopped..." + echo "Checking if hibernation was successful..." sleep 3 - kvmx_status + + if kvmx_running; then + echo "Unable to hibernate guest: please check guest configuration" + exit 1 + else + kvmx_status + fi } # Reboot the guest