aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authoremellor@ewan <emellor@ewan>2005-10-07 10:58:41 +0100
committeremellor@ewan <emellor@ewan>2005-10-07 10:58:41 +0100
commit1c7d85f77fa4994e9fa67679066e00985ae448b5 (patch)
treedae6f6a92780da73cd43a40589e82b99ccc48f83 /tools
parent57e576dc3cc61826682f745203cbb817f7242d94 (diff)
downloadxen-1c7d85f77fa4994e9fa67679066e00985ae448b5.tar.gz
xen-1c7d85f77fa4994e9fa67679066e00985ae448b5.tar.bz2
xen-1c7d85f77fa4994e9fa67679066e00985ae448b5.zip
Rename the source domain on migration, regardless of the live flag. This fixes
localhost non-live migration, and bug #297. Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/python/xen/xend/XendCheckpoint.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/python/xen/xend/XendCheckpoint.py b/tools/python/xen/xend/XendCheckpoint.py
index 9250f71b6c..3d45bdb60a 100644
--- a/tools/python/xen/xend/XendCheckpoint.py
+++ b/tools/python/xen/xend/XendCheckpoint.py
@@ -48,9 +48,10 @@ def save(fd, dominfo, live):
config = sxp.to_string(dominfo.sxpr())
domain_name = dominfo.getName()
-
- if live:
- dominfo.setName('migrating-' + domain_name)
+ # Rename the domain temporarily, so that we don't get a name clash if this
+ # domain is migrating (live or non-live) to the local host. Doing such a
+ # thing is useful for debugging.
+ dominfo.setName('migrating-' + domain_name)
try:
write_exact(fd, pack("!i", len(config)),
@@ -85,8 +86,7 @@ def save(fd, dominfo, live):
log.exception("Save failed on domain %s (%d).", domain_name,
dominfo.getDomid())
try:
- if live:
- dominfo.setName(domain_name)
+ dominfo.setName(domain_name)
except:
log.exception("Failed to reset the migrating domain's name")
raise Exception, exn