this commit:

commit 1c0c1c17b0
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>
This commit is contained in:
Stefan Priebe 2014-12-21 21:04:13 +01:00 committed by Dietmar Maurer
parent 874a096e0e
commit 6fab033c3c

View File

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