About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
When a start, stop or change on a VM ends with TASK ERROR: VM is locked (backup), the VM's configuration carries the line lock: backup. Proxmox VE sets it when a backup of the VM begins and removes it when the backup ends. Either a backup is still running, or one ended without cleaning up. Check for a running backup first. Only when none is running does qm unlock <vmid> remove the lock. A related message, can't lock file '/var/lock/qemu-server/lock-100.conf' - got timeout, is a different fault, and qm unlock does not cure it.
What the error means
The lock property of a VM takes one of backup, clone, create, import, migrate, rollback, snapshot, snapshot-delete, suspended or suspending, according to the qm(1) manual page, which describes it as "Lock/unlock the VM". The word in brackets names the operation that set the lock.
In the pve-guest-common source, check_lock stops an operation with VM is locked and the lock value in brackets, and the task log shows it after TASK ERROR:. In the qemu-server source, a start, a stop, a reset and a configuration change make this check unless --skiplock is used, which the qm manual limits to root.
For a backup, the vzdump code in pve-manager locks the VM ("prevent config changes") right after it checks the VM's state. The qemu-server plugin sets the lock backup, and the cleanup at the end of the task removes it. A task killed before cleanup, a node that reset mid-backup or a power loss leaves the lock behind.
The second message has another source. The configuration of each VM is guarded by a lock file, /var/lock/qemu-server/lock-<vmid>.conf. The pve-guest-common code waits 10 seconds for that file's lock, and pve-common reports a failure as can't lock file '...' - got timeout. qm unlock runs inside the same wait, so a VM in this state cannot be unlocked until the holder lets go. This is a reading of the source, not a statement in the documentation.
A third wait has a similar name and is not the same thing. The vzdump page lists lockwait, default 180, as the "Maximal time to wait for the global lock (minutes)", and the pve-manager code logs trying to get global lock - waiting... while a backup waits for its turn. That global lock sits between backup runs on a node. It does not set or remove the lock: backup line of a VM.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| A backup of the VM is running | VM is locked (backup) when you act on the VM during the backup window |
A vzdump task shows in the Log panel, or pgrep -af 'UPID:.*:vzdump:' lists one. A job over several guests has no VM number in its task ID, so look at every vzdump task, not only one named for VM 100 |
| A backup ended without removing its lock | The same message, with no backup running | qm config 100 shows lock: backup, and no vzdump task of any kind is running on any node (step 2) |
| Another task holds the configuration lock file | can't lock file ... got timeout after about 10 seconds |
A task that touches the VM is running; look in the Log panel and with the commands of step 2 |
| A different lock (snapshot, clone, migrate and so on) | VM is locked (snapshot), or another word in brackets |
qm config shows a lock: value other than backup |
Prove the cause before changing anything
All of these only read.
- Show the lock on the VM. The qm manual says
qm configprints the configuration with pending changes applied:
qm config 100
A good result for a stale lock is a lock: backup line. The word after lock: decides which row of the table applies.
- Look for a running backup task of any kind, not only one named for VM 100. In the web interface, the Log panel at the bottom displays "log entries for recent tasks", the most recent tasks "from all cluster nodes". From a shell, our own advice is to list processes and active tasks. The pve-common source sets each task worker's process title to
task <UPID>. The pvenode page shows a task ID such asUPID:pve1:00010D94:001CA6EA:6124E1B9:vzdump:100:root@pam:. Reading PVE/API2/VZDump.pm in pve-manager, the VM number is put in that ID only when the job covers exactly one guest on that node. A job over several guests on the node, or all guests, leaves that field empty, so its task ID ends:vzdump::root@pam:and a search forvzdump:100:does not find it. This is a reading of the source, not a statement in the documentation. Search for every vzdump task instead:
pgrep -af 'UPID:.*:vzdump:'
pvenode task list --source active --typefilter vzdump
pgrep -a prints the full command line and -f matches against it. The pvenode manual describes the command as "Read task list for one node (finished tasks).", yet it lists --source <active | all | archive> and describes --typefilter as "Only list tasks of this type (e.g., vzstart, vzdump)."; our reading is that active lists the tasks running now, which the manual does not state. Any line printed is a running backup that may include VM 100: open it in the Log panel and read which guests it covers.
No output from these two commands is not proof that no backup is running. They see one node, and they rely on the process title and the task type from the source. Also read the Log panel for a running vzdump task on every node before you treat the lock as stale.
- Read how the last backup ended. The pvenode manual lists finished tasks and prints a task's log:
pvenode task list --errors --vmid 100
pvenode task log UPID:pve01:00010D94:001CA6EA:6124E1B9:vzdump:100:root@pam:
A task that ended in error, or one that has no end, points to the backup that left the lock.
Fix
A backup is running. Wait for it to finish; the lock is removed at its end. The Administration Guide says: "It is also possible to abort a running task there." Our advice: aborting a running backup is itself a risk, because the aborted task can leave the lock behind, which is the fault this page is about. After an abort, read qm config 100 again to see whether the lock line is gone. Do not unlock a VM while its backup runs: the lock exists to prevent configuration changes during it.
A backup ended without cleanup. The qm(1) page, in its Locks section, says: "Online migrations, snapshots and backups (vzdump) set a lock to prevent incompatible concurrent actions on the affected VMs. Sometimes you need to remove such a lock manually (for example after a power failure)." It adds: "Only do that if you are sure the action which set the lock is no longer running." The Backup and Restore page gives the same precondition in its Failed Restores section: "Make sure that no task of the guest is still running". Select and show the exact lock with step 1 above, and confirm that step 2 found no running vzdump task and that the Log panel shows none on any node. First save the current state:
qm config 100 > qm-100-config-before.txt
Disruptive step: the next command removes the lock from the configuration of VM 100, whatever operation set it. If a backup, including one over several guests, is in fact still running, the VM can then be changed during it. The lock line should not be put back, because a stale lock is the fault. The saved file records its old value, and the next backup of the VM sets its lock again by itself.
qm unlock 100
The config lock times out. Find the task that holds the lock with step 2 and wait for it. qm unlock cannot take the lock file while the holder keeps it.
A lock other than backup. The word in brackets names a different operation, such as a snapshot or a migration. Find that operation and let it finish; the vzdump advice above does not apply to it.
Example (illustrative): the node pve01 hosts VM 100. Starting it from the web interface ends with TASK ERROR: VM is locked (backup). qm config 100 shows lock: backup. pgrep -af 'UPID:.*:vzdump:' and pvenode task list --source active --typefilter vzdump print nothing, and the Log panel shows no running backup on any node. pvenode task list --errors --vmid 100 lists last night's vzdump task with an error status, and pvenode task log for it stops part-way, at the time the node was restarted for patching. The engineer saves qm config 100, runs qm unlock 100, and starts the VM.
Confirm the fix
qm config 100no longer shows alock:line.- The action that failed now runs, for example the VM starts.
- The next backup of VM 100 ends without error:
pvenode task list --vmid 100shows it as finished, andpvenode task logshows no lock message. A backup job over several guests has no VM number in its task ID, so find that one in the Log panel. - For the timeout case, the action no longer reports
can't lock file.
What to watch afterwards
- Find out why the backup ended without cleanup. A node reboot or power loss during the backup window explains it, and
pvenode task logon the failed task shows how far it got. - Keep patching and reboots outside the backup window, or stop to check for running vzdump tasks before restarting a node.
- If the backup storage went offline mid-run, see Proxmox VE "storage 'x' is not online" and "unable to activate storage": find which check failed.
- Write down the lock value, the time and who ran
qm unlockin the change log, so the next engineer can tell a one-off from a pattern. - When unlocking becomes routine, treat the lock as a symptom and look for what keeps killing the backup.
Read next
Related articles you may want next.
- Backup & RecoveryProxmox backup 'dirty-bitmap status: created new': why the whole disk was readProxmox VE logs 'dirty-bitmap status: created new' and reads the whole disk. What the line means, what resets the bitmap, and how to check your own job.Read article
- Backup & RecoveryProxmox Backup Server verify failed: corrupt or missing chunks and what to doWhat a failed Proxmox Backup Server verify means, how to find the bad or missing chunk, and how to repair with resync-corrupt or a fresh backup.Read article
- TroubleshootingA snapshot removal or consolidation task is stuck, or fails with a lock errorFind which host, process or backup proxy holds the disk file behind a stuck snapshot removal or consolidation, prove it, and clear it through scoped recovery decisions.Read article
Risks and limits
- These commands have not been run or lab-tested.
- The qm manual lists the lock values but does not say what each one protects, so the table treats only
backupas understood. - The reading of the source applies to the commits named in the front matter. Releases may differ.
- The pgrep method relies on the worker's process title, and the VM number in a task ID relies on the job's guest count on that node. Both come from the source and not from the documentation, so an empty result is not proof.
- Unlocking does not repair a half-finished backup. It only removes the lock.
NetLeverage includes a daily full disaster-recovery backup of each hosted server at no extra charge. Talk to an engineer.
Sources
- qm(1) — Proxmox VE documentation, version 9.3.1, 25 November 2026, accessed 2 December 2026
- Backup and Restore — Proxmox VE documentation, version 9.3.1, 25 November 2026, accessed 2 December 2026
- pvenode(1) — Proxmox VE documentation, version 9.3.1, 25 November 2026, accessed 2 December 2026
- Proxmox VE Administration Guide — Proxmox VE documentation, version 9.3.1, 25 November 2026, accessed 2 December 2026
- pgrep(1) — procps-ng manual page, 29 December 2025, accessed 2 December 2026
- src/PVE/AbstractConfig.pm, pve-guest-common commit 17c2695 — Proxmox source, no date shown, accessed 2 December 2026
- src/PVE/CLI/qm.pm, qemu-server commit 2f13e34 — Proxmox source, no date shown, accessed 2 December 2026
- src/PVE/API2/Qemu.pm, qemu-server commit 2f13e34 — Proxmox source, no date shown, accessed 2 December 2026
- src/PVE/QemuServer.pm, qemu-server commit 2f13e34 — Proxmox source, no date shown, accessed 2 December 2026
- src/PVE/QemuConfig.pm, qemu-server commit 2f13e34 — Proxmox source, no date shown, accessed 2 December 2026
- src/PVE/VZDump/QemuServer.pm, qemu-server commit 2f13e34 — Proxmox source, no date shown, accessed 2 December 2026
- PVE/VZDump.pm, pve-manager commit e5ac6d6 — Proxmox source, no date shown, accessed 2 December 2026
- PVE/API2/VZDump.pm, pve-manager commit e5ac6d6 — Proxmox source, no date shown, accessed 2 December 2026
- src/PVE/Tools.pm, pve-common commit 54925b0 — Proxmox source, no date shown, accessed 2 December 2026
- src/PVE/RESTEnvironment.pm, pve-common commit 54925b0 — Proxmox source, no date shown, accessed 2 December 2026
This article was originally published on .