On 03/10/11 10:27, Stefan Hajnoczi wrote: >> Is Scenario 2 safe where in the copying the snapshot outside the original >> qcow2 is being executed with the VM running. This is because if this is safe >> then this could be an approach as it would not require a long downtime for >> the VM. > > There is no guarantee that qemu-img will work on an image file that is > open by a running VM.
I think the guarantee here is that you're guaranteed it will go horribly wrong if you try to do so..... > I have CCed Jes who has been working on a live snapshot mechanism. He > recently added the snapshot_blkdev monitor command that takes a > snapshot of a block device while the VM is running. A new image file > is created based off the original image file (which will no longer be > modified), all new disk writes go to the new image file. It is safe > to perform read-only access to the original image file. There > currently is no support to merge the snapshot changes back into the > original image while the VM is running, but I think that is the next > planned step. Yes, keep in mind that the live snapshot is only for external snapshot files, it doesn't deal with internal snapshots. Cheers, Jes