All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: "Ahmed M. Azab" <amazab@ncsu.edu>
Cc: jes sorensen <jes.sorensen@redhat.com>,
	qemu-devel@nongnu.org,
	Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] Taking live snapshots of running VMs
Date: Mon, 11 Jul 2011 17:11:23 +0200	[thread overview]
Message-ID: <4E1B129B.5000806@redhat.com> (raw)
In-Reply-To: <CAKJL-GgTU+zFmkyufM+D6E+bFaF7f-rNdFnOowGmkk47jjkz4A@mail.gmail.com>

Am 09.07.2011 00:24, schrieb Ahmed M. Azab:
> Hi All,
> 
> Is there a way to take a live memory snapshot of a running VM without
> freezing or stopping this VM?
> 
> I explored the Qemu code and documentation and I found two ways to
> take a snapshot:
> 
> 1-Using "savevm" Qemu monitor command, which freezes the VM for tens of seconds
> 2-Using "migrate" and select the destination as a file, which forces
> the machine to stop after the snapshot is saved.
> 
> In production environments (where delaying the operations of a VM is
> very critical), it is always useful to take memory snapshots to do
> system analysis or forensics. I think Qemu should provide a way to
> take a snapshot based on QOW technque of memory pages (same as the
> QCOW disk snapshoting).
> 
> If such technique does not exist, I am willing it devlop it myself,
> but I wonder if the Qemu community will be interested to add my patch
> to future versions.

All the code that deals with memory is already there and used for
migration. I think what you really need is a combination of savevm and
live migration, such that you live migrate the VM state into the qcow2
image and when the migration has completed, you take a disk snapshot and
continue the VM.

It shouldn't be too hard to do this. All of the building blocks are
there, they just need to be combined in the right way. I would be
interested in a patch allowing this.


Having said that, I think there are more variations that we'll want to
support. Basically the dimensions that I see are:

1. Disk-only vs. complete VM state
2. Store VM state internally in qcow2 vs. an external file
3. Use internal vs. external disk snapshots

Ideally, we would allow users to choose freely. For example, internal
disk snapshot with external VM state is a combination that I think could
be very useful.

Kevin

      parent reply	other threads:[~2011-07-11 15:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-08 22:24 [Qemu-devel] Taking live snapshots of running VMs Ahmed M. Azab
2011-07-09  6:51 ` Mulyadi Santosa
2011-07-09  9:32 ` Stefan Hajnoczi
2011-07-11  9:38 ` Jes Sorensen
2011-07-11 15:11 ` Kevin Wolf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E1B129B.5000806@redhat.com \
    --to=kwolf@redhat.com \
    --cc=amazab@ncsu.edu \
    --cc=jes.sorensen@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.