How to use the command qm status (with examples)

How to use the command qm status (with examples)

The qm status command is used to display the status of virtual machines in Proxmox VE. It provides information about whether the virtual machine is running or stopped, the amount of CPUs and memory allocated to it, and other details. This command can be useful for monitoring the status of virtual machines and troubleshooting any issues.

Use case 1: Display the status of a specific virtual machine

Code:

qm status vm_id

Motivation: You may want to quickly check the status of a specific virtual machine to see if it is running or stopped.

Explanation: In this use case, vm_id is the unique identifier of the virtual machine whose status you want to check. Each virtual machine in Proxmox VE is assigned a unique numeric ID.

Example output:

vmid       name           status     pid       uptime
101        VM1            running    1234      1 day 3 hours

In the example output, the virtual machine with ID 101 is named “VM1” and is currently running. The process ID (pid) is 1234, and it has been running for 1 day and 3 hours.

Use case 2: Display detailed status of a specific virtual machine

Code:

qm status --verbose true vm_id

Motivation: If you need more detailed information about the virtual machine, such as its IP address or network interfaces, you can use the --verbose option.

Explanation: In this use case, --verbose true is used to enable verbose mode, which provides additional details about the virtual machine’s status.

Example output:

vmid       name           status     pid       uptime    ip address
101        VM1            running    1234      1 day 3 hours    192.168.0.100

In the example output, the virtual machine with ID 101 is named “VM1” and is currently running. The process ID (pid) is 1234, and it has been running for 1 day and 3 hours. Additionally, it displays the IP address of the virtual machine, which is 192.168.0.100.

Conclusion:

The qm status command in Proxmox VE is a useful tool for checking the status of virtual machines. By using different options, such as --verbose, you can obtain additional information about the virtual machine’s status, making it easier to monitor and troubleshoot any issues that may arise.

Related Posts

How to use the command 'rename' (with examples)

How to use the command 'rename' (with examples)

The ‘rename’ command is a Perl script that allows users to rename multiple files using Perl Common Regular Expressions.

Read More
How to use the command rtcwake (with examples)

How to use the command rtcwake (with examples)

The command rtcwake is used to enter a system sleep state until a specified wakeup time relative to your BIOS clock.

Read More
How to use the command `dumpsys` (with examples)

How to use the command `dumpsys` (with examples)

Description: The dumpsys command is used to provide information about Android system services.

Read More