Score:0

On system startup, libvirtd fails with "Network is already in use" error

cn flag

I'm configuring a new system to host VMs with libvirtd (AlmaLinux 8.9, 4.18.0-425.13.1.el8; libvirt 8.0.0-10.2) and I'm seeing a weird behavior when I reboot the system.

On boot, libvirtd fails to start with a fatal "Network already in use" error. But then if I log in and manually start it, it fires right up without complaint. I have no idea why that would be. Here's what I'm seeing:

# uptime
 22:52:21 up 11 min,  1 user,  load average: 0.00, 0.02, 0.03
# systemctl status libvirtd
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Wed 2023-03-08 22:42:35 UTC; 9min ago
     Docs: man:libvirtd(8)
           https://libvirt.org
  Process: 1912 ExecStart=/usr/sbin/libvirtd $LIBVIRTD_ARGS (code=exited, status=0/SUCCESS)
 Main PID: 1912 (code=exited, status=0/SUCCESS)

Mar 08 22:40:34 sr650-hv-c2 systemd[1]: Starting Virtualization daemon...
Mar 08 22:40:35 sr650-hv-c2 systemd[1]: Started Virtualization daemon.
Mar 08 22:40:35 sr650-hv-c2 libvirtd[1912]: libvirt version: 8.0.0, package: 10.2.module_el8.7.0+3402+b6326d23 (AlmaLinux Packaging Team <pack>
Mar 08 22:40:35 sr650-hv-c2 libvirtd[1912]: hostname: sr650-hv-c2
Mar 08 22:40:35 sr650-hv-c2 libvirtd[1912]: internal error: Network is already in use by interface vm-bridge
Mar 08 22:42:35 sr650-hv-c2 systemd[1]: libvirtd.service: Succeeded.
# systemctl start libvirtd
# systemctl status libvirtd
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2023-03-08 22:52:35 UTC; 2s ago
     Docs: man:libvirtd(8)
           https://libvirt.org
 Main PID: 7892 (libvirtd)
    Tasks: 19 (limit: 32768)
   Memory: 15.2M
   CGroup: /system.slice/libvirtd.service
           7892 /usr/sbin/libvirtd --timeout 120

Mar 08 22:52:35 sr650-hv-c2 systemd[1]: Starting Virtualization daemon...
Mar 08 22:52:35 sr650-hv-c2 systemd[1]: Started Virtualization daemon.

Any idea what gives here? I have no idea why this would fail on system startup but succeed just a few minutes later.

Any and all help appreciated.

Thomas J. Girsch avatar
cn flag
I was able to get the service to load on system boot, but only by putting in a retry. I'm still unsure as to why it fails the first time but then subsequently succeeds. Guessing a timing issue?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.