LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

virsh-snapshot-dumpxml

print the XML for a libvirt domain snapshot

TLDR

Dump XML for a named snapshot
$ virsh snapshot-dumpxml [domain] [snapshot]
copy
Include security-sensitive fields
$ virsh snapshot-dumpxml --security-info [domain] [snapshot]
copy
Dump XML for use with snapshot-create --redefine
$ virsh snapshot-dumpxml [domain] [snapshot] > [snap.xml]
copy

SYNOPSIS

virsh snapshot-dumpxml [--security-info] [--xpath EXPR] [--wrap] domain snapshot

DESCRIPTION

virsh snapshot-dumpxml writes the snapshot record as libvirt snapshot XML. That document is what snapshot-create --redefine accepts when you copy snapshot metadata between hosts or recreate it for a domain with the same name and UUID.virsh snapshot-current is the shortcut for the current snapshot's XML.This is a virsh subcommand, not a separate binary.

PARAMETERS

--security-info

Include security-sensitive information in the XML.
--xpath EXPR
Print only matching nodes.
--wrap
Wrap XPath matches in a common root element.
domain
Name, ID, or UUID.
snapshot
Snapshot name as shown by virsh snapshot-list.

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

Needs libvirtd access. XML may embed host-specific domain config; redefining on another machine can require edits. --security-info can expose secrets.

HISTORY

Part of libvirt snapshot support in virsh.

SEE ALSO

RESOURCES

Copied to clipboard
Kai