Skip to contentSkip to conversation

Fix problem when destroying VMs using the Xen-API

PATCH New Stefan Berger 1 participant 1 message Jul 12, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix problem when destroying VMs using the Xen-API

When domains are destroyed/suspend-resume/migration using the Xen-API things break due to the domid not having been reset. This patch fixes this. This is the best place I found for fixing this problem. I could not push this line into _stateSet() for the case of DOM_STATE_HALTED and left a comment regarding this.

---
 xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py |    1 +
 1 file changed, 1 insertion(+)
xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py +1 -0
Index: root/xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py
===================================================================
@@ -1593,6 +1593,7 @@ class XendDomainInfo:
                 log.exception("Removing domain path failed.")
 
             self._stateSet(DOM_STATE_HALTED)
+            self.domid = None  # Do not push into _stateSet()!
         finally:
             self.refresh_shutdown_lock.release()
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel