Stopping a Runaway VM in Proxmox

I recently found myself in quite a predicament with a runaway VM in Proxmox. I was trying to create a new VM in Proxmox but forgot to attach a .iso to the VM before it booted up. This meant that the machine could not find a bootable storage device and ended up stuck in an infinite boot loop. No matter how many times I pressed stop, shutdown, or ran qm stop, nothing seemed to work.

Finally, I stumbled across David Pearce’s 2022 post “Stopping a Stubborn VM in Proxmox”, which helped me finally stop this VM. I wanted to share this knowledge below so you too can stop that pesky runaway VM in Proxmox. Be sure to try each step in order, as they are ordered from safest to least safe.

In case you don’t already have proxmox setup, check out my post on installing Proxmox VE.

  • Using the GUI – Shutdown:
    • Select the VM.
    • In the upper right corner, click on “Shutdown.”
    • Wait for this to either fail or succeed before proceeding.
  • Using the GUI – Stop:
    • Select the VM.
    • In the upper right corner, click on “Stop.”
    • Wait for this to either fail or succeed before proceeding.
  • Using the Shell:
    • Run the following command and wait for this to either fail or succeed before proceeding.
qm stop <vmid>
  • If All Else Fails:
    • This method is super dangerous, proceed with caution.
    • Identify the KVM process ID and kill it by running the following:
# Returns a list of processes associated with VMID
ps aux | grep <VMID>

# From that list, locate the PID and insert below
kill -9 <PID>

By following these steps, you should be able to stop even the toughest runaway VM in Proxmox. For more details, you can refer to the original post on the Proxmox forum.

Leave a Reply