qm shutdown Command Examples

The qm shutdown command is a command-line tool provided by the QEMU/KVM Virtual Machine Manager that allows users to shut down a virtual machine that is currently running. This command sends an ACPI shutdown signal to the virtual machine, which triggers an orderly shutdown of the guest operating system running inside the VM.

To use qm shutdown, users need to specify the ID number of the virtual machine they want to shut down.

qm shutdown Command Examples

1. Shutdown a virtual machine:

# qm shutdown {{VM_ID}}

2. Shutdown a virtual machine after wait for at most 10 seconds:

# qm shutdown --timeout {{10}} {{VM_ID}}

3. Shutdown a virtual machine and do not deactivate storage volumes:

# qm shutdown --keepActive {{true}} {{VM_ID}}

4. Shutdown a virtual machine and skip lock (only root can use this option):

# qm shutdown --skiplock {{true}} {{VM_ID}}

5. Stop and shutdown a virtual machine:

# qm shutdown --forceStop {{true}} {{VM_ID}}

Summary

Once the qm shutdown command is executed, the virtual machine will begin the shutdown process. This process can take some time, depending on the complexity of the guest operating system and the applications running inside the virtual machine. During the shutdown process, the virtual machine will remain running but will be inaccessible to users.

Once the shutdown process is complete, the virtual machine will be powered off and all resources allocated to it will be released. Users can then use other commands in the QEMU/KVM Virtual Machine Manager to start or manage the virtual machine as needed.

In addition to qm shutdown, the QEMU/KVM Virtual Machine Manager provides a variety of other commands and features for managing virtual machines, including creating, cloning, modifying, and backing up VMs. More information about qm shutdown and other features of the QEMU/KVM Virtual Machine Manager can be found in the project’s documentation at https://pve.proxmox.com/pve-docs/qm.1.html.

Related Post