WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 2 of 5] Disallow xm save -c unless the guest advertis

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 2 of 5] Disallow xm save -c unless the guest advertises that it is resumable
From: Brendan Cully <brendan@xxxxxxxxx>
Date: Fri, 12 Jan 2007 15:03:09 -0700
Delivery-date: Fri, 12 Jan 2007 15:08:58 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1168642987@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Brendan Cully <brendan@xxxxxxxxx>
# Date 1168642934 28800
# Node ID fda11d9e5241eccd3c103e9b6a42ea33dd236174
# Parent  34a989337172b3df09a8b10089d4471a026bb613
Disallow xm save -c unless the guest advertises that it is resumable.

Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>

diff -r 34a989337172 -r fda11d9e5241 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Fri Jan 12 15:00:19 2007 -0800
+++ b/tools/python/xen/xend/XendDomain.py       Fri Jan 12 15:02:14 2007 -0800
@@ -1196,6 +1196,10 @@ class XendDomain:
             if dominfo.getDomid() == DOM0_ID:
                 raise XendError("Cannot save privileged domain %i" % domid)
 
+            if checkpoint:
+                resumable = dominfo.readDom("control/feature-resumable")
+                if not resumable:
+                    raise XendError("Guest does not support checkpointing")
             fd = os.open(dst, os.O_WRONLY | os.O_CREAT | os.O_TRUNC)
             try:
                 XendCheckpoint.save(fd, dominfo, False, False, dst,

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel