Instance Booted via UEFI Unable to be Deleted
Problem
Instances launched with UEFI boot enabled will not delete with error "Requested operation is not valid: cannot delete inactive domain with nvram".
Environment
Platform9 Managed OpenStack - v3.6.0 and Higher
Nova
OVMF
Libvirt/Virsh
Cause
This behavior is related to an upstream bug - LP#1567807. Nova creates a libvirt instance with [loader] and [nvram] elements, and libvirt refuses to implicitly delete the nvram file.
Resolution
Obtain the UUID and Host of the instance you are trying to delete. For example, via Clarity UI.

SSH into the host where the instance is launched.
Verify if the instance is running on the hypervisor.
Undefine the domain using
virsh.
Note: The --nvram flag has to be explicitly defined, else un-define will fail with the same error as initially described. 5. The instance may now be deleted successfully.
Additional Information
Last updated
