[pve-devel] qemu shutdown timeout

Stefan Priebe - Profihost AG s.priebe at profihost.ag
Thu Dec 6 13:47:43 CET 2012


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.priebe at profihost.ag>
> À: pve-devel at 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 at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>



More information about the pve-devel mailing list