virsh-snapshot-dumpxml
print the XML for a libvirt domain snapshot
TLDR
Dump XML for a named snapshot
$ virsh snapshot-dumpxml [domain] [snapshot]
Include security-sensitive fields$ virsh snapshot-dumpxml --security-info [domain] [snapshot]
Dump XML for use with snapshot-create --redefine$ virsh snapshot-dumpxml [domain] [snapshot] > [snap.xml]
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
sudo dnf install libvirt-client
sudo apk add libvirt-client
sudo zypper install libvirt-client
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
virsh(1), virsh-snapshot-list(1), virsh-snapshot-delete(1), virsh-dumpxml(1)
