How to use the command qm list (with examples)

How to use the command qm list (with examples)

The qm list command is used to list all virtual machines. It provides information such as the virtual machine ID, name, status, and other details. This command is useful for monitoring and managing virtual machines in a Proxmox cluster.

Use case 1: List all virtual machines

Code:

qm list

Motivation: This use case is helpful when you want to get a quick overview of all the virtual machines in your Proxmox cluster. It allows you to see the ID, name, status, and other important details about each virtual machine.

Explanation: The qm list command is used without any additional arguments. It simply lists all virtual machines available in the Proxmox cluster.

Example output:

VMID  Name             Status        Disk     Allocated      Used
100   my-vm-1          stopped       32 GiB   5.2 GiB        3.1 GiB
101   my-vm-2          running       64 GiB   7.4 GiB        5.8 GiB
102   my-vm-3          stopped       128 GiB  8.9 GiB        6.3 GiB

In this example, three virtual machines are listed. The output shows the VMID, name, status, total disk size, allocated disk space, and disk space used for each virtual machine.

Use case 2: List all virtual machines with full status about the running ones

Code:

qm list --full 1

Motivation: This use case is useful when you want to get detailed information about all the virtual machines, including the ones that are currently running. It provides additional information such as CPU usage, memory usage, and uptime for the running virtual machines.

Explanation: The qm list command is used with the --full option and the value 1. This option provides a more detailed status for the virtual machines, including CPU usage, memory usage, uptime, and more.

Example output:

VMID  Name             Status        CPU(%)   MEM(usage/limit)    Uptime
100   my-vm-1          stopped       -        -                   -
101   my-vm-2          running       15       4.5 GiB / 8 GiB     2 days 5 hours
102   my-vm-3          stopped       -        -                   -

In this example, three virtual machines are listed with the additional information provided by the --full option. The output shows the VMID, name, status, CPU usage percentage, memory usage, memory limit, and uptime for each virtual machine.

Conclusion:

The qm list command is a powerful tool for managing virtual machines in a Proxmox cluster. It allows you to quickly get an overview of all the virtual machines and provides detailed information about their status. Whether you need a simple list of virtual machines or a full status report, the qm list command has you covered.

Related Posts

How to use the command eksctl (with examples)

How to use the command eksctl (with examples)

eksctl is the official CLI for Amazon Elastic Kubernetes Service (EKS).

Read More
How to use the command 'po4a-translate' (with examples)

How to use the command 'po4a-translate' (with examples)

The ‘po4a-translate’ command is used to convert a PO file (translation file) back to its original documentation format.

Read More
Using the mixxx Command (with examples)

Using the mixxx Command (with examples)

Mixxx is a free and open-source cross-platform DJ software that provides various command-line options for different functionalities.

Read More