When a Virtual Machine (VM) or Container (CT) in Proxmox becomes unresponsive and does not react to the GUI’s Shutdown, Reboot, or Stop commands, there are alternative methods to force terminate the session directly from the Proxmox console.
In extreme cases where Proxmox itself is malfunctioning, a hardware reboot of the Proxmox server may be necessary. Below are detailed methods to safely terminate VMs or CTs.
Please take caution before force killing a VM or CT. Doing so could result in possible data loss or corruption. It’s recommended to use Proxmox along side Proxmox Backup Server in case of a needed restore.
Method 1: For Virtual Machines (VMs)
- Access the Proxmox terminal and execute the command
qm unlock <VMID>
, replacing<VMID>
with the ID of your VM. This command releases any locks held on the VM. - In the terminal, use the command
qm stop <VMID>
to forcibly stop the VM. Ensure to replace<VMID>
with your VM’s ID.
Method 2: For Containers (CTs)
- Identify the container’s ID through the Proxmox web GUI or by running
cat /etc/pve/.vmlist
in the console. - Determine the PID for the process locking the container by executing
fuser /var/lock/qemu-server/lock-<CTID>.conf
, substituting<CTID>
with your container’s ID. This command reveals the PID of the process holding a lock on the container. - With the PID identified, run
kill <PID>
, replacing<PID>
with the actual process ID obtained from the previous step. - Execute
qm stop <CTID>
, where<CTID>
is your container’s ID. This command should terminate the container after a few moments.
Method 3: Using Proxmox Web GUI for VMs/CTs
If the VM or CT is somewhat responsive but not fully operational, attempt to use the “Stop” command from the Proxmox Web GUI. This method is less forceful than terminal commands but can sometimes succeed where the GUI’s regular shutdown or reboot options fail.
Method 4: Rebooting Proxmox Host
If individual VM/CT commands do not resolve the issue and the Proxmox system itself is not responsive, consider rebooting the entire Proxmox server. Use caution, as this will affect all running VMs and CTs: reboot
Always ensure to perform these actions with consideration of the impact on your Proxmox environment and the hosted services. Backup critical data regularly to avoid loss during system operations.
© 2023 Justin Vendette