]> git.proxmox.com Git - qemu-server.git/commitdiff
this commit:
authorStefan Priebe <s.priebe@profihost.ag>
Sun, 21 Dec 2014 20:04:13 +0000 (21:04 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 22 Dec 2014 16:19:39 +0000 (17:19 +0100)
commit 1c0c1c17b020710fd841c399c1e147ccc10007cd
Author: Wolfgang Link <wolfgang@linksystems.org>
Date:   Wed Nov 26 11:11:40 2014 +0100

    shutdown by Qemu Guest Agent if the agent flag in the config is set

    Important: "guest-shutdown" returns only by error a message.

Signed-off-by: Wolfgang Link <wolfgang@linksystems.org>
breaks live migration as it always tries to load the vm config - even in case of $nocheck. Also it double loads the config ($conf && $config)
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
PVE/QemuServer.pm

index 4840c7398ea48f3a4296d1dc314ddd20033db16e..cb84f42cf132d9937946c6f205cc45b2f1cc5293 100644 (file)
@@ -3721,11 +3721,10 @@ sub vm_stop {
        }
 
        $timeout = 60 if !defined($timeout);
-       my $config = load_config($vmid);
 
        eval {
            if ($shutdown) {
-               if ($config->{agent}) {
+               if (!$nocheck && $conf->{agent}) {
                    vm_qmp_command($vmid, { execute => "guest-shutdown" }, $nocheck);
                } else {
                    vm_qmp_command($vmid, { execute => "system_powerdown" }, $nocheck);