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 1/5] change the name of the qemu save file at restore

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 1/5] change the name of the qemu save file at restore time
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Wed, 19 Jan 2011 13:53:05 +0000
Delivery-date: Wed, 19 Jan 2011 05:53:11 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
Change the name of the qemu save file to qemu-resume at restore time so
that it doesn't collide with the name of the next save file.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

diff -r 59396addc940 tools/libxc/xc_domain_restore.c
--- a/tools/libxc/xc_domain_restore.c   Fri Jan 14 14:26:11 2011 +0000
+++ b/tools/libxc/xc_domain_restore.c   Wed Jan 19 12:47:23 2011 +0000
@@ -436,7 +436,7 @@ static int dump_qemu(xc_interface *xch, 
     char path[256];
     FILE *fp;
 
-    sprintf(path, "/var/lib/xen/qemu-save.%u", dom);
+    sprintf(path, "/var/lib/xen/qemu-resume.%u", dom);
     fp = fopen(path, "wb");
     if ( !fp )
         return -1;
diff -r 59396addc940 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Fri Jan 14 14:26:11 2011 +0000
+++ b/tools/libxl/libxl_create.c        Wed Jan 19 12:47:23 2011 +0000
@@ -251,7 +251,7 @@ static int domain_restore(libxl_ctx *ctx
     dm_info->saved_state = NULL;
     if (info->hvm) {
         ret = asprintf(&dm_info->saved_state,
-                       "/var/lib/xen/qemu-save.%d", domid);
+                       RESTOREFILE".%d", domid);
         ret = (ret < 0) ? ERROR_FAIL : 0;
     }
 
diff -r 59396addc940 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h      Fri Jan 14 14:26:11 2011 +0000
+++ b/tools/libxl/libxl_internal.h      Wed Jan 19 12:47:23 2011 +0000
@@ -45,6 +45,8 @@
 #define LIBXL_HVM_EXTRA_MEMORY 2048
 #define LIBXL_MIN_DOM0_MEM (128*1024)
 #define QEMU_SIGNATURE "DeviceModelRecord0002"
+#define SAVEFILE "/var/lib/xen/qemu-save"
+#define RESTOREFILE "/var/lib/xen/qemu-resume"
 
 #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
 
diff -r 59396addc940 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Fri Jan 14 14:26:11 2011 +0000
+++ b/tools/python/xen/xend/image.py    Wed Jan 19 12:47:23 2011 +0000
@@ -936,7 +936,7 @@ class HVMImageHandler(ImageHandler):
         args = ImageHandler.getDeviceModelArgs(self, restore)
         args = args + ([ "-M", "xenfv"])
         if restore:
-            args = args + ([ "-loadvm", "/var/lib/xen/qemu-save.%d" %
+            args = args + ([ "-loadvm", "/var/lib/xen/qemu-resume.%d" %
                              self.vm.getDomid() ])
         return args
 



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