# VM Fails to Start After Flavor Resize

## Problem

After successfully resizing the flavor of the VM, it is unable to start.

## Environment

* Private Cloud Director Virtualization - v2025.4 and Higher
* Self-Hosted Private Cloud Director Virtualization - v2025.4 and Higher
* Component: Compute Service

## Cause

There is a transient desynchronization between the Compute service and the hypervisor, where the instance state in the database did not match the actual state on the compute node.

## Diagnostics

1. Verify if the reported VM is present in the libvirt database on the compute host.&#x20;

{% code title="Host" overflow="wrap" %}

```bash
$ sudo virsh list --all | grep <VM_UUID>
```

{% endcode %}

2. Review the `/var/log/pf9/ostackhost.logs` over the compute host for the impacted VM. It complains around the soft reboot of the VM after successful flavor resize, has not completely deleted the older allocations \[from the old flavor].

{% code title="/var/log/pf9/ostackhost.logs" overflow="wrap" %}

```bash
INFO nova.compute.manager [[REQUEST_ID] [USER_NAME] service] [instance: [INSTANCE_ID]] Deleting allocations for old flavor on source node [COMPUTE_ID] after finish_resize failure. You may be able to recover the instance by hard rebooting it. 
```

{% endcode %}

3. The `ostackhost.log` also points to a mismatch in the instance count and intermittent "*Instance not found*” messages.

{% code title="/var/log/pf9/ostackhost.logs" overflow="wrap" %}

```bash
WARNING nova.compute.manager: While synchronizing instance power states, found 3 instances in the database and 2 instances on the hypervisor.
WARNING nova.compute.manager [instance: [INSTANCE_ID]]: Instance is unexpectedly not found. Ignore.
```

{% endcode %}

## Resolution

* Perform a [**HARD REBOOT**](https://docs.platform9.com/private-cloud-director/virtualized-clusters/virtualmachine/virtual-machine-actions#hard-reboot) of the affected VM to force a resynchronization between Nova and the hypervisor, which will bring the VM back to a healthy state.

## Validation

* Confirm the VM is now in **ACTIVE** state:

```bash
$ openstack server show -c status <VM_ID> 
```

* Ensure it is hosted correctly:

```bash
$ openstack server show -c OS-EXT-SRV-ATTR:hypervisor_hostname <VM_UUID>
```

* Ensure the VM is present in the active libvirt domains on the hypervisor.

{% code title="Host" overflow="wrap" %}

```bash
$ sudo virsh list --all | grep <VM_UUID>
```

{% endcode %}


---

# 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/pcd/compute/vm-fails-to-start-after-flavor-resize.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.
