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/
Home Products Support Community News


[Xen-changelog] [xen-unstable] xend: Rename device backend value when xm

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Rename device backend value when xm save/migrate
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 12 Aug 2009 07:45:12 -0700
Delivery-date: Wed, 12 Aug 2009 07:45:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1249662124 -3600
# Node ID f3aaaf764bb83aa6058994ed162d87e16151b241
# Parent  3fe64f43944fa54c2c69c173d191ade4e70da45f
xend: Rename device backend value when xm save/migrate

The Xend has a problem that it often fails to restore/migrate
a PV domain whose device backends are partly a driver domain.

Because a checkpoint of the PV domain has device backend value as
domain id, you can restore/migrate the PV domain only when a driver
domain is the same id as device backend value in the checkpoint.

I attached a patch to fix it by renaming device backend value in a
checkpoint from domain id to domain name when xm save/migrate.

This patch doesn't rename device backend value if the value is 0,
which is Domain-0, so the checkpoint format is compatible if you use
only Domain-0 as device backend.

Signed-off-by: Rikiya Ayukawa <ayukawa.rikiya@xxxxxxxxxxxxxx>
 tools/python/xen/xend/XendCheckpoint.py |   14 ++++++++++++++
 1 files changed, 14 insertions(+)

diff -r 3fe64f43944f -r f3aaaf764bb8 tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py   Fri Aug 07 10:53:22 2009 +0100
+++ b/tools/python/xen/xend/XendCheckpoint.py   Fri Aug 07 17:22:04 2009 +0100
@@ -66,6 +66,8 @@ def insert_after(list, pred, value):
 def save(fd, dominfo, network, live, dst, checkpoint=False, node=-1):
+    from xen.xend import XendDomain
         if not os.path.isdir("/var/lib/xen"):
@@ -80,6 +82,18 @@ def save(fd, dominfo, network, live, dst
     if node > -1:
         insert_after(sxprep,'vcpus',['node', str(node)])
+    for device_sxp in sxp.children(sxprep, 'device'):
+        backend = sxp.child(device_sxp[1], 'backend')
+        if backend == None:
+            continue
+        bkdominfo = XendDomain.instance().domain_lookup_nr(backend[1])
+        if bkdominfo == None:
+            raise XendError("Could not find backend: %s" % backend[1])
+        if bkdominfo.getDomid() == XendDomain.DOM0_ID:
+            # Skip for compatibility of checkpoint data format
+            continue
+        backend[1] = bkdominfo.getName()
     config = sxp.to_string(sxprep)
     domain_name = dominfo.getName()

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: Rename device backend value when xm save/migrate, Xen patchbot-unstable <=