qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Taking live snapshots of running VMs


From: Kevin Wolf
Subject: Re: [Qemu-devel] Taking live snapshots of running VMs
Date: Mon, 11 Jul 2011 17:11:23 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]