Libvirt service fails to start on reboot

Hi,

Kernel : 4.18.0-348.2.1.el8_5.x86_64

Libvirt was re-enabled and it still fails to start on reboot.

# systemctl list-unit-files |grep libvirt
libvirt-guests.service disabled
libvirtd.service enabled
libvirtd-admin.socket disabled
libvirtd-ro.socket enabled
libvirtd-tcp.socket disabled
libvirtd-tls.socket disabled
libvirtd.socket enabled

What logs can be checked ?
As libvirtd.log was not filling up anything, I used this for logging (tried with 1-4 values)

log_outputs=“3:file:/var/log/libvirt/libvirtd.log”

Service starts properly on manually starting it after reboot.

Can you check the output of the following after trying to start it via systemctl?:

journalctl -e -x libvirtd

I’d also see if SELinux is set to Enforcing and if so check the audit logs at /var/log/audit/audit.log to see if it’s triggering something when starting it from the service file.

One typical “can’t start at boot” error for some services is that they start a bit too early and attempt to use network connections that do not exist yet. However, those services do log the errors.

Systemd’s journald should have those, viewable by:

sudo systemctl status libvirtd
sudo journalctl -xeu libvirtd

(Assuming it is the libvirtd.service unit that we are interested in.)

If you do run rsyslogd, then the files it writes to could have a copy, and if the libvirtd explicitly writes to files according to your config, those files should(?) get something.

Hi,

This was the last logs found for libvirt :

journalctl -xeu libvirtd

  • Logs begin at Wed 2021-12-22 06:32:24 EST, end at Fri 2021-12-24 02:59:01 EST. -
    Dec 22 10:01:48 oc003 systemd[1]: Starting Virtualization daemon…
    – Subject: Unit libvirtd.service has begun start-up
    – Defined-By: systemd
    – Support: Red Hat Customer Experience & Engagement - Red Hat Customer Portal

    – Unit libvirtd.service has begun starting up.
    Dec 22 10:01:48 oc003 systemd[1]: Started Virtualization daemon.
    – Subject: Unit libvirtd.service has finished start-up
    – Defined-By: systemd
    – Support: Red Hat Customer Experience & Engagement - Red Hat Customer Portal

    – Unit libvirtd.service has finished starting up.

    – The start-up result is done.

According to that the service has started without error.
What do you get with:

systemctl status libvirtd