# VM Build Failure Due to Nova Timeout

## Problem

The VM build is failing, and the following errors are seen in `ostackhost log`:

<pre data-overflow="wrap"><code><strong>INFO nova.compute.resource_tracker [[REQ_UUID] None None] Instance [VM_UUID] has allocations against this compute host but is not found in the database.
</strong>ERROR nova.compute.manager [[REQ_UUID] None None] Error updating resources for node [HOSTNAME]: oslo_messaging.exceptions.MessagingTimeout: Timed out waiting for a reply to message ID [MSG_UUID] 
</code></pre>

## Environment

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

## Cause

The root cause is the RPC response timeout threshold being exceeded for communication between **Nova Compute** and **Nova Conductor** via **RabbitMQ**.

> Optimizing the timeout value based on environmental factors can improve performance. In scenarios with slower networks or other delays, adjusting the Nova configuration helps ensure efficient request processing.

## Workaround

Increase the following parameters in the Nova configuration to allow more time for RPC communication and service reporting:

| Parameter              | Default Value | Updated Value |
| ---------------------- | ------------- | ------------- |
| `rpc_response_timeout` | 120s          | **180s**      |
| `report_interval`      | 60s           | **120s**      |

**1. On the Management Cluster (Control Plane)**

* Update the `nova-etc` Kubernetes secret with the new values.
* Restart the `nova-api-osapi` pods to pick up the changes.
* Verify the updated values are reflected in:

  ```bash
  /etc/pf9/nova/conf.d/nova.conf
  ```

**2. On Each Compute Host**

* Update the following file with the new parameter values:

  ```bash
  /opt/pf9/etc/nova/conf.d/nova.conf
  ```

  Add or modify under the `[DEFAULT]` section:

  ```ini
  [DEFAULT]
  rpc_response_timeout = 180
  report_interval = 120
  ```
* Restart the `pf9-ostackhost` service:

  ```bash
  sudo systemctl restart pf9-ostackhost
  ```

> **Note:** This change must be applied on **all compute hosts**.&#x20;

## Validation

After applying the changes to both the control plane and all compute hosts:

1. Attempt to provision multiple VMs concurrently (burst provisioning).
2. Monitor the `ostackhost.log` on the compute hosts for any recurrence of `MessagingTimeout` errors.
3. Check RabbitMQ pod logs for a reduction in `missed heartbeats from client` errors.
4. Confirm VMs are successfully built without entering ERROR or stuck BUILD state.


---

# 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-build-failure-due-to-nova-timeout.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.
