Can't lock file on shutdown

invalidusername

New Member
Apr 3, 2023
4
0
1
I have been doing a bunch of packer VM development recently and have not had any issues. But all of the sudden I started having an issue when packer tries to do the final shutdown of the VM. Looking at the logs it attempts to do a shutdown but gives an error about it getting a timeout when trying to lock a file.

Code:
Aug 22 16:47:10 hv01 pvedaemon[1262]: <packer@pve!ansible01> starting task UPID:hv01:00001EA9:0003495F:64E51ECE:qmshutdown:103:packer@pve!ansible01:
Aug 22 16:47:10 hv01 pvedaemon[7849]: shutdown VM 103: UPID:hv01:00001EA9:0003495F:64E51ECE:qmshutdown:103:packer@pve!ansible01:
Aug 22 16:47:20 hv01 pvedaemon[7849]: can't lock file '/var/lock/qemu-server/lock-103.conf' - got timeout
Aug 22 16:47:20 hv01 pvedaemon[1262]: <packer@pve!ansible01> end task UPID:hv01:00001EA9:0003495F:64E51ECE:qmshutdown:103:packer@pve!ansible01: can't lock file '/var/lock/qemu-server/lock-103.conf' - got timeout
Aug 22 16:47:22 hv01 pvedaemon[7885]: shutdown VM 103: UPID:hv01:00001ECD:00034E14:64E51EDA:qmshutdown:103:packer@pve!ansible01:
Aug 22 16:47:22 hv01 pvedaemon[1261]: <packer@pve!ansible01> starting task UPID:hv01:00001ECD:00034E14:64E51EDA:qmshutdown:103:packer@pve!ansible01:
Aug 22 16:47:32 hv01 pvedaemon[7885]: can't lock file '/var/lock/qemu-server/lock-103.conf' - got timeout
Aug 22 16:47:32 hv01 pvedaemon[1261]: <packer@pve!ansible01> end task UPID:hv01:00001ECD:00034E14:64E51EDA:qmshutdown:103:packer@pve!ansible01: can't lock file '/var/lock/qemu-server/lock-103.conf' - got timeout
Aug 22 16:47:34 hv01 pvedaemon[1261]: <packer@pve!ansible01> starting task UPID:hv01:00001EE8:000352C9:64E51EE6:qmstop:103:packer@pve!ansible01:
Aug 22 16:47:34 hv01 pvedaemon[7912]: stop VM 103: UPID:hv01:00001EE8:000352C9:64E51EE6:qmstop:103:packer@pve!ansible01:
Aug 22 16:47:41 hv01 kernel: [ 2184.796892] vmbr2: port 5(tap103i0) entered disabled state
Aug 22 16:47:41 hv01 qmeventd[870]: read: Connection reset by peer

The funny thing is that it has no problem issuing the destroy command once it fails to shutdown.

I have not changed anything in proxmox, it might be a little out of date. I rebooted to see if will solve the problem, but nothing.

Anybody know how to fix this?
 
Seems like if a previous VM has been allocated on that VMID and removed it fails. But if I use a new VMID when creating the new VM that has never been allocated before I oes not fail.


pve-manager/7.3-6/723bb6ec (running kernel: 5.15.85-1-pve)
 

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!