THX. Patch sent.
Am 06.12.2012 17:51, schrieb Alexandre DERUMIER:
ok, got it !
(in pve-manager sources)
www/manager/qemu/CmdMenu.js
{
text: gettext('Stop'),
icon: '/pve2/images/gtk-stop.png',
handler: function() {
var msg = Ext.String.format(gettext("Do you really want to stop
VM {0}?"), vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
vm_command("stop", { timeout: 30 });
});
}
},
and
www/manager/VNCConsole.js:
{
text: gettext('Shutdown'),
handler: function() {
var msg = Ext.String.format(gettext("Do you really want to
shutdown VM {0}?"), me.vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
vm_command('shutdown', {timeout: 30});
});
}
},
So it force timeout to 30,
and startup: down vm config option, is override
vm_stop in qemuserver.pm
if (!$nocheck) {
$conf = load_config($vmid);
check_lock($conf) if !$skiplock;
if (!defined($timeout) && $shutdown && $conf->{startup}) {
my $opts = parse_startup($conf->{startup});
$timeout = $opts->{down} if $opts->{down};
}
}
$timeout = 60 if !defined($timeout);
So, I think we need to remove these timeouts from javascript.
Dietmar , what do you think ?
----- Mail original -----
De: "Stefan Priebe - Profihost AG" <s.pri...@profihost.ag>
À: "Alexandre DERUMIER" <aderum...@odiso.com>
Cc: pve-devel@pve.proxmox.com
Envoyé: Jeudi 6 Décembre 2012 13:47:43
Objet: Re: [pve-devel] qemu shutdown timeout
I thought the same but $timeout is 30 when issued through GUI - i
modified the die to print the $timeout.
Stefan
Am 06.12.2012 13:46, schrieb Alexandre DERUMIER:
I Think it's in QemuServer.pm (but it's 60s, not 30s)
vm_stop()
$timeout = 60 if !defined($timeout);
eval {
if ($shutdown) {
$nocheck ? vm_mon_cmd_nocheck($vmid, "system_powerdown") : vm_mon_cmd($vmid,
"system_powerdown");
} else {
$nocheck ? vm_mon_cmd_nocheck($vmid, "quit") : vm_mon_cmd($vmid, "quit");
}
};
my $err = $@;
if (!$err) {
my $count = 0;
while (($count < $timeout) && check_running($vmid, $nocheck)) {
$count++;
sleep 1;
}
if ($count >= $timeout) {
if ($force) {
warn "VM still running - terminating now with SIGTERM\n";
kill 15, $pid;
} else {
die "VM quit/powerdown failed - got timeout\n";
}
} else {
vm_stop_cleanup($storecfg, $vmid, $conf, $keepActive) if $conf;
return;
}
----- Mail original -----
De: "Stefan Priebe - Profihost AG" <s.pri...@profihost.ag>
À: pve-devel@pve.proxmox.com
Envoyé: Jeudi 6 Décembre 2012 09:28:54
Objet: [pve-devel] qemu shutdown timeout
Hello list,
when i press "shutdown" in the PVE GUI / Manager. There is a timeout of
30s. This is too small for my VMs. I digged through the code but i
wasn't able to find out where the timeout of 30s for shutdown is set.
The default timeout in code for qemu is 3*60 but it seems to be passed
by manager instead of using the default timeout.
Can someone point me to the right file / code?
Greets,
Stefan
_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel