Stopping VM Locks Up VM and Host

Nollimox

Member
Mar 9, 2023
267
21
18
root@nolliprivatecloud:~# qm stop 100
trying to acquire lock...
can't lock file '/var/lock/qemu-server/lock-100.conf' - got timeout
root@nolliprivatecloud:~#

Why? Then, Proxmox locked up and one has to reboot.
 
It's an empty file:
root@nolliprivatecloud:~# nano /var/lock/qemu-server/lock-100.conf
GNU nano 7.2 /var/lock/qemu-server/lock-100.conf





root@nolliprivatecloud:~# ls /var/lock/qemu-server/
lock--1.conf
root@nolliprivatecloud:~#

The file says lock--1.conf...that's why the timeout...but, how did it wrote a different file name?
 
Last edited:
The VM config file is locked by a previous task on that VM, like a backup, a config change or, most probably, a shutdown command. The lock prevents race conditions that may affect both configuration and status. Make sure no task is really running regarding that VM. Sometimes the VM may stay locked when a task is aborted (seen with backups). In such cases you can use qm unlock VMID.
 
G
In such cases you can use qm unlock VMID.
Good to know, thank you for sharing. I had to remove the VM yesterday and reinstall Proxmox because of a certificate upload to certificate which removed the webgui accidentally...then after the Proxmox re-installation, I installed pfSense and restored config from back up...that locked up pfSense because the restoration config was the plus version. So, I reinstall pfsense again earlier when I ran into the issue...I need to re-register...all is good.
 

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!