PG1X WIKI

My Knowledge Base

User Tools

Site Tools


tech:server:linux:virtualization:kvm-qemu:qemu-img:qemu-img

This is an old revision of the document!


qemu-img

DO NOT OPERATE ANY MODIFICATION COMMAND(INCLUDING SNAPSHOT OPERATION) ON RUNNING VIRTUAL MACHINE IMAGE!!!!!!! THE OPERATIONS RESULTS IN VIRTUAL MACHINE IMAGE CORRUPTION, LOSE ALL DATA!!!!!!!!!!

MAKE SURE TARGET VM STOPPED THAT CONTAINS THE VM IMAGE.

root@hotaru:/var/lib/libvirt/images# virsh list --inactive | fgrep nextcloud1.pg1x.com
 -     nextcloud1.pg1x.com            shut off

list snapshots.

qemu-img snapshot -l nextcloud1.pg1x.com.qcow2

if no snapshots found, result is empty.

create a snapshot.

qemu-img snapshot -c "Initial snapshot" nextcloud1.pg1x.com.qcow2

list again.

root@hotaru:/var/lib/libvirt/images# qemu-img snapshot -l nextcloud1.pg1x.com.qcow2
Snapshot list:
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         Initial snapshot          0 2020-01-06 21:53:18   00:00:00.000

snapshot was created successfully.

4 or more snapshots exists, in my experience, VM performance significantly decrease….
tech/server/linux/virtualization/kvm-qemu/qemu-img/qemu-img.1578315247.txt.gz · Last modified: 2020/01/06 21:54 by wnoguchi