From: Ian Murray Subject: Re: xl save but leave domain paused Date: Wed, 12 Jun 2013 11:21:56 +0100 (BST) Message-ID: <1371032516.17404.YahooMailNeo@web171305.mail.ir2.yahoo.com> References: <51A7C8BE.4050306@yahoo.co.uk> <1370356105.24512.110.camel@zakaz.uk.xensource.com> <1370814084.74351.YahooMailNeo@web171301.mail.ir2.yahoo.com> <1370945754.24512.292.camel@zakaz.uk.xensource.com> Reply-To: Ian Murray Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1370945754.24512.292.camel@zakaz.uk.xensource.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: Ian Campbell Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org > = > It seems like useful functionality to me, so subject to reviewing the > actual implementation I think it more than likely would. > = I see there is a longterm goal for snapshoting.... " Full-VM snapshotting owner:=A0? status: none prognosis: Probably delay unti= l 4.4 Have a way of coordinating the taking and restoring of VM memory and = disk snapshots. This would involve some investigation into the best way to= accomplish this." I don't know if my proposed solution meets that requirement. I would argue = that snapshotting of the virtual disk is beyond the scope of the hypervisor= tools because there are many different ways to implement a virtual disk, e= ach with their own "snapshotting" methods.... So perhaps it does meet the requirement. >> = >> The code I ended up with was (which is what I think you expected):- > = > Yep, minus the fprintf which I don't think is needed. > = Yeah, that was in to make sure I was defintely running the right code, as p= ause straight after the suspend has the same output >> = >> =A0 =A0 if (leavepaused || checkpoint || rc < 0) { >> =A0 =A0 =A0 =A0 if (leavepaused && ! (rc < 0)) { > = > I think the libxl coding style would be to cuddle the ! against the > bracket. > = Lol, I will take a look at the rest of the code to make sure it is in the s= ame style. >> =A0 =A0 =A0 =A0 =A0 =A0 libxl_domain_pause(ctx, domid); >> =A0 =A0 =A0 =A0 =A0 =A0 fprintf(stderr, "Pausing before resume\n"); >> =A0 =A0 =A0 =A0 } >> =A0 =A0 =A0 =A0 libxl_domain_resume(ctx, domid, 1, 0); >> =A0 =A0 } >> =A0 =A0 else >> =A0 =A0 =A0 =A0 =A0 libxl_domain_destroy(ctx, domid, 0); >> = >> = >> > = >> > Ian. >> > = > =