> 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-migrate-instance-as-image-used-to-create-instance-is.md).

# Unable to Migrate Instance as Image Used to Create Instance is Deleted

## Problem

Unable to migrate the instance as the original image used to create the instance is deleted.

## Environment

* Platform9 Managed OpenStack - All Versions
* Nova
* Glance
* QEMU

## Cause

The instance cannot be resized or migrated as the image is deleted from the Glance node.

**Note**: If the backing file is not present on the hypervisor running the instance, the image cannot be recreated.

## Resolution

1. Execute the following command on the hypervisor running the instance to check if the backing file is present or not.

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

```none
$ sudo qemu-img info [INSTANCE_STORAGE_PATH]/[INSTANCE_UUID]/disk
```

{% endtab %}
{% endtabs %}

2. Copy the backing file to the */tmp* directory of the Glance node in your environment.
3. Check the file format of the backing file.

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

```none
$ qemu-img info /tmp/backing_file
```

{% endtab %}
{% endtabs %}

4. If the backing file is in raw format, convert it into qcow2 format.

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

```none
$ qemu-img convert -f raw -O qcow2 [backing_file_name] [original_image_name]
```

{% endtab %}
{% endtabs %}

5. Change ownership of the file 'original\_image\_name'.

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

```none
$ chown pf9:pf9group filename
```

{% endtab %}
{% endtabs %}

6. Check the integrity of the image rebuilt by creating a test instance.


---

# 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-migrate-instance-as-image-used-to-create-instance-is.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.
