Unable to delete VM due to lock file timeout

yuna.sung

New Member
Jun 27, 2024
5
0
1
Hello everyone,


I tried to shut down and delete a VM on Proxmox.
I initially planned to create a new VM using Terraform, but I realized there might be an issue due to the OpenID connection, so I stopped the VM creation.


Now, I want to delete the VM, but I’m getting this error:


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


I tried the following as root:


  • qm unlock 231
  • qm destroy 231
  • pct unlock 231

I also tried deleting the VM via the web UI, but the same error still appears.


Does anyone know how I can forcefully remove this VM?


Thanks in advance!
 
Hello,

you can try to delete the lock file manually (simple rm /var/lock/qemu-server/lock-231.conf) and afterwards the action against the vm should work.
 
  • Like
Reactions: yuna.sung