Hello Ching,
The workaround we did for Clear Linux about this was something like:

diff --git a/nova/virt/libvirt/guest.py b/nova/virt/libvirt/guest.py
index 263f873..1df0476 100644
--- a/nova/virt/libvirt/guest.py
+++ b/nova/virt/libvirt/guest.py
@@ -199,8 +199,13 @@ class Guest(object):
     def delete_configuration(self):
         """Undefines a domain from hypervisor."""
         try:
-            self._domain.undefineFlags(
-                libvirt.VIR_DOMAIN_UNDEFINE_MANAGED_SAVE)
+            if '<nvram template=' in self._domain.XMLDesc():
+                self._domain.undefineFlags(
+                    libvirt.VIR_DOMAIN_UNDEFINE_NVRAM |
+                    libvirt.VIR_DOMAIN_UNDEFINE_MANAGED_SAVE)
+            else:
+                self._domain.undefineFlags(
+                    libvirt.VIR_DOMAIN_UNDEFINE_MANAGED_SAVE)
         except libvirt.libvirtError:
             LOG.debug("Error from libvirt during undefineFlags. %d"
                       "Retrying with undefine", self.id)

That way the `VIR_DOMAIN_UNDEFINE_NVRAM` flag will be called only if the
instance was booted using uefi (NVRAM)

As you can check in our nova src.rpm in 
https://download.clearlinux.org/releases/7310/clear/source/SRPMS/nova-12.0.2-133.src.rpm
( you could extract the files by running
$ rpm2cpio 
https://download.clearlinux.org/releases/7310/clear/source/SRPMS/nova-12.0.2-133.src.rpm
 | cpio -divm
and then take a look at the 0006-Enable-UEFI-boot-for-kvm-and-qemu.patch )

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1567807

Title:
  nova delete doesn't work with EFI booted VMs

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1567807/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to