qm-unlock
Unlock locked Proxmox virtual machines or containers
TLDR
Unlock a specific virtual machine
SYNOPSIS
qm unlock
PARAMETERS
The virtual machine or container ID.
--dry-run
Do everything except the actual unlock.
--debug
Enable debug output during the unlock process.
DESCRIPTION
The `qm unlock` command is a utility within the Proxmox Virtual Environment (PVE) that forcefully removes the lock status from a virtual machine (VM) or container (LXC). VMs or containers can become locked if a previous operation (like migration, backup, or restore) failed or was interrupted, leaving them in an inconsistent state.
When a VM/container is locked, you cannot perform operations like starting, stopping, migrating, or backing it up. The `qm unlock` command forcibly removes this lock, allowing you to proceed. Use with extreme caution, as unlocking a VM or container while it's truly in an inconsistent state can lead to data corruption or other issues.
Always investigate the root cause of the lock before using `qm unlock`. Often, addressing the underlying issue that caused the lock (e.g., fixing network connectivity during a migration) is a safer approach. However, in situations where the initial problem has been resolved, and the lock persists, `qm unlock` provides a mechanism to regain control of the VM/container. Consider backing up your data if possible before using this command to mitigate any potential data loss.
CAVEATS
Using `qm unlock` can be dangerous if the VM or container is genuinely in an inconsistent state. Data corruption or other issues can occur. Always investigate the cause of the lock before unlocking. Backups are strongly recommended before using this command.
WHEN TO USE
Use `qm unlock` only when you are confident that the underlying issue that caused the lock has been resolved, and the VM/container is not in a critical operation (like writing data to disk).
If unsure, contact Proxmox support or consult the documentation.
TROUBLESHOOTING
If `qm unlock` fails, check the Proxmox VE system logs for more detailed error messages. These logs can provide clues as to why the unlock process is failing.
SEE ALSO
qm(1)