> For the complete documentation index, see [llms.txt](https://platform9.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platform9.com/kb/pmo/solution/instance-booted-via-uefi-unable-to-be-deleted.md).

# 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](https://bugs.launchpad.net/ubuntu/+source/nova/+bug/1567807). Nova creates a **libvirt** instance with **\[loader]** and **\[nvram]** elements, and **libvirt** refuses to implicitly delete the nvram file.

## Resolution

1. Obtain the UUID and Host of the instance you are trying to delete. For example, via Clarity UI.

<figure><img src="/files/aYAvyMbaAvamD7EgxSQg" alt="Screen_Shot_2018-10-29_at_9.27.38_AM.png"><figcaption><p>Screen_Shot_2018-10-29_at_9.27.38_AM.png</p></figcaption></figure>

2. SSH into the host where the instance is launched.
3. Verify if the instance is running on the hypervisor.

{% tabs %}
{% tab title="None" %}

```none
virsh list -all | grep [instance_uuid]
```

{% endtab %}
{% endtabs %}

4. Undefine the domain using **`virsh`**.

{% tabs %}
{% tab title="None" %}

```none
virsh undefine [instance_uuid] --nvram
```

{% endtab %}
{% endtabs %}

**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

* [Setup Hypervisor for UEFI boot](https://support.platform9.com/hc/en-us/articles/360011092454)
* [Manual: virsh](https://linux.die.net/man/1/virsh)
* [Documentation: OVMF](https://github.com/tianocore/tianocore.github.io/wiki/OVMF)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://platform9.com/kb/pmo/solution/instance-booted-via-uefi-unable-to-be-deleted.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
