Update monitor-all.sh to restart virtual machines instead of resetting (#1704)

If a virtual machine is not responding or has become unresponsive, perform a forceful restart instead of a soft reset
pull/1750/head
Csaba Kos 1 year ago committed by GitHub
parent cb4097e74c
commit 76d7cc6f71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -73,12 +73,13 @@ while true; do
else else
# It is a virtual machine # It is a virtual machine
if qm status $instance | grep -q "status: running"; then if qm status $instance | grep -q "status: running"; then
echo "$(date): VM $instance is not responding, resetting..." echo "$(date): VM $instance is not responding, restarting..."
qm reset $instance >/dev/null 2>&1 qm stop $instance >/dev/null 2>&1
sleep 5
else else
qm start $instance >/dev/null 2>&1
echo "$(date): VM $instance is not running, starting..." echo "$(date): VM $instance is not running, starting..."
fi fi
qm start $instance >/dev/null 2>&1
fi fi
fi fi
done done

Loading…
Cancel
Save

Powered by BW's shoe-string budget.