On Thu, Sep 2, 2010 at 5:49 AM, chandra shekar <chandrashekar...@gmail.com> 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