VM live snapshot

Hi,

I’m trying to make live snapshots of a VM through Sunstone (VM -> Snapshot). I can make some snapshots but when I poweroff the VM they are deleted.

Another option could be making live snapshots of the S.O disk and save them as an image. In this case, would there be any problems to make for instance live snapshots of the disk and then deploy a new VM with a specific copy (image) already created?

I mean, if there are processes which are working with files would the state of those files consistent when deploying a new VM with the disk copy?

Thank you very much.

Best regards

As a rule of thumb you shouldn’t make snapshots while the files are being modified as the copy can contain files in inconsistent states. Still, if you want to make copies from live VMs you should umount the FS or if not possible freeze the filesystem. This can be done using qemu-agent. It will freeze the filesystems while the disk snapshot is being taken. More info here:

http://docs.opennebula.org/5.2/deployment/open_cloud_host_setup/kvm_driver.html?highlight=agent#enabling-qemu-guest-agent