mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
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>
This commit is contained in:
1 parent
57e576dc3c
commit
1c7d85f77f
1 file changed
+5
-5
@@ -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
|
||||
|
||||