Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-26 Thread Wenchao Xia
> With a deeper thinking, I'd like to share some more analyse: Vmstate saving equals memory snapshotting, to do it in theory methods can be concluded as: 1 get a mirror of it just in the time sending the "snapshot" request, kernel cow that region. 2 get a mirror of it by gradually coping out the

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-22 Thread Wenchao Xia
于 2013-3-21 23:08, Eric Blake 写道: > On 03/21/2013 08:56 AM, Stefan Hajnoczi wrote: >> On Thu, Mar 21, 2013 at 02:42:23PM +0100, Paolo Bonzini wrote: >>> Il 21/03/2013 14:38, Stefan Hajnoczi ha scritto: There already is a guest RAM cloning mechanism: fork the QEMU process. Then you have a

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-21 Thread Eric Blake
On 03/21/2013 08:56 AM, Stefan Hajnoczi wrote: > On Thu, Mar 21, 2013 at 02:42:23PM +0100, Paolo Bonzini wrote: >> Il 21/03/2013 14:38, Stefan Hajnoczi ha scritto: >>> There already is a guest RAM cloning mechanism: fork the QEMU process. >>> Then you have a copy-on-write guest RAM. >>> >>> In a li

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-21 Thread Stefan Hajnoczi
On Thu, Mar 21, 2013 at 02:42:23PM +0100, Paolo Bonzini wrote: > Il 21/03/2013 14:38, Stefan Hajnoczi ha scritto: > > There already is a guest RAM cloning mechanism: fork the QEMU process. > > Then you have a copy-on-write guest RAM. > > > > In a little more detail: > > > > 1. save non-RAM device

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-21 Thread Pavel Hrdina
On 03/21/2013 02:42 PM, Paolo Bonzini wrote: Il 21/03/2013 14:38, Stefan Hajnoczi ha scritto: There already is a guest RAM cloning mechanism: fork the QEMU process. Then you have a copy-on-write guest RAM. In a little more detail: 1. save non-RAM device state 2. quiesce QEMU to a state that is

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-21 Thread Pavel Hrdina
On 03/21/2013 02:38 PM, Stefan Hajnoczi wrote: On Thu, Mar 21, 2013 at 12:48:35PM +0100, Pavel Hrdina wrote: On 03/21/2013 07:43 AM, Wenchao Xia wrote: Hi, Pavel Sorry for late response. np :) Hi Wenchao, It seems the we are working on the same thing. You are trying to improve the size

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-21 Thread Paolo Bonzini
Il 21/03/2013 14:38, Stefan Hajnoczi ha scritto: > There already is a guest RAM cloning mechanism: fork the QEMU process. > Then you have a copy-on-write guest RAM. > > In a little more detail: > > 1. save non-RAM device state > 2. quiesce QEMU to a state that is safe for forking > 3. create an E

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-21 Thread Stefan Hajnoczi
On Thu, Mar 21, 2013 at 12:48:35PM +0100, Pavel Hrdina wrote: > On 03/21/2013 07:43 AM, Wenchao Xia wrote: > > Hi, Pavel > >Sorry for late response. > > np :) > > >> Hi Wenchao, > >> > >> It seems the we are working on the same thing. You are trying to improve > >> the size of vmstate if you

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-21 Thread Pavel Hrdina
On 03/21/2013 07:43 AM, Wenchao Xia wrote: > Hi, Pavel >Sorry for late response. np :) >> Hi Wenchao, >> >> It seems the we are working on the same thing. You are trying to improve >> the size of vmstate if you want to save it to file or as an internal >> snapshot. >> >> I'm also working on t

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-20 Thread Wenchao Xia
Hi, Pavel Sorry for late response. > Hi Wenchao, > > It seems the we are working on the same thing. You are trying to improve > the size of vmstate if you want to save it to file or as an internal > snapshot. > > I'm also working on that issue and I think that my solution could be > also used f

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-18 Thread Pavel Hrdina
Hi Wenchao, It seems the we are working on the same thing. You are trying to improve the size of vmstate if you want to save it to file or as an internal snapshot. I'm also working on that issue and I think that my solution could be also used for savevm to external file or for live backup. Here

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-18 Thread Wenchao Xia
于 2013-3-18 18:08, Paolo Bonzini 写道: Il 18/03/2013 10:04, Kevin Wolf ha scritto: Oh, seems I misread this then. I thought this was about internal live snapshots, which is a feature that I consider really useful. I'm not so sure if saving the VM state as the disk contents of a qcow2 image is real

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-18 Thread Wenchao Xia
于 2013-3-18 17:04, Kevin Wolf 写道: Am 18.03.2013 um 07:40 hat Wenchao Xia geschrieben: 于 2013-3-15 22:51, Stefan Hajnoczi 写道: On Fri, Mar 15, 2013 at 03:24:38PM +0800, Wenchao Xia wrote: I'd like to add a new way to save vmstate, which will based on the migration thread, but will write cont

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-18 Thread Paolo Bonzini
Il 18/03/2013 10:04, Kevin Wolf ha scritto: > Oh, seems I misread this then. I thought this was about internal live > snapshots, which is a feature that I consider really useful. I'm not so > sure if saving the VM state as the disk contents of a qcow2 image is > really helpful. > > If zero cluster

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-18 Thread Stefan Hajnoczi
On Mon, Mar 18, 2013 at 02:40:50PM +0800, Wenchao Xia wrote: > 于 2013-3-15 22:51, Stefan Hajnoczi 写道: > > On Fri, Mar 15, 2013 at 03:24:38PM +0800, Wenchao Xia wrote: > >>I'd like to add a new way to save vmstate, which will based on the > >> migration thread, but will write contents to block i

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-18 Thread Kevin Wolf
Am 18.03.2013 um 07:40 hat Wenchao Xia geschrieben: > 于 2013-3-15 22:51, Stefan Hajnoczi 写道: > > On Fri, Mar 15, 2013 at 03:24:38PM +0800, Wenchao Xia wrote: > >>I'd like to add a new way to save vmstate, which will based on the > >> migration thread, but will write contents to block images, in

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-17 Thread Wenchao Xia
于 2013-3-15 22:51, Stefan Hajnoczi 写道: > On Fri, Mar 15, 2013 at 03:24:38PM +0800, Wenchao Xia wrote: >>I'd like to add a new way to save vmstate, which will based on the >> migration thread, but will write contents to block images, instead >> of fd as stream. Following is the method to add API

Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-15 Thread Stefan Hajnoczi
On Fri, Mar 15, 2013 at 03:24:38PM +0800, Wenchao Xia wrote: > I'd like to add a new way to save vmstate, which will based on the > migration thread, but will write contents to block images, instead > of fd as stream. Following is the method to add API: Hi Wenchao, What use cases are there besid

[Qemu-devel] [RFC] qmp interface for save vmstate to image

2013-03-15 Thread Wenchao Xia
Hi, Juan and guys, I'd like to add a new way to save vmstate, which will based on the migration thread, but will write contents to block images, instead of fd as stream. Following is the method to add API: 1 add parameters to migrate interface, and a new type of uri: image:[VMSATE_SAVE_IMAGE] #