qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC]VM live snapshot proposal
@ 2014-03-03  1:13 Huangpeng (Peter)
  2014-03-03 12:32 ` Stefan Hajnoczi
  0 siblings, 1 reply; 26+ messages in thread
From: Huangpeng (Peter) @ 2014-03-03  1:13 UTC (permalink / raw)
  To: Paolo Bonzini, kwolf@redhat.com, stefanha@gmail.com,
	qemu-devel@nongnu.org, Wenchao Xia, Pavel Hrdina,
	KVM devel mailing list
  Cc: Zhanghailiang

Hi, All

I found some discussion about VM live-snapshot, but haven't seen any progress.
https://lists.gnu.org/archive/html/qemu-devel/2013-08/msg02125.html
http://markmail.org/thread/shneezha7kmtosvb#query:+page:1+mid:shneezha7kmtosvb+state:results

Here I have another proposal, based on the live-migration scheme, add consistent 
memory state tracking and saving.
The idea is simple:
1.First round use live-migration to save all memory to a snapshot file.
2.intercept the action of memory-modify, save old pages to a temporary file and mark dirty-bits,
3.Merge temporary file to the original snapshot file

Detailed process:
(1)Pause VM
(2) Save the device status to a temporary file (live-migration already supported )
(3) Make disk snapshot
(4) Enable page dirty log and old dirty pages save function(which we need to add)
(5) Resume VM
(6) Begin the first round of iteration, we save the entire contents of the VM memory pages
to the snapshot file
(7) In the second round of iteration , we save the old page to the snapshot file
(8) Merge data of device status which is pre-saved in temporary files to the snapshot file
(8) End ram snapshot and some cleanup work

Due to memory-modifications may happen in kvm, qemu, or vhost, the key-part is how we
can provide common page-modify-tracking-and-saving api, we completed a prototype by 
simply add modified-page tracking/saving function in qemu, and it seems worked fine.

Is this program acceptable? or are there any other better suggestions?

Thanks

Peter Huang

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2014-03-06  9:15 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-03  1:13 [Qemu-devel] [RFC]VM live snapshot proposal Huangpeng (Peter)
2014-03-03 12:32 ` Stefan Hajnoczi
2014-03-03 12:55   ` Kevin Wolf
2014-03-03 13:19     ` Paolo Bonzini
2014-03-03 13:30       ` Kevin Wolf
2014-03-03 13:47         ` Paolo Bonzini
2014-03-03 14:04           ` Kevin Wolf
2014-03-03 14:55           ` Dr. David Alan Gilbert
2014-03-03 19:52           ` Andrea Arcangeli
2014-03-04  1:35             ` Huangpeng (Peter)
2014-03-05 14:46               ` Andrea Arcangeli
2014-03-05  1:52             ` Huangpeng (Peter)
2014-03-05 14:55               ` Andrea Arcangeli
2014-03-04  1:28         ` Huangpeng (Peter)
2014-03-04  9:40           ` Dr. David Alan Gilbert
2014-03-05  1:00             ` Huangpeng (Peter)
2014-03-05  9:09               ` Paolo Bonzini
2014-03-06  1:42             ` Huangpeng (Peter)
2014-03-06  9:14               ` Dr. David Alan Gilbert
2014-03-04  1:06     ` Huangpeng (Peter)
2014-03-03 13:18   ` Paolo Bonzini
2014-03-04  1:02   ` Huangpeng (Peter)
2014-03-04  8:54     ` Stefan Hajnoczi
2014-03-04  9:05       ` Paolo Bonzini
2014-03-04 11:28         ` Wenchao Xia
2014-03-05  0:46       ` Huangpeng (Peter)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).