cannot shutdown vm

rabol

New Member
Jun 20, 2025
17
0
1
Hi

why do I often get:

"TASK ERROR: can't lock file '/var/lock/qemu-server/lock-101.conf' - got timeout"

I would like to point out that going to the menu and pressing 'Shutdown' is not an accident, so when I want to shutdown a vm I press the button on purpose, so I would expect Proxmox to shutdown the vm.
 
In what state is the VM when you do this? Is a OS booted? Is QEMU Guest Agent enabled? Is it installed and running inside the guest?
 
Last edited:
Last case was while installing Ubuntu Desktop 25.04, I got a 'Invalid magic number error' - so i wanted to shoutdown the vm and upload a new iso.

IMO, Shutdown should shutdown no matter the state - What is the purpose of the Shutdown if it cannot shutdown ?
 
Please answer all questions. From what I understand shutdown gives a signal to the VM to initiate a graceful power off. Basically what the power button on a normal PC does. How that signal is sent and received depends if the guest agent is enabled or not and the state of the VM. If you're in the UEFI for example a shutdown request can potentially go unanswered. Can you share qm config VMIDHERE --current?
 
Last edited:
Shutdown tries a graceful shut down via QEMU Guest Agent or ACPI (depending on the VM settings and whether the agent is actually running inside the VM). Lots of things can interfere with that, including an incomplete installation or a VM that is in the boot menu (and no agent is running yet before the OS inside the VM is fully booted) or the OS inside the VM might not support the agent nor ACPI. Use Stop instead which does a hard turn off.

There have been discussion before about whether Proxmox should detect the QEMU Guest Agent automatically instead of a setting and whether Shutdown and/or Stop are the right names for what the buttons do. Regardless, currently Shutdown does not always work for various reasons.