KVM snapshots¶
Part of the KVM overview. Create, list, revert and delete internal qcow2 snapshots.
Internal qcow2 snapshots:
virsh snapshot-create-as --domain vm01 --name before-upgrade --description "Before the upgrade"
virsh snapshot-list --domain vm01
virsh snapshot-revert --domain vm01 --snapshotname before-upgrade --running
virsh snapshot-delete --domain vm01 --snapshotname before-upgrade
Shutting the VM down first gives a clean, consistent disk-only snapshot. Snapshots live inside the qcow2 file, so they are not a backup: losing the file loses them too.
Reference: https://www.cyberciti.biz/faq/how-to-create-create-snapshot-in-linux-kvm-vmdomain/