LinuxCommandLibrary

qm-reboot

Reboots a QEMU virtual machine

TLDR

Reboot a virtual machine

$ qm [[reb|reboot]] [vm_id]
copy

Reboot a virtual machine after wait for at most 10 seconds
$ qm [[reb|reboot]] --timeout [10] [vm_id]
copy

SYNOPSIS

qm reboot <vmid> [OPTIONS]

PARAMETERS

<vmid>
    The numeric ID of the virtual machine (VM) to reboot. This is a mandatory argument.

-force, --force
    Performs a hard reset if the clean, ACPI-based reboot fails to complete within the specified timeout. Use with caution as it can be abrupt and similar to pulling the power.

-timeout <seconds>, --timeout <seconds>
    Sets the maximum number of seconds to wait for the guest operating system to perform the graceful reboot. The default timeout is 60 seconds.

-skiplock
    Allows the command to proceed even if the virtual machine is currently locked. This option should be used carefully to avoid conflicts with ongoing operations.

DESCRIPTION

qm-reboot is a command-line utility provided by Proxmox Virtual Environment (PVE) for managing QEMU/KVM virtual machines. Its primary function is to initiate a soft, ACPI-based reboot of a running virtual machine. Unlike a hard reset or power cycle, qm-reboot sends an ACPI reboot signal to the guest operating system, allowing it to perform a graceful shutdown sequence before restarting. This method is preferred for data integrity and system stability within the guest. It's an essential tool for administrators to manage VM lifecycle events from the Proxmox host.

The command requires the VM ID (VMID) as an argument and can optionally specify a timeout for the reboot operation. It ensures a controlled restart, minimizing potential data corruption compared to an abrupt power cycle.

CAVEATS

For optimal behavior, the QEMU Guest Agent (QGA) and ACPI must be functional and installed/enabled within the guest OS. If these are not properly configured, qm-reboot might only wait for the timeout before failing, or requiring the use of -force which then performs a hard reset.

Using -force immediately can bypass the graceful shutdown, making it similar to qm reset if the guest doesn't respond instantly. Always consider allowing the default timeout to pass first.

QEMU GUEST AGENT (QGA)

For qm-reboot to function optimally and provide a truly graceful reboot, the QEMU Guest Agent (QGA) should be installed and running inside the virtual machine. QGA enables direct communication between the Proxmox host and the guest OS, facilitating clean shutdowns, reboots, and other operations like retrieving network information. Without QGA, the command relies solely on ACPI signals, which might not always be as reliable or immediate depending on the guest OS configuration.

ACPI SUPPORT

The Advanced Configuration and Power Interface (ACPI) must be correctly recognized and handled by the guest operating system. qm-reboot primarily sends an ACPI reboot signal. If the guest OS does not properly respond to ACPI events (e.g., due to missing drivers or misconfiguration), the graceful reboot might not occur as expected, potentially leading to a timeout and requiring a forced reset.

HISTORY

qm-reboot is an integral part of the Proxmox Virtual Environment (PVE), a leading open-source virtualization platform first released in 2007. This command, along with other qm utilities, has been a core component of Proxmox's VM management capabilities since its early versions. It evolved to provide administrators with a reliable and safe method for initiating controlled VM restarts directly from the Proxmox host, essential for maintaining stable production environments and leveraging the underlying QEMU/KVM virtualization technologies effectively.

SEE ALSO

qm(1), qm start(1), qm stop(1), qm reset(1), qm shutdown(1), qm status(1)

Copied to clipboard