1

I have a brand new Fedora Server 36 minimal install and all it will run is KVM.

Did the install with dnf group install "Headless Virtualization" and restarted the server.

systemctl status libvirtd showed it was not running; i.e.

[root@dell-fedora-kvm ~]# systemctl status libvirtd
○ libvirtd.service - Virtualization daemon
     Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: disabled)
     Active: inactive (dead)
TriggeredBy: ○ libvirtd-tcp.socket
             ○ libvirtd-admin.socket
             ○ libvirtd-ro.socket
             ○ libvirtd-tls.socket
             ○ libvirtd.socket
       Docs: man:libvirtd(8)
             https://libvirt.org

so I tried to enable it with systemctl enable libvirtd

restarted and it still doesn't start automatically. When I start it manually systemctl start libvirtd this is what I get with status. Not sure this tells us where the issue could be.

root@dell-fedora-kvm ~]# systemctl status libvirtd
● libvirtd.service - Virtualization daemon
     Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: disabled)
     Active: active (running) since Sun 2022-07-03 16:32:23 AEST; 52s ago
TriggeredBy: ○ libvirtd-tcp.socket
             ● libvirtd-admin.socket
             ● libvirtd-ro.socket
             ○ libvirtd-tls.socket
             ● libvirtd.socket
       Docs: man:libvirtd(8)
             https://libvirt.org
   Main PID: 857 (libvirtd)
      Tasks: 21 (limit: 32768)
     Memory: 44.8M
        CPU: 480ms
     CGroup: /system.slice/libvirtd.service
             ├─ 857 /usr/sbin/libvirtd --timeout 120
             ├─ 957 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
             └─ 958 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper

Jul 03 16:32:23 dell-fedora-kvm systemd[1]: Started libvirtd.service - Virtualization daemon. Jul 03 16:32:24 dell-fedora-kvm dnsmasq[957]: started, version 2.86 cachesize 150 Jul 03 16:32:24 dell-fedora-kvm dnsmasq[957]: compile time options: IPv6 GNU-getopt DBus no-UBus no-i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset auth cryptoh> Jul 03 16:32:24 dell-fedora-kvm dnsmasq-dhcp[957]: DHCP, IP range 192.168.122.2 -- 192.168.122.254, lease time 1h Jul 03 16:32:24 dell-fedora-kvm dnsmasq-dhcp[957]: DHCP, sockets bound exclusively to interface virbr0 Jul 03 16:32:24 dell-fedora-kvm dnsmasq[957]: reading /etc/resolv.conf Jul 03 16:32:24 dell-fedora-kvm dnsmasq[957]: using nameserver 127.0.0.53#53 Jul 03 16:32:24 dell-fedora-kvm dnsmasq[957]: read /etc/hosts - 2 addresses Jul 03 16:32:24 dell-fedora-kvm dnsmasq[957]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses Jul 03 16:32:24 dell-fedora-kvm dnsmasq-dhcp[957]: read /var/lib/libvirt/dnsmasq/default.hostsfile

However the service dies after a while...

[root@dell-fedora-kvm ~]# systemctl status libvirtd
○ libvirtd.service - Virtualization daemon
     Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: disabled)
     Active: inactive (dead) since Sun 2022-07-03 16:37:25 AEST; 6s ago
TriggeredBy: ○ libvirtd-tcp.socket
             ● libvirtd-admin.socket
             ● libvirtd-ro.socket
             ○ libvirtd-tls.socket
             ● libvirtd.socket
       Docs: man:libvirtd(8)
             https://libvirt.org
    Process: 994 ExecStart=/usr/sbin/libvirtd $LIBVIRTD_ARGS (code=exited, status=0/SUCCESS)
   Main PID: 994 (code=exited, status=0/SUCCESS)
      Tasks: 2 (limit: 32768)
     Memory: 31.7M
        CPU: 330ms
     CGroup: /system.slice/libvirtd.service
             ├─ 957 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
             └─ 958 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper

Jul 03 16:35:25 dell-fedora-kvm systemd[1]: Starting libvirtd.service - Virtualization daemon... Jul 03 16:35:25 dell-fedora-kvm systemd[1]: Started libvirtd.service - Virtualization daemon. Jul 03 16:35:25 dell-fedora-kvm dnsmasq[957]: read /etc/hosts - 2 addresses Jul 03 16:35:25 dell-fedora-kvm dnsmasq[957]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses Jul 03 16:35:25 dell-fedora-kvm dnsmasq-dhcp[957]: read /var/lib/libvirt/dnsmasq/default.hostsfile Jul 03 16:37:25 dell-fedora-kvm systemd[1]: libvirtd.service: Deactivated successfully. Jul 03 16:37:25 dell-fedora-kvm systemd[1]: libvirtd.service: Unit process 957 (dnsmasq) remains running after unit stopped. Jul 03 16:37:25 dell-fedora-kvm systemd[1]: libvirtd.service: Unit process 958 (dnsmasq) remains running after unit stopped.

Any idea what's going on?

  • Have you tried starting a VM after you see this? Mine shows the exact same thing after I've run a couple of VMs then shut them down. – ajgringo619 Jul 04 '22 at 16:43
  • No, I haven't as I'm puzzled by the fact that the service dies after a while (which seems to tie with the '--timeout 120' parameter. I have followed this guide (https://www.youtube.com/watch?v=DDjTBRq-r7k) and it looks like this is a different package as in the video under the loaded section the service and vendor presets are enabled whereas in my case it's not. In the video all he did was to reboot the server (as the vendor present is enabled) and the service started. How do I refresh/rebuild the cache of the packages used in Fedora? Also would you be able to send your libvirtd.service file? – Thomas Meier Jul 04 '22 at 22:45
  • I haven't used Fedora in a while, sorry. Here's the link to my libvirtd.service file (default, from EndeavourOS): https://clbin.com/ITS92 – ajgringo619 Jul 04 '22 at 23:50
  • Thanks. I'll compare these and see whether there's any difference – Thomas Meier Jul 05 '22 at 00:19
  • No luck @ajgringo619. Your libvirtd.service is exactly the same as mine. So I'm back to square one. Maybe I post this issue on https://stackoverflow.com/questions/tagged/libvirt as I haven't found anything like this online which is hard to believe.... txs anyway – Thomas Meier Jul 05 '22 at 13:03
  • 1
    Works as designed - all good now. This behaviour was changed; more here >> https://fedoraproject.org/wiki/Changes/LibvirtModularDaemons – Thomas Meier Jul 11 '22 at 11:55

0 Answers0