qm-stop
Stop a virtual machine or container
TLDR
Stop a virtual machine immediately
Stop a virtual machine and wait for at most 10 seconds
Stop a virtual machine and skip lock (only root can use this option)
Stop a virtual machine and don't deactivate storage volumes
SYNOPSIS
qm stop
PARAMETERS
Required. The unique numeric ID of the virtual machine to stop.
--skiplock
Skip locks - only relevant if ha is disabled. Use with caution.
--timeout
Wait for the VM to shutdown for the specified number of seconds. Defaults to 60 seconds.
--debug
Enable debug mode.
DESCRIPTION
The `qm-stop` command is a Proxmox Virtual Environment (PVE) command-line utility used to gracefully shut down a QEMU-managed virtual machine (VM). It sends an ACPI shutdown signal to the guest OS, allowing it to perform a clean shutdown procedure. This is the preferred method for stopping a VM as it minimizes the risk of data corruption.
By default, `qm-stop` will wait for the VM to shut down completely before returning control to the user. You can use the `--skiplock` parameter, but this is *not* recommended in most scenarios. The `qm-stop` command can be used with or without a configuration lock. It ensures that the VM stops gracefully and the command is available with or without a lock for immediate operation to avoid inconsistencies.
Note that `qm-stop` requires the VM ID as an argument. This ID is a unique integer assigned to each VM within the Proxmox environment.
RETURN CODES
Returns 0 on success, and non-zero on errors.
SEE ALSO
qm(1), qm-start(1), qm-shutdown(1), qm-reboot(1), qm-destroy(1)