diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index aad08718fc..267f4e2f7a 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -1773,7 +1773,8 @@ class XendDomainInfo: self._cleanupVm() if self.dompath is not None: - xc.domain_destroy_hook(self.domid) + if self.domid is not None: + xc.domain_destroy_hook(self.domid) self.destroyDomain() self._cleanup_phantom_devs(paths)