> 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/unable-to-deauthorize-hypervisor-instances-still-exist.md).

# Unable to Deauthorize Hypervisor (Instances Still Exist)

## Problem

* When attempting to disable a host, you receive an error similar to the following.

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

```none
An unexpected error occurred trying to deauthorize host.
```

{% endtab %}
{% endtabs %}

* Instances in the Clarity UI which reside on the hypervisor in question at Infrastructure > Instances are not in a standard state such as "Error," "Deleting" or "Active - Rebooting".
* The same instances do not respond to **delete** commands from the Clarity UI, OpenStack CLI, nor OpenStack API.

## Environment

* Platform9 Managed OpenStack - All Versions
* Nova

## Cause

A host with the hypervisor role cannot be removed from the OpenStack cluster when it is still hosting instances, in any state.

## Resolution

1. Identify any remaining instances hosted on the hypervisor in question.

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

```none
$ openstack server list --all-projects --host [host_uuid]
```

{% endtab %}
{% endtabs %}

2. Issue the following commands to delete the remaining instances.

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

```none
# nova reset-state [instance_uuid] --active# openstack server delete [instance_uuid]
```

{% endtab %}
{% endtabs %}

3. Bring down the ***nova-compute*** service.

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

```none
# nova service-force-down [host_uuid] nova-compute+--------------------------------------+--------------+-------------+| Host                                | Binary      | Forced down |+--------------------------------------+--------------+-------------+| [host_uuid]                         | nova-compute | True        |+--------------------------------------+--------------+-------------+
```

{% endtab %}
{% endtabs %}

4. Verify the compute service has been brought down successfully.

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

```none
$ nova service-list | grep [host_uuid]| 123 | nova-compute    | [host_uuid]        | nova    | enabled  | down  | 2018-10-02T19:05:47.000000 | -                                  |
```

{% endtab %}
{% endtabs %}

5. At this point, you can complete the standard procedure for deauthorizing a host as described in [How To Deauthorize A Host](https://docs.platform9.com/openstack/infrastructure/deauth-host/).


---

# 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/unable-to-deauthorize-hypervisor-instances-still-exist.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.
