diff -urN old/tools/python/xen/xend/XendDomainInfo.py new/tools/python/xen/xend/XendDomainInfo.py --- old/tools/python/xen/xend/XendDomainInfo.py 2006-09-01 16:07:18.000000000 -0400 +++ new/tools/python/xen/xend/XendDomainInfo.py 2006-09-02 18:51:48.000000000 -0400 @@ -1087,6 +1087,15 @@ ## public: def destroyDevice(self, deviceClass, devid): + if type(devid) is str: + devicePath = '%s/device/%s' % (self.dompath, deviceClass) + for entry in xstransact.List(devicePath): + backend = xstransact.Read('%s/%s' % (devicePath, entry), "backend") + devName = xstransact.Read(backend, "dev") + if devName == devid: + # We found the integer matching our devid, use it instead + devid = entry + break return self.getDeviceController(deviceClass).destroyDevice(devid)