[libvirt-users] Managing Live Snapshots with Libvirt 1.0.1

Andrew Martin amartin at xes-inc.com
Thu Jan 31 23:09:10 UTC 2013


Hello,

I recently compiled libvirt 1.0.1 and qemu 1.3.0 on Ubuntu 12.04. I have performed live snapshots on VMs using "virsh snapshot-create-as" and then later re-merge the images together using "virsh blockpull". I am wondering how I can do a couple of other operations on the images while the VM is running. For example, VM1 is running from the snap3 image, with the following snapshot history (backing files):

[orig] <-- [snap1] <-- [snap2] <-- [snap3]

1. Can I revert VM1 to use snap2 while it is live, or must it be shutdown? After shutting it down, is the best way to revert to snap2 to just edit the xml file and change the block device to point to snap2? Afterwards, I believe snap3 would become unusable and should be deleted?

2. If I would like to start a new VM from snap1, is there a way to extract a copy of this snapshot from the chain, to an independent image file? I tried to use "virsh blockcopy" but it returned this error:
# virsh blockcopy VM1 vda snap1.qcow2 --wait --verbose                                                     
error: Requested operation is not valid: domain is not transient


Thanks,

Andrew




More information about the libvirt-users mailing list