mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 21:40:01 +08:00
Shutdown
This commit is contained in:
parent
a367a3b13f
commit
9a117f4fb0
@ -32,7 +32,7 @@ _graceful_shutdown(){
|
|||||||
# Don't send the powerdown signal because vDSM ignores ACPI signals
|
# Don't send the powerdown signal because vDSM ignores ACPI signals
|
||||||
# echo 'system_powerdown' | nc -q 1 -w 1 localhost "${QEMU_MONPORT}" > /dev/null
|
# echo 'system_powerdown' | nc -q 1 -w 1 localhost "${QEMU_MONPORT}" > /dev/null
|
||||||
|
|
||||||
# Send shutdown command instead via serial port
|
# Send shutdown command to host via serial port
|
||||||
RESPONSE=$(curl -s -m 2 -S http://127.0.0.1:2210/write?command=6 2>&1)
|
RESPONSE=$(curl -s -m 2 -S http://127.0.0.1:2210/write?command=6 2>&1)
|
||||||
|
|
||||||
if [[ ! "${RESPONSE}" =~ "\"success\"" ]] ; then
|
if [[ ! "${RESPONSE}" =~ "\"success\"" ]] ; then
|
||||||
@ -40,6 +40,8 @@ _graceful_shutdown(){
|
|||||||
echo
|
echo
|
||||||
echo "Could not send shutdown command to guest, error: $RESPONSE"
|
echo "Could not send shutdown command to guest, error: $RESPONSE"
|
||||||
|
|
||||||
|
# If we cannot shutdown the usual way, fallback to the NMI method
|
||||||
|
|
||||||
AGENT_VERSION=1
|
AGENT_VERSION=1
|
||||||
AGENT="${STORAGE}/${BASE}.agent"
|
AGENT="${STORAGE}/${BASE}.agent"
|
||||||
[ -f "$AGENT" ] && AGENT_VERSION=$(cat "${AGENT}")
|
[ -f "$AGENT" ] && AGENT_VERSION=$(cat "${AGENT}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user