From d60cbb97ec0b6412fc527bd197e1bfd251966d8d Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sun, 3 May 2020 11:12:54 +0200 Subject: [PATCH] _do_vm_stop: only warn if QMP command failed but VM is actually stopped Signed-off-by: Thomas Lamprecht --- PVE/QemuServer.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index efacc459..c1b1179a 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -5385,7 +5385,11 @@ sub _do_vm_stop { return; } } else { - if ($force) { + if (!check_running($vmid, $nocheck)) { + warn "Unexpected: VM shutdown command failed, but VM not running anymore..\n"; + return; + } + if ($force) { warn "VM quit/powerdown failed - terminating now with SIGTERM\n"; kill 15, $pid; } else {