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

[Xen-devel] [PATCH] Fix 'xm reboot'



I noticed a winxp guest did not restart after performing a file system
check.  Didn't think much about it until finding the following in
xend.log sometime later

[2007-09-12 11:27:20 21028] ERROR (XendDomainInfo:1324) Failed to
restart domain 3.
Traceback (most recent call last):
  File "/usr/lib64/python2.5/site-packages/xen/xend/XendDomainInfo.py",
line 1309, in _restart
    self.info)
  File "/usr/lib64/python2.5/site-packages/xen/xend/XendDomain.py", line
933, in domain_create_from_dict
    dominfo = XendDomainInfo.create_from_dict(config_dict)
  File "/usr/lib64/python2.5/site-packages/xen/xend/XendDomainInfo.py",
line 101, in create_from_dict
    vm = XendDomainInfo(XendConfig.XendConfig(xapi = config_dict))
  File "/usr/lib64/python2.5/site-packages/xen/xend/XendDomainInfo.py",
line 377, in __init__
    self._checkName(self.info['name_label'])
  File "/usr/lib64/python2.5/site-packages/xen/xend/XendDomainInfo.py",
line 2172, in _checkName
    (" as domain %s" % str(dom.domid)) or ""))
VmError: VM name 'sles10_pv_64' already exists

Got the same result with 'xm reboot' on PV guest.  Attached is a patch
that fixes this problem but not quite certain if this is most
appropriate place for fix.  dom.domid is certainly None -- it is set to
None in XendDomainInfo.cleanupDomain().  Tested
save/restore/migrate/reboot and observed no regressions.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxxxx>

Regards,
Jim

diff -r a00cc97b392a tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Sep 12 09:43:33 2007 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Sep 12 18:10:22 2007 -0600
@@ -2167,7 +2167,7 @@ class XendDomainInfo:
             raise VmError('Invalid VM Name')
 
         dom =  XendDomain.instance().domain_lookup_nr(name)
-        if dom and dom.domid != self.domid:
+        if dom and dom.domid and dom.domid != self.domid:
             raise VmError("VM name '%s' already exists%s" %
                           (name,
                            dom.domid is not None and
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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