qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] snapshots in qemu


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] snapshots in qemu
Date: Thu, 2 Sep 2010 07:14:37 +0100

On Thu, Sep 2, 2010 at 5:49 AM, chandra shekar
<address@hidden> wrote:
> hello every one can any one tell which part of code or file in qemu deals
> with snapshots
> any help or suggestions,thanks

There are two features called "snapshot" in QEMU:

1. The -snapshot mode creates a temporary qcow2 image file backed off
the disk image.  This means that changes written to disk don't hit the
original disk image, instead they go into the temporary qcow2 file.
The changes will be lost when you exit QEMU.  This is perfect for
experimenting with installing new software or trying out a new
configuration without modifying your disk image permanently.  You can
use the commit monitor command to save the changes back into the
original disk image if you decide you want to keep these changes.

2. The info snapshot and savevm/delvm monitor commands allow saving
the state of the virtual machine as a "snapshot".  The snapshot can be
resumed another time including VM state and disk.  This is like saving
state in an emulator and being able to resume from the saved state.

Not sure which of these features you are interested in, but try
looking at savevm.c and block/qcow2.c.  Start reading the code and
find out for yourself.  You could have followed the code path from the
command-line option or monitor command you are interested in to
understand how the snapshot feature works.  Use grep, ctags, an IDE,
or whatever works for you.

Stefan



reply via email to

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