Skip to contentSkip to conversation

Fix xm destory

PATCH New Masaki Kanno 1 participant 1 message Aug 3, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix xm destory

Hi,

I saw the following error message. (A domain of domain name XXX does not exist.)

# xm list
Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0     1019     2 r-----    29.8
# xm destroy XXX
Error: an integer is required

This patch fixes it to print the following error message.

# xm list
Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0     1019     2 r-----    35.8
# xm destroy XXX
Error: the domain 'XXX' does not exist.

Best regards,
Kan

tools/python/xen/xend/XendDomain.py +2 -2
diff -r aa1ab056bfbf tools/python/xen/xend/XendDomain.py
@@ -402,9 +402,9 @@ class XendDomain:
             val = dominfo.destroy()
         else:
             try:
-                val = xc.domain_destroy(domid)
+                val = xc.domain_destroy(int(domid))
             except Exception, ex:
-                raise XendError(str(ex))
+                raise XendInvalidDomain(str(domid))
         return val       
 
     def domain_migrate(self, domid, dst, live=False, resource=0, port=0):

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