# VM stuck in MIGRATING state in UI forever even when migration completed

## Problem

* The VM got stuck in MIGRATING state in UI forever even when migration completed.

## Environment

* Platform9 Managed OpenStack - v5.4.9 and Higher

## Cause

* VM migration process was completed, but somehow during post migration operation source host did not receive confirmation from destination host about migration completion.

## Resolution

* Login to source and destination host and confirm where the VM is running:

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

```bash
# sudo virsh list
```

{% endtab %}
{% endtabs %}

## Additional Information

* Below error is observed on source host's ostackhost logs which shows migration was completed,but source host was not aware:

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

```bash
2023-08-03 13:42:44.311 INFO nova.virt.libvirt.driver [-] [instance: 12fc8be0-xxxx-4b5d-8688-c41f6cb29248] Migration operation has completed
2023-08-03 13:42:44.711 ERROR nova.compute.manager [-] [instance: 12fc8be0-xxxx-4b5d-8688-c41f6cb29248] Volume attachment c1d2cc78-xxxx-44fc-8c2a-5d05f5cbbd32 not deleted on source host 504c93ff-bb85-4f30-a23b-fd6905b3baac during post_live_migration: The request you have made requires authentication. (HTTP 401): cinderclient.exceptions.Unauthorized: The
request you have made requires authentication. (HTTP 401)
...
2023-08-03 13:42:48.433 ERROR nova.compute.manager [-] [instance: 12fc8be0-xxxx-4b5d-8688-c41f6cb29248] Post live migration at destination 2a68278c-0e86-48a7-859c-81974af290ef fa
iled: nova.exception_Remote.NeutronAdminCredentialConfigurationInvalid_Remote: Networking client is experiencing an unauthorized exception.
Traceback (most recent call last):

  File "/opt/pf9/venv/lib/python3.6/site-packages/nova/network/neutron.py", line 184, in wrapper
    ret = obj(*args, **kwargs)

  File "/opt/pf9/venv/lib/python3.6/site-packages/neutronclient/v2_0/client.py", line 269, in _handle_fault_response
    exception_handler_v20(status_code, error_body)

  File "/opt/pf9/venv/lib/python3.6/site-packages/neutronclient/v2_0/client.py", line 93, in exception_handler_v20
    request_ids=request_ids)
    ...
    ...
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://platform9.com/kb/pmo/frequently-asked-questions/vm-stuck-in-migrating-state-in-ui-forever-even-when-migration-co.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
