25 August 2020

Qemu/kvm/virsh Snapshot

 create snapshot:

sudo virsh snapshot-create-as <domain> <snapshot-name>


This will create xml file in /var/lib/libvirt/qemu/snapshot/<domain>/<snapshot-name>.xml


Normally for snapshot, will have Copy-On-Write. Means anything changes will be save somewhere else instead of main disk image.


But for qcow2, little bit different. The changes still will be store on the main disk image.


To list snapshot:

# qemu-img snapshot -l /var/lib/libvirt/qemu/centos7-server.qcow2
Snapshot list:
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         live_snapshot1         2.3G 2020-08-25 12:44:09   00:32:40.190



https://unix.stackexchange.com/questions/570414/understanding-how-libvirt-snapshots-are-stored

No comments:

Post a Comment

Terima kasih