> 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="https://3413721029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8o9pwjt91cVZOj58RUXj%2Fuploads%2Fgit-blob-42d91bca5f346e2fa64bc06bf6ded292e1224652%2F1623345431.png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
