[Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-11-10 Thread Chunyan Liu
changes to V7: * remove libxl_domain_snapshot_revert API * about libxl_domain_snapshot_delete, disk snapshot part could be extracted to libxlu if we would support many kinds of disk backendtypes in future. Add words to the docs, but not extended. Basic goal will support only raw and

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-11-10 Thread George Dunlap
On Mon, Nov 10, 2014 at 8:17 AM, Chunyan Liu wrote: > > 3. Function Implementation > >libxl_domain_snapshot_create: >1). check args validation >2). save domain memory through save-domain >3). take disk snapshot by qmp command (if domian is active) or qemu-img >

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-11-11 Thread Chun Yan Liu
>>> On 11/11/2014 at 01:04 AM, in message , George Dunlap wrote: > On Mon, Nov 10, 2014 at 8:17 AM, Chunyan Liu wrote: > > > > > 3. Function Implementation > > > >libxl_domain_snapshot_create: > >1). check args validation > >2). save domain memory through save-domai

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-11-12 Thread Chun Yan Liu
>>> On 11/11/2014 at 04:07 PM, in message <5462343c026600078...@soto.provo.novell.com>, "Chun Yan Liu" wrote: > On 11/11/2014 at 01:04 AM, in message > , George > Dunlap wrote: > > On Mon, Nov 10, 2014 at 8:17 AM, Chunyan Liu wrote: > > > > > > > > 3. Function Implement

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-11-13 Thread Ian Campbell
On Wed, 2014-11-12 at 20:07 -0700, Chun Yan Liu wrote: > > > By "active" here, do you you mean "live" (vs paused)? > > Means the domain is started (no matter is running or paused). > > vs (libvirt defines a domain but not started). > > Here, I should update this to: > > 3). take disk snapshot

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-11-25 Thread Chun Yan Liu
Hi, Ian, According to previous discussion, snapshot delete and revert are inclined to be done by high level application itself, won't supply a libxl API. I'm wondering snapshot create need a new common API? In fact its main work is save domain and take disk snapshot, xl can do it too. I just wri

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-11-28 Thread Ian Campbell
On Tue, 2014-11-25 at 02:08 -0700, Chun Yan Liu wrote: > Hi, Ian, > > According to previous discussion, snapshot delete and revert are > inclined to be done by high level application itself, won't supply a > libxl API. I thought you had explained a scenario where the toolstack needed to be at lea

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-12-02 Thread Chun Yan Liu
>>> On 11/28/2014 at 11:43 PM, in message >>> <1417189409.23604.62.ca...@citrix.com>, Ian Campbell wrote: > On Tue, 2014-11-25 at 02:08 -0700, Chun Yan Liu wrote: > > Hi, Ian, > > > > According to previous discussion, snapshot delete and revert are > > inclined to be done by high level ap

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-12-02 Thread Chun Yan Liu
>>> On 11/28/2014 at 11:43 PM, in message >>> <1417189409.23604.62.ca...@citrix.com>, Ian Campbell wrote: > On Tue, 2014-11-25 at 02:08 -0700, Chun Yan Liu wrote: > > Hi, Ian, > > > > According to previous discussion, snapshot delete and revert are > > inclined to be done by high level ap

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-12-05 Thread Ian Campbell
On Tue, 2014-12-02 at 23:14 -0700, Chun Yan Liu wrote: > > >>> On 11/28/2014 at 11:43 PM, in message > >>> <1417189409.23604.62.ca...@citrix.com>, > Ian Campbell wrote: > > On Tue, 2014-11-25 at 02:08 -0700, Chun Yan Liu wrote: > > > Hi, Ian, > > > > > > According to previous discussion, sn

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-12-05 Thread Wei Liu
I have to admit I'm confused by the back and forth discussion. It's hard to justify the design of new API without knowing what the constraints and requirements are from your PoV. Here are my two cents, not about details, but about general constraints. There are two layers, one is user of libxl (c

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-12-05 Thread Ian Campbell
On Fri, 2014-12-05 at 16:06 +, Wei Liu wrote: > Regarding JSON API, as Ian said, feel free to hook it up to libxlu. *If* it is useful to multiple toolstacks but not suitable for libxl then libxlu would be the right place. As I understood things the need for JSON here was xl specific, and it i

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-12-05 Thread Wei Liu
On Fri, Dec 05, 2014 at 04:11:48PM +, Ian Campbell wrote: > On Fri, 2014-12-05 at 16:06 +, Wei Liu wrote: > > Regarding JSON API, as Ian said, feel free to hook it up to libxlu. > > *If* it is useful to multiple toolstacks but not suitable for libxl then > libxlu would be the right place.

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-12-07 Thread Chun Yan Liu
>>> On 12/6/2014 at 12:06 AM, in message <20141205160615.ga24...@zion.uk.xensource.com>, Wei Liu wrote: > I have to admit I'm confused by the back and forth discussion. It's hard > to justify the design of new API without knowing what the constraints > and requirements are from your PoV. >

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-12-08 Thread Wei Liu
On Mon, Dec 08, 2014 at 12:34:47AM -0700, Chun Yan Liu wrote: > > > >>> On 12/6/2014 at 12:06 AM, in message > <20141205160615.ga24...@zion.uk.xensource.com>, Wei Liu > wrote: > > I have to admit I'm confused by the back and forth discussion. It's hard > > to justify the design of new API with

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-12-08 Thread Wei Liu
On Mon, Dec 08, 2014 at 11:12:14AM +, Wei Liu wrote: > On Mon, Dec 08, 2014 at 12:34:47AM -0700, Chun Yan Liu wrote: > > > > > > >>> On 12/6/2014 at 12:06 AM, in message > > <20141205160615.ga24...@zion.uk.xensource.com>, Wei Liu > > > > wrote: > > > I have to admit I'm confused by the bac

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-12-08 Thread Chun Yan Liu
>>> On 12/8/2014 at 07:12 PM, in message <20141208111214.gc17...@zion.uk.xensource.com>, Wei Liu wrote: > On Mon, Dec 08, 2014 at 12:34:47AM -0700, Chun Yan Liu wrote: > > > > > > >>> On 12/6/2014 at 12:06 AM, in message > > <20141205160615.ga24...@zion.uk.xensource.com>, Wei Liu > > >

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-12-09 Thread Ian Campbell
On Mon, 2014-12-08 at 22:04 -0700, Chun Yan Liu wrote: > Partly. At least for domain disk snapshot create/delete, I prefer using > qmp commands instead of calling qemu-img one by one. Using qmp > commands, libvirt will need libxl's help. Of course, if libxl doesn't > supply that, libvirt can call q

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-12-09 Thread Chun Yan Liu
>>> On 12/9/2014 at 07:11 PM, in message <1418123518.14361.20.ca...@citrix.com>, Ian Campbell wrote: > On Mon, 2014-12-08 at 22:04 -0700, Chun Yan Liu wrote: > > Partly. At least for domain disk snapshot create/delete, I prefer using > > qmp commands instead of calling qemu-img one by one. Us

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-12-12 Thread Ian Campbell
On Tue, 2014-12-09 at 20:46 -0700, Chun Yan Liu wrote: > > >>> On 12/9/2014 at 07:11 PM, in message > >>> <1418123518.14361.20.ca...@citrix.com>, > Ian Campbell wrote: > > On Mon, 2014-12-08 at 22:04 -0700, Chun Yan Liu wrote: > > > Partly. At least for domain disk snapshot create/delete, I pr

Re: [Xen-devel] [RFC V8 2/3] libxl domain snapshot API design

2014-12-14 Thread Chun Yan Liu
>>> On 12/13/2014 at 12:22 AM, in message >>> <1418401323.16425.28.ca...@citrix.com>, Ian Campbell wrote: > On Tue, 2014-12-09 at 20:46 -0700, Chun Yan Liu wrote: > > > > >>> On 12/9/2014 at 07:11 PM, in message > > >>> <1418123518.14361.20.ca...@citrix.com>, > > Ian Campbell wrote: >