> 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-nova-ap.md).

# Determine which user deleted the OpenStack instance from nova-api logs

## Problem

To find out which user did delete the VM instance from the environment

## Environment

* Platform9 Managed OpenStack - v4.0 and Higher

## Procedure

Check for instance uuid and delete requests in the **/var/log/nova/nova-api.log** file which is found on the management plane. If you are not sure about instance uuid simply search for the delete entry in the nova-api.log.

Or

if you are unsure about the instance uuid you can reach out to pf9 support team in case of multiple VM deletion entries.

Log entry will have entry something like this:

{% tabs %}
{% tab title="Standard - log entry" %}

```javascript
INFO nova.osapi_compute.wsgi.server [<Req-ID> <User-ID> <tenant/project-ID> - default default] 208.127.31.11,127.0.0.1 "DELETE //v2.1/<tenant/project-ID>/servers/<Instance-UUID> HTTP/1.1" status: 204 len: 381 time: 0.1670513
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Example log entry" %}

```javascript
# grep "7ffa00c0-2as4-47be-b54c-8f11sd6e6b01d" /var/log/nova/nova-api.log* | grep DELETE
nova/nova-api.log-20221222:2022-12-21 15:16:41,639.639 23454 INFO nova.osapi_compute.wsgi.server [req-db1d23ed-4c70-42d1-b4b9-f619b2ca1ce2 716af28923154e3c85dcee543d936f6f 999702806f164fbc8de45c31be6de847 - default default] 208.127.31.11,127.0.0.1 "DELETE //v2.1/999702806f164fbc8de45c31be6de847/servers/7ffa00c0-2as4-47be-b54c-8f11sd6e6b01d HTTP/1.1" status: 204 len: 381 time: 0.1670513
```

{% endtab %}
{% endtabs %}

In above example - description is given as below

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

```javascript
Req-ID							-  req-db1d23ed-4c70-42d1-b4b9-f619b2ca1ce2
User-ID							-  716af28923154e3c85dcee543d936f6f
Tenant/Project Id		-  999702806f164fbc8de45c31be6de847
Instance-UUID				-  7ffa00c0-2as4-47be-b54c-8f11sd6e6b01d
```

{% endtab %}
{% endtabs %}

Now, search for that User-ID to get the exact username using below command:

{% tabs %}
{% tab title="Get username" %}

```javascript
# openstack user list | grep 716af28923154e3c85dcee543d936f6f
| 716af28923154e3c85dcee543d936f6f | user@company-name.com                         |
```

{% endtab %}
{% endtabs %}

Here, <user@company-name.com> is the user who deleted the VM.


---

# 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-nova-ap.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.
