Fix “Cannot Start VM or Console Due to TASK ERROR: Can’t Lock File ‘/var/lock/qemu-server/lock-#.conf’ – Got Timeout”

Purpose

This document will delineate the steps necessary to correct an issue where you cannot start, stop, or open the console of a VM due to the following error:

TASK ERROR: can't lock file '/var/lock/qemu-server/lock-#.conf' - got timeout

Assumptions

This document assumes you have administrative access to the shell of the problem node, and that the problem node is available on the network.

Cause

This is often caused by a console session not closing out correctly or a hangup when moving between tabs of console sessions.

Solution

qm unlock ###

where ### is the unique VM ID of the virtual machine or container. If this does not work alone, safely reboot the host following use of this command.

Author: griffethbarker

Griff is a tinkerer and manager of IT, consultant of IT and management, and continuous student of organizational development. His hobbies and interests include games of all types (video, board, dice, card, tabletop, etc.) as well as listening to music, photography, and writing. Find him on LinkedIn!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s