# VM Creation Failed Due to Port Binding Failure

## Problem <a href="#problem" id="problem"></a>

VM creation failed due to the following error:

{% code title="ostackhost.logs" %}

```bash
nova.exception.PortBindingFailed: Binding failed for port [PORT-UUID] please check neutron logs for more information.
```

{% endcode %}

## Environment

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

## Cause <a href="#cause" id="cause"></a>

This issue occurs when Neutron agents on compute nodes are unable to bind the requested port to the VM. Common causes include:

* OVN controller on the compute node is unresponsive or out of sync with the OVN Southbound database.
* Neutron server-to-OVN database communication issues.
* Stale port binding records in OVN or Neutron.

## Diagnostics <a href="#diagnostics" id="diagnostics"></a>

* Review ostackhost logs on the affected compute host:

  ```bash
  $ cat /var/log/pf9/ostackhost.log | grep -i <VM_ID>
  ```
* Check Neutron agent status:

  ```bash
  $ openstack network agent list
  ```
* Review OVN controller logs on the compute node:

  ```bash
  $ sudo journalctl -u ovn-controller -f
  $ cat /var/log/ovn/ovn-controller.log
  ```

## Resolution <a href="#resolution" id="resolution"></a>

Restart OVN services on the affected compute node(s):

```bash
$ sudo systemctl restart ovn-controller
```

{% hint style="warning" %}
Restarting `ovn-controller` on a compute node generally does not disrupt existing VM traffic since OVS flows remain programmed, but it temporarily prevents new port bindings, VM spawns, or security group updates
{% endhint %}

## Validation <a href="#validation" id="validation"></a>

* Confirm the VM builds successfully
* Verify the Neutron port binding:

  ```bash
  $ openstack port list --server <vm-id>
  ```


---

# 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/networking/vm-creation-failed-due-to-port-binding-failure.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.
