qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v7 2/6] Introduce "save-devices-state"


From: Luiz Capitulino
Subject: Re: [Qemu-devel] [PATCH v7 2/6] Introduce "save-devices-state"
Date: Fri, 16 Mar 2012 14:28:27 -0300

On Fri, 16 Mar 2012 09:49:55 -0600
Eric Blake <address@hidden> wrote:

> On 03/16/2012 06:13 AM, Stefano Stabellini wrote:
> > - add an "is_ram" flag to SaveStateEntry;
> > 
> > - register_savevm_live sets is_ram for live_savevm devices;
> > 
> > - introduce a "save-devices-state" QAPI command that can be used to save
> > the state of all devices, but not the RAM or the block devices of the
> > VM.
> > 
> 
> > +QEMU has code to load/save the state of the guest that it is running.
> > +These are two complementary operations.  Saving the state just does
> > +that, saves the state for each device that the guest is running.
> > +
> > +These operations are normally used with migration (see migration.txt),
> > +however it is also possible to save the state of all devices to file,
> > +without saving the RAM or the block devices of the VM.
> > +
> > +This operation is called "save-devices-state" (see QMP/qmp-commands.txt)
> 
> Is there a complimentary load-devices-state?
> 
> Just to make sure I'm clear, there are three things to save before you
> have a complete picture of a running VM:
> 
> disk state (can be saved with 'savevm' to internal qcow2 snapshots, or
> with 'transaction' and 'blockdev-snapshot-sync' by creating external
> snapshots, or by 'migrate' to a file)
> 
> RAM state (can be saved with 'savevm' to internal qcow2 snapshot, or
> with 'migrate' to a file; it is also possible to start qemu with a
> command line parameter telling which backing file tracks RAM state)

The maybe-to-be-added 'dump' command also saves RAM state, but to elf file
format.

> 
> device state (can be saved with 'savevm' to internal qcow2 snapshot, or
> with 'migrate' to a file, and now with 'save-devices-state')
> 
> That is, 'migrate' does all three at once to an external file, 'savevm'
> does all three at once to an internal qcow2 snapshot, and you are now
> making it possible to do any one of the three independently to an
> external file while the VM continues to run.
> 
> Is this something that libvirt should be exposing in the near future?
> 
> > +SQMP
> > +save-devices-state
> > +-------
> > +
> > +Save the state of all devices to file. The RAM and the block devices
> > +of the VM are not saved by this command.
> > +
> > +Arguments:
> > +
> > +- "filename": the file to save the state of the devices to as binary
> > +data. See save-devices-state.txt for a description of the binary format.
> > +
> > +Example:
> > +
> > +-> { "execute": "save-devices-state", "arguments": { "filename": 
> > "/tmp/save" } }
> 
> Can we at least reserve something for future extension to add things
> like 'fd:name' to refer to a named fd received earlier via 'getfd'?  You
> could do that by documenting up front that if "filename" does not start
> with "/", then any pattern of letters followed by a ':' as the initial
> pattern of the filename is an error (and you avoid the error by using
> ./foo:... or an absolute path).
> 




reply via email to

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