# pf9-ostackhost Service Failing With Error: "Connection to libvirt failed"

## Problem

* Instance creation is failing.
* The following error is present in / *var/log/pf9/ostackhost.log* on one or more of the hypervisors.

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

```none
INFO nova.virt.libvirt.driver [req-xxxx None None] Connection event '0' reason 'Failed to connect to libvirt'ERROR nova.virt.libvirt.host [req-xxxx None None] Connection to libvirt failed: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refusedfailed: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused
```

{% endtab %}
{% endtabs %}

Environment

* Platform9 Managed OpenStack - v3.11 and Higher
* Nova
* Libvirt

## Cause

The exact cause is yet to be determined.

## Resolution

1. Stop the ***libvirt-bin*** service.

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

```none
# systemctl stop libvirt-bin.service
```

{% endtab %}
{% endtabs %}

2. Stop the ***libvirt-bin*** socket.

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

```none
# systemctl stop libvirt-bin.socket
```

{% endtab %}
{% endtabs %}

3. Start the ***libvirt-bin*** service.

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

```none
# systemctl start libvirt-bin.service
```

{% 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/solution/pf9-ostackhost-service-failing-with-error-connection-to-libvirt.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.
