Stopping VM Locks Up VM and Host

Nollimox

Member
Mar 9, 2023
273
24
23
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.