Husain Bhala asked:
what is the correct method to use qemu qmp snapshot-drive ?
Is there any other way to create snapshot of qcow2 based VPS without using virsh snapshot-create ? They seem to corrupt the filesystem on VPS.
To get a consistent filesystem snapshot, you need all of the following:
- The qemu-guest-agent must be installed and running in the guest.
virsh domfsfreeze guestnamebefore taking the snapshot. This tells the qemu-guest-agent to stop all filesystem activity and bring it to a consistent state.
- Take your snapshot.
virsh domfsthaw guestnameafter taking the snapshot. This tells the qemu-guest-agent to allow filesystem activity to resume. But the snapshot will remain as it was when frozen above.
- Back up the snapshot.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.