LinuxCommandLibrary

qm-listsnapshot

List snapshots for a Qemu/KVM virtual machine

TLDR

List all snapshots of a specific virtual machine

$ qm [[lists|listsnapshot]] [vm_id]
copy

SYNOPSIS

qm listsnapshot <vmid> [OPTIONS]

PARAMETERS

<vmid>
    The unique integer ID of the virtual machine (VM) for which to list snapshots. This is a mandatory argument.

--full <boolean>
    When set to '1' (true), this option displays full snapshot properties, including creation time (snaptime), parent snapshot (parent), and virtual machine state at the time of the snapshot (vmstate). Default is '0' (false).

--output-format <string>
    Specifies the output format of the listed snapshots. Supported formats include 'json', 'prettyjson', 'yaml', 'html', 'xml', 'tsv', 'csv', and 'text'.

--output-options <string>
    Additional options specific to the chosen output format, typically used for column selection or formatting details.

--quiet <boolean>
    If set to '1' (true), suppresses informational messages and warnings, printing only the core output. Default is '0' (false).

--verbose <boolean>
    If set to '1' (true), enables verbose output, providing more detailed status information during execution. Default is '0' (false).

DESCRIPTION

The qm-listsnapshot command is a subcommand of Proxmox VE's primary virtual machine management tool, qm. It is specifically designed to display a list of all existing snapshots associated with a given QEMU/KVM virtual machine.

When executed, it provides an overview of each snapshot, typically showing its name, a short description, and its state (e.g., 'running' or 'stopped' if the VM was running when the snapshot was taken). Using the --full option, users can retrieve more detailed information, such as the exact time the snapshot was created, its parent snapshot in the history tree, and potentially the disk space consumed by the snapshot.

This command is crucial for administrators to monitor and manage the rollback points of their virtual machines, helping them to identify available recovery states before performing operations like rollback or deletion.

CAVEATS

It's important to understand that snapshots are not full backups. While they provide a quick rollback point, they are dependent on the underlying VM disk image and are not suitable for long-term archival or disaster recovery across different systems.

The qm-listsnapshot command is specifically for QEMU/KVM virtual machines managed by Proxmox VE; for LXC containers, a similar command like pct listsnapshot would be used.

OUTPUT COLUMNS

When running qm-listsnapshot without the --full option, the output typically includes the following columns:
Name: The name given to the snapshot.
Description: A user-defined description for the snapshot.
VMState: The state of the VM (e.g., 'running', 'stopped') when the snapshot was taken.

With the --full option, additional columns may be displayed:
SnapTime: The exact date and time the snapshot was created.
Parent: The name of the parent snapshot, indicating its position in the snapshot tree.
DiskSize: The size of the disk delta introduced by the snapshot.

EXAMPLE USAGE

To list all snapshots for a VM with ID 101:
qm listsnapshot 101

To list full details of snapshots for VM 101:
qm listsnapshot 101 --full

To list snapshots for VM 101 and output in JSON format:
qm listsnapshot 101 --output-format json

HISTORY

The qm command-line utility, including its snapshot management subcommands like listsnapshot, has been a fundamental component of Proxmox VE since its early versions. As Proxmox VE evolved, features related to snapshots, such as live snapshots and improved integration with various storage backends, have been introduced and refined, making qm-listsnapshot a more robust and informative tool over time.

SEE ALSO

qm(1), qm snapshot(1), qm rollback(1), qm delsnapshot(1), pct(1)

Copied to clipboard