diff options
| -rw-r--r-- | nova/virt/xenapi/vmops.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index 84da93e73..6883e9c8c 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -1109,7 +1109,10 @@ class VMOps(object): """ LOG.info(_("Destroying VM"), instance=instance) - vm_ref = self._get_vm_opaque_ref(instance) + # We don't use _get_vm_opaque_ref because the instance may + # truly not exist because of a failure during build. A valid + # vm_ref is checked correctly where necessary. + vm_ref = VMHelper.lookup(self._session, instance['name']) rescue_vm_ref = VMHelper.lookup(self._session, "%s-rescue" % instance.name) |
