-
#1
Hi,
Im receiving this error on backup job:
CT is locked (snapshot-delete)
When i try to qm unlock, it fails.
Configuration file ‘nodes/n7/qemu-server/102.conf’ does not exist
-
#2
When i try to qm unlock, it fails.
Configuration file ‘nodes/n7/qemu-server/102.conf’ does not exist
Maybe you are on the wrong node?
-
#3
Maybe you are on the wrong node?
I’m not on the wrong node i checked it.
-
#4
Im receiving this error on backup job:
CT is locked (snapshot-delete)When i try to qm unlock, it fails.
Configuration file ‘nodes/n7/qemu-server/102.conf’ does not exist
@Talha
pct unlock <ID>
qm manages the qemu VMs while pct is for containers (lxc). To unlock containers you need to use command:
pct unlock <ID>
More info on pct commands below
https://pve.proxmox.com/pve-docs/pct.1.html
Last edited: Apr 25, 2022
Содержание
- How to Unlock a Proxmox VM
- Proxmox Locked VM Errors
- Error: VM is locked
- can’t lock file ‘/var/lock/qemu-server/lock- .conf’ – got timeout
- Proxmox Unlock VM Methods
- qm unlock
- Manually Deleting the Lock
- TASK ERROR: VM is locked (snapshot)
- dison4linux
- t.lamprecht
- dison4linux
- t.lamprecht
- dison4linux
- dison4linux
- dietmar
- About
- Quick Navigation
- Get your subscription!
- Snapshot delete is stuck
- Ahmet Bas
- Ahmet Bas
- fiona
- Ahmet Bas
- fiona
- Ahmet Bas
- fiona
- TASK ERROR: VM is locked (backup)
- jmjosebest
- jmjosebest
- PC Rescue
- RollMops
- fabian
- RollMops
- fabian
- RollMops
- Backup of VM 134 failed — CT is locked (snapshot-delete)
- UweOhse
How to Unlock a Proxmox VM
From time to time, you’ll come across the need to kill a lock on your Proxmox server. Fear not, in today’s guide we’ll discuss the various lock errors you may face and how to unlock a Proxmox VM.
Proxmox Locked VM Errors
Error: VM is locked
The «VM is locked» error is the most common circumstance in which you may want to kill a VM lock. This error has a lot of variants including:
- Error: VM is locked (backup)
- Error: VM is locked (snapshot)
- Error: VM is locked (clone)
Error: VM is locked in Proxmox
As you can see, they all share the same «Error: VM is locked» root, but with a suffix that indicates the task that initiated the lock, whether that task be a backup, a snapshot, or clone. This can be useful for determining IF you should clear the lock. (i.e. if the backup job is still running, you probably shouldn’t clear the lock and just let the backup process complete).
can’t lock file ‘/var/lock/qemu-server/lock- .conf’ – got timeout
This is another common error, often seen when you’re trying to shutdown/stop a virtual machine or when qm unlock fails (see below).
Proxmox Unlock VM Methods
There are two main ways of clearing a lock on a Proxmox VM: 1) using the qm unlock command and 2) manually deleting the lock.
qm unlock
qm unlock should be your first choice for unlocking a Proxmox VM.
First, find your VM ID (it’s the number next to your VM in the Proxmox GUI). If you’re not using the WebGUI, you can obtain a list of your VM IDs with:
Unlock the VM/kill the lock with:
Now, this may not always work, and the command may fail with:
In that case, let’s move on to plan B: manually deleting the lock.
Manually Deleting the Lock
If you received the error message, «can’t lock file ‘/var/lock/qemu-server/lock- .conf’ — got timeout», you can fix this by manually deleting the lock at that location. Simply put, you can just run the following command:
Obviously, this should be a last resort. It’s generally not a great practice to go around killing locks, but sometimes you have no choice.
I hope this guide helped you out. Let me know if you have any questions or feel I left something out in the comments/forums below!
Источник
TASK ERROR: VM is locked (snapshot)
dison4linux
Active Member
Unable to take new snapshots/backups because there seems to be a snapshot in progress.
I’ve rebooted to the hypervisor, no change.
The snapshots tab shows a ‘vzdump’ snapshot with a status of ‘prepare’
t.lamprecht
Proxmox Staff Member
Best regards,
Thomas
Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation
dison4linux
Active Member
I think that got me a little further, but no joy on a new snapshot yet.
t.lamprecht
Proxmox Staff Member
Using our pct snapshot command works?
Best regards,
Thomas
Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation
dison4linux
Active Member
It works to create a new one, but not to remove the troublesome one.
dison4linux
Active Member
For what it’s worth the backup process seems unable to delete the snapshot as well:
dietmar
Proxmox Staff Member
Best regards,
Dietmar
Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation
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!
Quick Navigation
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 your own in 60 seconds.
Источник
Snapshot delete is stuck
Ahmet Bas
Active Member
We are currently running Proxmox version 6.4-14 with ZFS. We get frequently that VMs get locked during snapshot deletion. When I check the VM task history I see this:
Ahmet Bas
Active Member
fiona
Proxmox Staff Member
Best regards,
Fiona
Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation
Ahmet Bas
Active Member
Can you elaborate this? How can we achieve this?
fiona
Proxmox Staff Member
Sorry, I meant how big the disks attached to the VM are.
By using zvols, i.e. creating the disks on the ZFS storage directly. You need to add the ZFS to Proxmox VE’s storage configuration ( Datacenter > Storage > Add > ZFS ) if you didn’t do so already.
Best regards,
Fiona
Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation
Ahmet Bas
Active Member
It’s a 400GB disk. The snapshot is made without RAM.
Sorry, I meant how big the disks attached to the VM are.
By using zvols, i.e. creating the disks on the ZFS storage directly. You need to add the ZFS to Proxmox VE’s storage configuration ( Datacenter > Storage > Add > ZFS ) if you didn’t do so already.
fiona
Proxmox Staff Member
It’s a 400GB disk. The snapshot is made without RAM.
This is already done. The storage is added as a ZFS storage to the Proxmox cluster.
It’s not possible to create a qcow2 image on a storage of type zfspool via PVE API.
I’d guess that the qcow2 images are on a storage of type dir . Please check the type with pvesm status and have a look at the documentation.
If the disks are on a storage of type zfspool , the qmp command should not be invoked by Proxmox VE. Instead it will use ZFS’s snapshot feature.
Best regards,
Fiona
Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation
Источник
TASK ERROR: VM is locked (backup)
jmjosebest
Active Member
Hi, after a full host restart I get this error starting a virtual machine KVM.
TASK ERROR: VM is locked (backup)
/var/lib/vz/lock is empty.
How can I unlock?
Thanks
jmjosebest
Active Member
PC Rescue
New Member
RollMops
Active Member
fabian
Proxmox Staff Member
Best regards,
Fabian
Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation
RollMops
Active Member
fabian
Proxmox Staff Member
check the system logs around the time of the failed backup, try manually backing up the VM a couple of times and check for failure.
it might have been a one time fluke.
Best regards,
Fabian
Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation
RollMops
Active Member
I can provoke a system crash by manually starting a backup of the VE that I use to find in a locked state.
After 1 or 2 mins., process z_wr_iss takes 97% CPU and subsequently the server fails. It then automatically reboots, but the VE is still locked from the pending/failed backup process and does not automatically recover.
I attach a screenshot of the last state seen in «top».
Could this be prevented by adding some RAM to the box?
Источник
Backup of VM 134 failed — CT is locked (snapshot-delete)
UweOhse
New Member
the backup of one container fails with the message in the title.
when i «pct unlock» it, the next backup works (i used the backup for development purposes, and i’m quite sure that the backup is complete).
That container is the largest one on the machine, one of the two important ones, and the one which has two filesystems (for quite stupid reasons). It also is replicated to another machine.
In the logfiles (log.txt, attached) i found that:
zfs error: cannot destroy snapshot tank/compressed/subvol-134-disk-1@vzdump: dataset is busy
Status as of now:
System:
pve 6.3-3 (Update coming, possibly even soon)
Linux 5.4.78-2-pve
Backup Server pbs 1.1-5
There was nothing in the current kernel/system logs, there are no zfs entries, and there is just on log entry related to the volume in this months kernel logs:
May 3 17:45:07 x9 pvesr[5687]: 134-0: got unexpected replication job error — command ‘set -o pipefail && pvesm export compressed:subvol-134-disk-1 zfs — -with-snapshots 1 -snapshot __replicate_134-0_1620055939__ -base __replicate_134-0_1620054180__ | /usr/bin/cstream -t 50000000 | /usr/bin/ssh -e none -o ‘BatchMode=yes’ -o ‘HostKeyAlias=PBSHOST’ root@IPV6 — pvesm import compressed:subvol-134-disk-1 zfs — -with-snapshots 1 -allow-rename 0 -base __replicate_134-0_1620054180__’ failed: exit code 255
The replication target server went down for hardware reasons.
Will updating to 6.4 help? If not, what can i do to debug this?
Источник
Habe erst jetzt bemerkt, dass seit ca. 2 Wochen das backup in proxmox nicht fehlerfrei durchläuft.
Bekomme folgende Fehlermeldung:
CT ist locked ?
Was bedeutet dies ? Hier sieht man ein Schloss ?
Ich kann hier auch kein händisches backup starten ?
Habe hier etwas dazu gefunden:
https://dannyda.com/2020/05/23/how-to-fix-ct-is-locked-rollback-on-proxmox-ve-pve-how-to-unlock-container-ct-on-proxmox-ve/
Bekomme aber bei Einstieg über die shell und Eingabe pct unlock 200 folgende Fehlermeldung.
login as: karl
karl@192.168.1.177's password:
Linux LXC-INFLUXDB-192 5.4.143-1-pve #1 SMP PVE 5.4.143-1 (Tue, 28 Sep 2021 09:10:37 +0200) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri May 6 14:40:37 2022 from 192.168.1.3
karl@LXC-INFLUXDB-192:~$ pct unlock 200
-bash: pct: command not found
karl@LXC-INFLUXDB-192:~$
Vielen Dank für die Hilfe.
LG
Karl
INFO: starting new backup job: vzdump 100 200 210 --mode snapshot --compress zstd --mailnotification always --node NUC --quiet 1 --mailto karl.goetschhofer@gmail.com --storage usb_backup_120GB
INFO: Starting Backup of VM 100 (qemu)
INFO: Backup started at 2022-04-29 21:00:02
INFO: status = running
INFO: VM Name: VM-IOBROKER-192.168.1.140
INFO: include disk 'scsi0' 'local-lvm:vm-100-disk-0' 20G
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: creating vzdump archive '/media/usb_backup/dump/vzdump-qemu-100-2022_04_29-21_00_02.vma.zst'
INFO: started backup task '1d748c56-d60c-4e19-a028-7b8aaa6b40a1'
INFO: resuming VM again
INFO: 1% (290.0 MiB of 20.0 GiB) in 3s, read: 96.7 MiB/s, write: 44.5 MiB/s
INFO: 2% (464.0 MiB of 20.0 GiB) in 6s, read: 58.0 MiB/s, write: 45.3 MiB/s
INFO: 3% (648.9 MiB of 20.0 GiB) in 9s, read: 61.6 MiB/s, write: 39.5 MiB/s
INFO: 4% (880.9 MiB of 20.0 GiB) in 12s, read: 77.3 MiB/s, write: 22.3 MiB/s
INFO: 5% (1.0 GiB of 20.0 GiB) in 15s, read: 52.1 MiB/s, write: 38.6 MiB/s
INFO: 6% (1.2 GiB of 20.0 GiB) in 19s, read: 49.7 MiB/s, write: 26.1 MiB/s
INFO: 7% (1.4 GiB of 20.0 GiB) in 24s, read: 39.9 MiB/s, write: 33.8 MiB/s
INFO: 8% (1.6 GiB of 20.0 GiB) in 30s, read: 34.4 MiB/s, write: 25.4 MiB/s
INFO: 9% (2.0 GiB of 20.0 GiB) in 35s, read: 73.2 MiB/s, write: 31.3 MiB/s
INFO: 11% (2.3 GiB of 20.0 GiB) in 38s, read: 102.7 MiB/s, write: 52.1 MiB/s
INFO: 15% (3.0 GiB of 20.0 GiB) in 41s, read: 268.2 MiB/s, write: 32.5 MiB/s
INFO: 16% (3.2 GiB of 20.0 GiB) in 51s, read: 16.7 MiB/s, write: 15.9 MiB/s
INFO: 17% (3.4 GiB of 20.0 GiB) in 1m 1s, read: 19.9 MiB/s, write: 17.3 MiB/s
INFO: 18% (3.6 GiB of 20.0 GiB) in 1m 15s, read: 15.0 MiB/s, write: 15.0 MiB/s
INFO: 19% (3.8 GiB of 20.0 GiB) in 1m 27s, read: 16.9 MiB/s, write: 15.5 MiB/s
INFO: 20% (4.0 GiB of 20.0 GiB) in 1m 37s, read: 20.3 MiB/s, write: 15.8 MiB/s
INFO: 21% (4.3 GiB of 20.0 GiB) in 1m 40s, read: 89.4 MiB/s, write: 52.1 MiB/s
INFO: 22% (4.4 GiB of 20.0 GiB) in 1m 43s, read: 49.5 MiB/s, write: 40.9 MiB/s
INFO: 23% (4.6 GiB of 20.0 GiB) in 1m 51s, read: 25.4 MiB/s, write: 24.5 MiB/s
INFO: 24% (4.8 GiB of 20.0 GiB) in 1m 58s, read: 30.3 MiB/s, write: 18.8 MiB/s
INFO: 25% (5.0 GiB of 20.0 GiB) in 2m 5s, read: 31.8 MiB/s, write: 26.4 MiB/s
INFO: 26% (5.2 GiB of 20.0 GiB) in 2m 10s, read: 34.1 MiB/s, write: 29.2 MiB/s
INFO: 27% (5.4 GiB of 20.0 GiB) in 2m 22s, read: 16.9 MiB/s, write: 16.4 MiB/s
INFO: 28% (5.7 GiB of 20.0 GiB) in 2m 33s, read: 30.0 MiB/s, write: 16.1 MiB/s
INFO: 29% (5.8 GiB of 20.0 GiB) in 2m 37s, read: 19.9 MiB/s, write: 16.9 MiB/s
INFO: 30% (6.0 GiB of 20.0 GiB) in 2m 48s, read: 18.8 MiB/s, write: 16.2 MiB/s
INFO: 31% (6.2 GiB of 20.0 GiB) in 2m 51s, read: 76.1 MiB/s, write: 37.7 MiB/s
INFO: 32% (6.4 GiB of 20.0 GiB) in 2m 56s, read: 35.5 MiB/s, write: 28.5 MiB/s
INFO: 33% (6.6 GiB of 20.0 GiB) in 3m 5s, read: 23.8 MiB/s, write: 19.5 MiB/s
INFO: 34% (6.8 GiB of 20.0 GiB) in 3m 17s, read: 16.6 MiB/s, write: 16.6 MiB/s
INFO: 35% (7.0 GiB of 20.0 GiB) in 3m 28s, read: 19.8 MiB/s, write: 16.2 MiB/s
INFO: 36% (7.2 GiB of 20.0 GiB) in 3m 40s, read: 15.7 MiB/s, write: 15.7 MiB/s
INFO: 37% (7.4 GiB of 20.0 GiB) in 3m 54s, read: 15.3 MiB/s, write: 15.3 MiB/s
INFO: 38% (7.6 GiB of 20.0 GiB) in 4m 7s, read: 15.3 MiB/s, write: 15.3 MiB/s
INFO: 39% (7.9 GiB of 20.0 GiB) in 4m 15s, read: 40.3 MiB/s, write: 16.5 MiB/s
INFO: 40% (8.0 GiB of 20.0 GiB) in 4m 20s, read: 16.7 MiB/s, write: 16.7 MiB/s
INFO: 41% (8.3 GiB of 20.0 GiB) in 4m 23s, read: 103.9 MiB/s, write: 67.0 MiB/s
INFO: 42% (8.4 GiB of 20.0 GiB) in 4m 27s, read: 36.2 MiB/s, write: 30.2 MiB/s
INFO: 43% (8.6 GiB of 20.0 GiB) in 4m 37s, read: 18.5 MiB/s, write: 18.1 MiB/s
INFO: 44% (8.8 GiB of 20.0 GiB) in 4m 49s, read: 15.4 MiB/s, write: 15.4 MiB/s
INFO: 45% (9.0 GiB of 20.0 GiB) in 5m 2s, read: 16.5 MiB/s, write: 16.5 MiB/s
INFO: 46% (9.2 GiB of 20.0 GiB) in 5m 14s, read: 16.3 MiB/s, write: 15.7 MiB/s
INFO: 47% (9.4 GiB of 20.0 GiB) in 5m 26s, read: 16.9 MiB/s, write: 16.3 MiB/s
INFO: 48% (9.6 GiB of 20.0 GiB) in 5m 38s, read: 16.9 MiB/s, write: 16.5 MiB/s
INFO: 49% (9.8 GiB of 20.0 GiB) in 5m 51s, read: 16.1 MiB/s, write: 16.1 MiB/s
INFO: 50% (10.1 GiB of 20.0 GiB) in 5m 57s, read: 41.1 MiB/s, write: 15.9 MiB/s
INFO: 51% (10.3 GiB of 20.0 GiB) in 6m, read: 85.8 MiB/s, write: 46.7 MiB/s
INFO: 52% (10.5 GiB of 20.0 GiB) in 6m 3s, read: 74.9 MiB/s, write: 42.1 MiB/s
INFO: 53% (10.6 GiB of 20.0 GiB) in 6m 7s, read: 30.8 MiB/s, write: 18.4 MiB/s
INFO: 58% (11.8 GiB of 20.0 GiB) in 6m 10s, read: 387.9 MiB/s, write: 24.0 MiB/s
INFO: 60% (12.1 GiB of 20.0 GiB) in 6m 13s, read: 125.7 MiB/s, write: 46.5 MiB/s
INFO: 61% (12.3 GiB of 20.0 GiB) in 6m 16s, read: 52.1 MiB/s, write: 41.7 MiB/s
INFO: 62% (12.5 GiB of 20.0 GiB) in 6m 19s, read: 60.3 MiB/s, write: 44.6 MiB/s
INFO: 63% (12.6 GiB of 20.0 GiB) in 6m 22s, read: 53.2 MiB/s, write: 44.8 MiB/s
INFO: 64% (12.8 GiB of 20.0 GiB) in 6m 27s, read: 36.2 MiB/s, write: 28.2 MiB/s
INFO: 67% (13.4 GiB of 20.0 GiB) in 6m 30s, read: 206.6 MiB/s, write: 14.2 MiB/s
INFO: 71% (14.2 GiB of 20.0 GiB) in 6m 33s, read: 282.8 MiB/s, write: 46.8 MiB/s
INFO: 75% (15.1 GiB of 20.0 GiB) in 6m 36s, read: 279.1 MiB/s, write: 32.2 MiB/s
INFO: 80% (16.2 GiB of 20.0 GiB) in 6m 39s, read: 380.6 MiB/s, write: 36.7 MiB/s
INFO: 82% (16.4 GiB of 20.0 GiB) in 6m 42s, read: 77.3 MiB/s, write: 49.3 MiB/s
INFO: 85% (17.0 GiB of 20.0 GiB) in 6m 45s, read: 214.2 MiB/s, write: 48.9 MiB/s
INFO: 86% (17.3 GiB of 20.0 GiB) in 6m 48s, read: 79.4 MiB/s, write: 31.7 MiB/s
INFO: 100% (20.0 GiB of 20.0 GiB) in 6m 51s, read: 934.8 MiB/s, write: 22.6 MiB/s
INFO: backup is sparse: 11.02 GiB (55%) total zero data
INFO: transferred 20.00 GiB in 411 seconds (49.8 MiB/s)
INFO: archive file size: 5.98GB
INFO: removing backup 'usb_backup_120GB:backup/vzdump-qemu-100-2022_04_19-21_00_01.vma.zst'
INFO: Finished Backup of VM 100 (00:06:52)
INFO: Backup finished at 2022-04-29 21:06:54
INFO: Starting Backup of VM 200 (lxc)
INFO: Backup started at 2022-04-29 21:06:54
INFO: status = running
ERROR: Backup of VM 200 failed - CT is locked (snapshot-delete)
INFO: Failed at 2022-04-29 21:06:54
INFO: Starting Backup of VM 210 (lxc)
INFO: Backup started at 2022-04-29 21:06:54
INFO: status = running
**ERROR: Backup of VM 210 failed - CT is locked (snapshot-delete)**
INFO: Failed at 2022-04-29 21:06:54
INFO: Backup job finished with errors
TASK ERROR: job errors
From time to time, you’ll come across the need to kill a lock on your Proxmox server. Fear not, in today’s guide we’ll discuss the various lock errors you may face and how to unlock a Proxmox VM.
Proxmox Locked VM Errors
Error: VM is locked
The «VM is locked» error is the most common circumstance in which you may want to kill a VM lock. This error has a lot of variants including:
- Error: VM is locked (backup)
- Error: VM is locked (snapshot)
- Error: VM is locked (clone)
As you can see, they all share the same «Error: VM is locked» root, but with a suffix that indicates the task that initiated the lock, whether that task be a backup, a snapshot, or clone. This can be useful for determining IF you should clear the lock. (i.e. if the backup job is still running, you probably shouldn’t clear the lock and just let the backup process complete).
can’t lock file ‘/var/lock/qemu-server/lock-<VMID>.conf’ – got timeout
This is another common error, often seen when you’re trying to shutdown/stop a virtual machine or when qm unlock
fails (see below).
Proxmox Unlock VM Methods
There are two main ways of clearing a lock on a Proxmox VM: 1) using the qm unlock command and 2) manually deleting the lock.
qm unlock
qm unlock
should be your first choice for unlocking a Proxmox VM.
First, find your VM ID (it’s the number next to your VM in the Proxmox GUI). If you’re not using the WebGUI, you can obtain a list of your VM IDs with:
cat /etc/pve/.vmlist
Unlock the VM/kill the lock with:
qm unlock <VMID>
Now, this may not always work, and the command may fail with:
trying to acquire lock...
can't lock file '/var/lock/qemu-server/lock-<VMID>.conf' - got timeout
In that case, let’s move on to plan B: manually deleting the lock.
Manually Deleting the Lock
If you received the error message, «can’t lock file ‘/var/lock/qemu-server/lock-<VMID>.conf’ — got timeout», you can fix this by manually deleting the lock at that location. Simply put, you can just run the following command:
rm /var/lock/qemu-server/lock-<VMID>.conf
Obviously, this should be a last resort. It’s generally not a great practice to go around killing locks, but sometimes you have no choice.
I hope this guide helped you out. Let me know if you have any questions or feel I left something out in the comments/forums below!