Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / Virtualization / Proxmox / Force Stop an Unresponsive VM on Proxmox

October 10, 2025

Force Stop an Unresponsive VM on Proxmox

Let’s look at how to shut down or reboot a frozen virtual machine on a Proxmox host if it doesn’t respond to the Reboot, Stop or Reset commands in the web interface.

In my case, when trying to power off the Proxmox virtual machine, an error appeared:

trying to acquire lock...
TASK ERROR: can't lock file '/var/lock/qemu-server/lock-152.conf' - got timeout

proxmox vm unresponsive - can't lock file timeout

This error can also be found in the log file /var/log/pve/tasks/active

In my case, the VM doesn’t respond to the reset or forced shutdown commands from the Proxmox web interface.

A virtual machine may sometimes be locked due to ongoing operations, such as backups, cloning, or snapshot management. The task description will explain why the task has been locked. Just wait for the task to finish.

  • Error: VM is locked (backup)
  • VM is locked (snapshot)
  • VM is locked (clone)

Task error: VM is locked due to snapshot delete

There are two commands available in the Proxmox host console to stop a running VM.

# qm shutdown <vmid>

This command is similar to briefly pressing the computer’s physical power button. This sends an ACPI signal to the operating system, initiating a graceful shutdown process. This is a safe way to gracefully shutdown a virtual machine, but it requires the QEMU guest agent to be installed and running in the guest OS.

There is a similar command that can be used to force a guest OS to reboot via guest tools:

# qm reboot <vmid>

A forced shutdown command for a VM is similar to powering off a physical computer:

# qm stop <vmid>

When you run this command, you will receive an error containing the name of the file that cannot be unlocked:

# qm stop 152

trying to acquire lock...
can't lock file '/var/lock/qemu-server/lock-152.conf' - got timeout

qm stop

Let’s try to remove all VM locks:

# qm unlock 152

trying to acquire lock...
can't lock file '/var/lock/qemu-server/lock-102.conf' - got timeout

If the lock is not removed, you will need to delete the referenced lock file.

# rm -f /var/lock/qemu-server/lock-103.conf

Stop the VM:

# qm stop 103

qm unlock VM

Using a forced shutdown method may result in the loss of any unsaved data on the virtual machine’s disks.

If nothing else helps, you can forcefully kill the VM process. To get the process ID (PID) of a running virtual machine, list VMs on the host:

# qm list

qm list - get VM PID

As you can see here, the VM is running (STATUS = Running) in the process with PID = 23549.

Or get the PID by filtering processes using the VMID of the unresponsive virtual machine:

# ps aux | grep "/usr/bin/kvm -id 152"

get VMID from ps

# kill -9 VM_PID

Check that the VM is stopped:

VM stopped

The qm stop and qm shutdown commands only work when QEMU Guest Tools are installed on the guest operating system. You can check whether the QEMU agent is available in a VM by entering its ID:

# qm agent 152 ping

QEMU guest agent is not running

qm agent 152 ping

0 comment
0
Facebook Twitter Google + Pinterest
ProxmoxQuestions and Answers
previous post
Configure Autostart and Boot Order for VMs on Proxmox

Related Reading

How to Migrate (Import) VMs from VMware ESXi...

July 24, 2024

Proxmox: Share a Host Directory with VMs via...

August 21, 2025

Create a Windows Server VM on Proxmox (Step-by-Step)

July 15, 2025

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Resource Fair Sharing in Windows Server Remote Desktop Services (RDS)

    October 6, 2025
  • How to Disable (Enable) Credential Guard in Windows 11

    October 6, 2025
  • Wrong Network Profile on Windows Server after Reboot

    September 30, 2025
  • How to Get Windows 10 Extended Security Updates After End-Of-Life

    September 24, 2025
  • Blocking NTLM Connections on Windows 11 and Windows Server 2025

    September 23, 2025
  • Windows Stucks at ‘Getting Windows Ready, Don’t Turn Off Computer’

    September 15, 2025
  • Clean Up ETL Log Files in ProgramData

    September 9, 2025
  • Fix: Slow Startup of PowerShell Console and Scripts

    September 3, 2025
  • DPI Scaling and Font Size in RDP (RDS) Session

    August 27, 2025
  • Proxmox: Share a Host Directory with VMs via VirtioFS

    August 18, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Migrate (Import) VMs from VMware ESXi to Proxmox
  • Configure Autostart and Boot Order for VMs on Proxmox
  • Create a Windows Server VM on Proxmox (Step-by-Step)
  • Proxmox: Share a Host Directory with VMs via VirtioFS
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top