[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Restore domains with a different uuid than they had.



# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 80291913492d70f521f3865ecf9a1776d8425757
# Parent  8203b7d536d32cb27f810db478e58ae57faa446c
Restore domains with a different uuid than they had.
Needed for migration to localhost and migration between hosts with
a shared/distributed xenstore.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r 8203b7d536d3 -r 80291913492d tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Wed Aug 17 10:18:34 2005
+++ b/tools/python/xen/xend/XendDomain.py       Wed Aug 17 12:25:50 2005
@@ -320,8 +320,7 @@
         @param vmconfig: vm configuration
         """
         config = sxp.child_value(vmconfig, 'config')
-        uuid = sxp.child_value(vmconfig, 'uuid')
-        dominfo = XendDomainInfo.restore(self.dbmap, config, uuid=uuid)
+        dominfo = XendDomainInfo.restore(self.dbmap, config)
         return dominfo
 
     def domain_restore(self, src, progress=False):
diff -r 8203b7d536d3 -r 80291913492d tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Aug 17 10:18:34 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Aug 17 12:25:50 2005
@@ -195,13 +195,15 @@
 
     recreate = classmethod(recreate)
 
-    def restore(cls, parentdb, config, uuid):
+    def restore(cls, parentdb, config, uuid=None):
         """Create a domain and a VM object to do a restore.
 
         @param parentdb:  parent db
         @param config:    domain configuration
         @param uuid:      uuid to use
         """
+        if not uuid:
+            uuid = getUuid()
         db = parentdb.addChild(uuid)
         vm = cls(db)
         ssidref = int(sxp.child_value(config, 'ssidref'))

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.