# "Unable to obtain pidfile" Error While Starting Libvirtd Service

## Problem

* ***libvirtd*** service failed to start with below error reported in */var/log/messages.*

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

```none
kdt-dpckvm01 libvirtd[404581]: libvirt version: 1.3.1, package: 1ubuntu10.24 (Marc Deslauriers [marc.deslauriers@ubuntu.com] Wed, 23 May 2018 13:29:29 -0400)kdt-dpckvm01 libvirtd[404581]: hostname: kdt-dpckvm01kdt-dpckvm01 libvirtd[404578]: /usr/sbin/libvirtd: error: Unable to obtain pidfile. Check /var/log/messages or run without --daemon for more info.kdt-dpckvm01 libvirtd[404581]: Failed to acquire pid file '/var/run/libvirtd.pid': Resource temporarily unavailablekdt-dpckvm01 systemd[1]: libvirt-bin.service: Main process exited, code=exited, status=1/FAILUREkdt-dpckvm01 systemd[1]: libvirt-bin.service: Unit entered failed state.kdt-dpckvm01 systemd[1]: libvirt-bin.service: Failed with result 'exit-code'.kdt-dpckvm01 systemd[1]: libvirt-bin.service: Service hold-off time over, scheduling restart.
```

{% endtab %}
{% endtabs %}

## Environment

* Platform9 Managed OpenStack - v3.6.0 and Higher

## Cause

The ***libvirtd*** service fails to start as the */var/run/libvirtd.pid* file is not accessible.

## Resolution

1. Remove PID file on the affected KVM host.

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

```none
$ rm -rf /var/run/libvirtd.pid
```

{% endtab %}
{% endtabs %}

2. Restart the ***libvirtd*** service on the KVM host.

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

```none
$ systemctl restart libvirt
```

{% 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/how-to/unable-to-obtain-pidfile-error-while-starting-libvirtd-service.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.
