[SOLVED] Timeout for shutdown? - VM crashes/hangs during boot

Feb 27, 2021
93
19
13
On quite a few occasions a new VM crashes during boot.
Then found it quite difficult to recover.

Reset works sometimes, so does pause and then halt.

When I use shutdown, then the shutdown process runs forever, no subsequent pause, halt, reset works.
How can I recover from that situation, without rebooting the server.
 
Open the task log, stop the shutdown task, and then stop the VM
 
  • Like
Reactions: Feeble2285
When the guests shutdown task from the webUI gets stuck you can't do restart/reset/stop task as the shutdown task is still running blocking the other tasks. So you need to abort your shutdown task first before you can run a new reset/stop task. For that you can click on the shutdown task at the bottom of the webUI in the list of previous tasks and hit the "stop" button there.
 
Last edited:
Open the task log, stop the shutdown task, and then stop the VM
I am not sure what the task log is.

Then I tried double clicking the "task line" at the lower section of the screen, I got a new box popping up, and there was the stop button.
That worked. Thanks a lot.

Sorry I am linux guy, so double clicking does not come naturally :)
I am more inclined to try all Mouse buttons ...
 
When you use 'Shutdown', the Proxmox sends an ACPI shutdown signal to the guest OS. If the OS ignores the singnal (either through missing support or a setting what the system will do on the 'push the power button' event), then nothing will happen.

See also here:
https://pve.proxmox.com/wiki/QEMU/KVM_ACPI_Guest_Shutdown

In this case the Proxmox Shutdown Task will timeout after a few minutes. A similar thing happens when you use 'Reboot'.

If instead you do a 'Stop' or a 'Reset' it just stops the QEMU service, which is on par of pulling the (virtual) power chord.

If the QEMU guest agent is installed in the guest OS (and the option is enabled in the VM settings in Proxmox) then the Shutdown/Reboot setting will instead communicate with the agent and then the agent (instead of the OS) will initiate the shutdown procedure.
 
Last edited:
  • Like
Reactions: datschlatscher
Just if anybody is wondering. The standard timeout for shutting down a VM should be 60 seconds.

However, this is configurable and can be set to a shorter/longer value. (E.g. through the GUI in the VM Options > Start/Shutdown order > Shutdown delay)
 
  • Like
Reactions: B.Otto
What will happen when shutting down a VM with QEMU guest agent, the VM will then shutdown stopping the guest agent by doing that but then the shitdown somehow get stuck? Will PVE then send a ACPI command to forcefully stop that VM after the "Shutdown delay" timeout triggered or will the VM just be stuck forever because the guest agent can't be reached anymore? Atleast here it looks like the latter when stutting down a Win VM that wants to install updates.
 
To be honest, it is ridiculous that a command labeled as "Stop VM immediately" can be blocked by a failing "reboot" command. A "stop" command should be able to supersede any soft ACPI shutdown signals.

If instead you do a 'Stop' or a 'Reset' it just stops the QEMU service, which is on par of pulling the (virtual) power chord.

Categorically not true - if the VM is locked by a failing soft ACPI shutdown/reboot, it won't "just stop the QEMU service". It SHOULD be on par with pulling the power cord, but it isn't right now. It's more akin to "oh your server crashed and glued the power cord in place".
 
Last edited:
It SHOULD be on par with pulling the power cord, but it isn't right now. It's more akin to "oh your server crashed and glued the power cord in place".
Yes, that is what I had in mind. The issue seems to be that one is not able to communicate with the VM while it is booting. So the work around was to double click on the log, to get a new box with a stop button.

Ideally, the user interface could be improved, to keep track when a VM is in boot-mode vs running-mode, and to have a more pleasant user experience.

BUT, this happens rarely, the work-around is very feasible.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!