LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

virsh-snapshot-list

list libvirt snapshots for a domain

TLDR

List snapshots for a domain
$ virsh snapshot-list [domain]
copy
Show parent snapshot names
$ virsh snapshot-list --parent [domain]
copy
Print a tree of snapshot names
$ virsh snapshot-list --tree [domain]
copy
List only leaf snapshots (no children)
$ virsh snapshot-list --leaves [domain]
copy
Start from the current snapshot and list descendants
$ virsh snapshot-list --current --descendants [domain]
copy
Names only, in topological order
$ virsh snapshot-list --name --topological [domain]
copy

SYNOPSIS

virsh snapshot-list domain [options]

DESCRIPTION

virsh snapshot-list shows snapshots libvirt knows for a domain: name, creation time, and domain state by default. Snapshots form a tree; --tree and --parent make that visible before snapshot-revert or snapshot-delete.This is a virsh subcommand, not a separate binary.

PARAMETERS

--parent

Add a parent-name column.
--roots
Only snapshots with no parent.
--tree
Tree of names (implies descendants when combined with --from / --current). Mutually exclusive with --parent and --roots.
--name
Print names only (optionally tab-separated parent with --parent). Mutually exclusive with --tree.
--topological
Sort so no child appears before its ancestors.
--from snapshot / --current
Filter to children of that snapshot (add --descendants for the full subtree).
--leaves / --no-leaves
Filter to snapshots without / with children.
--metadata / --no-metadata
Filter by whether libvirt stores snapshot metadata.
--inactive / --active / --disk-only / --internal / --external
Filter by snapshot kind and domain state at snapshot time.

INSTALL

sudo apt install libvirt-clients
copy
sudo dnf install libvirt-client
copy
sudo apk add libvirt-client
copy
sudo zypper install libvirt-client
copy

CAVEATS

External or `--no-metadata` snapshots may exist on disk without appearing here. Combining incompatible filters can error or return empty. Needs libvirtd access.

HISTORY

Part of libvirt snapshot support in virsh.

SEE ALSO

RESOURCES

Copied to clipboard
Kai