From: Wei Liu Subject: Re: [RFC V6] Libxl Domain Snapshot API Design Date: Tue, 9 Sep 2014 10:28:34 +0100 Message-ID: <20140909092834.GB24977@zion.uk.xensource.com> References: <1409124146-18249-1-git-send-email-cyliu@suse.com> <1409921073.10156.82.camel@kazak.uk.xensource.com> <540F2E1D020000660005EFE2@soto.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <540F2E1D020000660005EFE2@soto.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Chun Yan Liu Cc: wei.liu2@citrix.com, Jim Fehlig , ian.jackson@eu.citrix.com, Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, Sep 09, 2014 at 02:43:09AM -0600, Chun Yan Liu wrote: [...] > > > > > int libxl_domain_snapshot_create(libxl_ctx *ctx, const char *domname, > > > > Should take a domid not a name, for consistency with all the other libxl > > functions. > > There is one problem: > If domain is not active (not started), domain snapshot can also be done at > disk-only mode. But domid does not exist in this case. > >From reading this email my understanding of "not active" is that a domain is not even created. I don't think libxl can associate a string (domname) with any particular domain configuration. So IMO you should provide a libxl_domain_config instead. This libxl_domain_config can be retrieved either via libxl (with the new API on the way) or parsing an "inactive" config. Then you can set your flag to indicate whether it's a disk only snapshot or the other one. Wei.