Restoring from backup failed

droidus

Well-Known Member
Apr 5, 2020
112
2
58
35
I went to restore a VM from backup from my NAS. It failed, with the following: "error before or during data restore, some or all disks were not completely restored. VM 103 state is NOT cleaned up.
TASK ERROR: unable to restore VM 103 - vm is running". I made sure to stop the VM before restore.

I went to re-attempt the restore, and get this error: "unable to restore VM 103 - can't lock file '/var/lock/qemu-server/lock-103.conf' - got timeout (500)". Not sure if it's safe to remove the lock file or not. The Icon next to the VM has a lock next to it. How do I proceed?
 
This usually happens due to stuck processes, unfinished operations, or storage issues.

Try manual unlocking:
qm unlock 103

This should remove the lock and allow normal operations.

Check running processes for that VM
ps aux | grep qemu | grep 103

If you find any, try stopping them with:
kill -9 <PID>


Remove the lock file manually
rm -rf /var/lock/qemu-server/lock-103.conf

The cleanup (delete partial restore or configs) and try again.
 
  • Like
Reactions: UdoB