> 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/frequently-asked-questions/determine-which-user-deleted-the-openstack-instance-from-ostackh.md).

# Determine Which User Deleted VM instance

## Problem

To find out which user deleted the VM instance. If the customer is unaware of the instance uuid, underlying host or in case of multiple instance deletion.

## Environment

* Platform9 Managed OpenStack - v4.0 and Higher

## Procedure

{% hint style="warning" %}
**Warning**

Either `<INSTANCE_NAME>` *or* `<INSTANCE_UUID>` should be known.
{% endhint %}

We have divided the steps into two parts as below:

1. Get the underlying host details of deleted VM instance from DB.
2. Access ostackhost logs of the underlying host

Lets understand each steps in detail:

1. **Get the underlying host details of deleted VM instance from Nova DB.**

{% hint style="info" %}
**Info**

If the HOST at which the VM was running is unknown, please reach out to Platform9 Support.
{% endhint %}

In the nova DB, below command is run to get the hostname.

{% tabs %}
{% tab title="DB Entry" %}

```ruby
mysql> select display_name,created_at,updated_at,deleted_at,uuid,node from instances where display_name="<INSTANCE_NAME>" and updated_at >='<TENTATIVE_DATE>';
+-----------------+---------------------+---------------------+---------------------+-----------------+------------+
| display_name    | created_at          | updated_at          | deleted_at          | uuid            | node       |
+-----------------+---------------------+---------------------+---------------------+-----------------+------------+
| [INSTANCE_NAME] | [CREATED_TIMESTAMP] | [UPDATED_TIMESTAMP] | [DELETED_TIMESTAMP] | [INSTANCE_UUID] | [HOSTNAME] |
+-----------------+---------------------+---------------------+---------------------+-----------------+------------+
1 row in set (0.00 sec)
```

{% endtab %}
{% endtabs %}

Once the underlying Host is identified, please proceed with the next step.

2. **Access ostackhost logs of the underlying host**

Login to the host to access ostackhost log or use support bundle logs and search for `[INSTANCE_UUID]` and "destroy the instance" like shown below:

{% tabs %}
{% tab title="On HOST" %}

```javascript
# grep "<INSTANCE_UUID>" /var/log/pf9/ostackhost.log* | grep -i "destroy the instance"
[TIMESTAMP] INFO nova.compute.manager [[REQ_ID] [USERNAME_WHO_DELETED] [OTHER_DETAILS] [instance: [INSTANCE_UUID]] Took 1.56 seconds to destroy the instance on the hypervisor.
```

{% endtab %}
{% endtabs %}

Look for `[USERNAME_WHO_DELETED]` that shows who performed the delete action.


---

# 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/frequently-asked-questions/determine-which-user-deleted-the-openstack-instance-from-ostackh.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.
