Libvirt Socket Binding Failed/Unable to Acquire PID File

Problem

  • The pf9-ostackhost service is failing, indicating that it is unable to connect to the Libvirt socket.
Copy
  • The libvirtd/libvirt-bin service is failing to start, complaining about being unable to access its pidfile.
Copy

Environment

  • Platform9 Managed OpenStack – v3.6 – v4.0
  • Nova
  • Libvirt 1.3.1
  • Ubuntu 16.04

Cause

Libvirtd is configured with the '-d' (daemon) option (set in /etc/default/libvirt-bin) which makes it unmanageable from a systemctl/systemd perspective – thus, attempting to start/restart the service will cause overlapping behavior, as a process is already started.

Copy

In order for the service to be properly managed – this flag should be unset.

Resolution

  1. Kill any running Libvirt process(es).
Copy
  1. Edit /etc/default/libvirt-bin and omit the '-d' flag from 'LIBVIRT_OPTS'.
  2. Save the file.
  3. Start the Libvirt service.
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard