This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Fix 'xm reboot'
From: Jim Fehlig <jfehlig@xxxxxxxxxx>
Date: Wed, 12 Sep 2007 18:21:15 -0600
Delivery-date: Wed, 12 Sep 2007 17:22:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird (X11/20060911)
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
  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__
  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>


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" %
                            dom.domid is not None and
Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Fix 'xm reboot', Jim Fehlig <=