We can take snapshots easily but we have to pause the computation state to do so. We can backup the disc without pausing the system.

Is there any way that we can also snapshot the computation state of the guest without pausing the guest in QEMU/KVM?

As per my knowledge, the external snapshot does not preserve the computation e.g a program running at the moment won't be stored from exactly the same step it was on when it was snapshotted.


Several things:

  1. The compute state of the machine is basically the contents of the RAM, especially in-flight IOs. In order to save this state, you need to snapshot the disks as well the the memory. And in order to snapshot anything, disk or RAM, you need to quiesce it, make sure you have a consistent image of either. That cannot be done without any pause at all. If the machine is idle, you will not feel a pause, but if it's not, you might never even be able to pause, just like you will not be able to complete a live migration on a VM that is rapidly making changes to it's memory pages.
  2. Using such snapshots of the compute state can be not only useless but even harmful. If you restore such a snapshot, you at least get a time inconsistency and workloads that depend on time can get confused. In general, it is safer to do proper backups, instead of memory state snaps, even with pause.
  • What if we have several guests and we start the snapshots of all the guests at the same time. They can finish at any time but if we start everything at the same time using synchronization, will it still be faulty or harmful? – Douglas Turner Aug 12 '16 at 14:23
  • That would really depend on the workload. But my reasoning stands - memory snapshots aren't as great as they seem on the face of it, if they aren't restored immediately (e.g. live migration/live clone/lockstepping) because of the time differences between actual run time and restore time – dyasny Aug 12 '16 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.