]> git.proxmox.com Git - qemu-server.git/commitdiff
_do_vm_stop: only warn if QMP command failed but VM is actually stopped
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 3 May 2020 09:12:54 +0000 (11:12 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 3 May 2020 09:12:54 +0000 (11:12 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/QemuServer.pm

index efacc459de55ba1dfd0c25647b416a50843f669d..c1b1179ad815f69d85944f2ebccc28615b51dd46 100644 (file)
@@ -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 {