1

I have several KVM/QEMU guests with each having one hard disk based on the qcow2 format. As I understand, I have two option for creating snapshots. First is to create a snapshot inside the qcow2 image:

virsh snapshot-create {vm_name}

The second would be to create an atomic snapshot, which I could later merge back into the original qcow2 image:

virsh snapshot-create-as --domain {vm_name} --name {snapshot_name} --no-metadata --atomic --disk-only --diskspec {hdd_name},snapshot=external
virsh blockcommit {vm_name} {hdd_name} --active --pivot

My problem is that I have limited disk space on the KVM host (hypervisor).

The disadvantage of the first method is that snapshots are stored within the qcow2 image, which makes the image larger if I take a snapshot every night - this would force me to trim the image periodically when I delete older snapshot, which is a lot of additional work.

The disadvantage of the second method is, that I backup the whole image, which is easier to administrate, but takes much more space if I like to keep several backups of the guest.

What I would like to know:

  • Could someone tell me if there's maybe a third method I don't know, which would make my life easier on a hypervisor with not that much hard disk space?
  • Virtualbox can create external snapshots, which can be merged back into the original image at any time, which is very convenient, because you don't have to trim the image. Does KVM/QEMU provide similar functionality?
  • What is the best practice for creating snapshots of KVM guests if I want to keep several snapshots and pay heed to my limited disk space?

0

You must log in to answer this question.