Host hangs on shutdown because of stuck vms

allyx

Member
Feb 16, 2022
10
0
6
37
Hello,

Suppose we have a VM that is stuck for a reason and won't respond to a shutdown command(for example, booted a live cd, guest agent not active, etc) - either issued manually via the UI or triggered when trying to shutdown the host.

If this was a manual shutdown, it can be easily fixed by either deleting the lock file and stopping it, or by directly killing the VM.

BUT, if it's during host shutdown process, it doesn't seem to kill a vm and the host just stays stuck - even with a monitor attached, the video is stopped, no networking, no console, no UI.

So I guess my question is, is there some sort of a hard timeout I haven't reached(5, 10, 30 mins?) on a host shutdown when everything is forcefully killed and the hardware actually stops? Because if shutdown depends on a VM's graceful shutdown, then every VM is a single point of failure where you'd have to physically cycle the host's power.

And if there is such a timeout, can it be configured somehow?
 
Look at "YourVM -> Option -> Start/Shutdown Order -> Shutdown Timeout". As far as I understand PVE should forcefully stop the VM after this timeout is reached when the shutdown doesn't finish in time.

Edit:
Here, from the documentation:
  • Shutdown timeout: Defines the duration in seconds Proxmox VE should wait for the VM to be offline after issuing a shutdown command. By default this value is set to 180, which means that Proxmox VE will issue a shutdown request and wait 180 seconds for the machine to be offline. If the machine is still online after the timeout it will be stopped forcefully.
 
Last edited:
  • Like
Reactions: allyx
Oooooh I must have missed there is a 3 min default for this. Now I tried waiting a little more and sure enough it shut down. Thanks for the docs reminder!