From: Jim Fehlig Subject: [PATCH] Fix 'xm reboot' Date: Wed, 12 Sep 2007 18:21:15 -0600 Message-ID: <46E8827B.4050009@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080503090103070804030503" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------080503090103070804030503 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 Regards, Jim --------------080503090103070804030503 Content-Type: text/x-patch; name="xend-reboot.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xend-reboot.diff" 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 --------------080503090103070804030503 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------080503090103070804030503--