You are not logged in.

#1 2024-07-27 21:36:57

rdx22
Member
Registered: 2024-07-21
Posts: 9

Unable to start libvirt default network - address already in use

Im trying to launch a vm with network access but i keep struggling to make it work. I have no docker on this machine so i dont really know what else can be at conflict here. I tried purging config files of both virt-manager and libvirt as well as resetting nftables to default config

sudo virsh net-list --all

error: Failed to list networks
error: Failed to connect socket to '/var/run/libvirt/virtnetworkd-sock': No such file or directory

trying to start libvirtd results in:

○ libvirtd.service - libvirt legacy monolithic daemon
     Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; preset: disabled)
     Active: inactive (dead) since Sat 2024-07-27 23:22:43 CEST; 20s ago
   Duration: 6.658s
 Invocation: 9fa88975552f4689a22f4290a65717f1
TriggeredBy: ○ libvirtd-ro.socket
             ○ libvirtd-admin.socket
             ○ libvirtd.socket
       Docs: man:libvirtd(8)
             https://libvirt.org/
   Main PID: 2644 (code=exited, status=0/SUCCESS)
   Mem peak: 12.4M
        CPU: 390ms

Jul 27 23:22:36 arch systemd[1]: Starting libvirt legacy monolithic daemon...
Jul 27 23:22:36 arch systemd[1]: Started libvirt legacy monolithic daemon.
Jul 27 23:22:36 arch dnsmasq[2726]: failed to create listening socket for 192.168.122.1: Address already in use
Jul 27 23:22:36 arch dnsmasq[2726]: FAILED to start up
Jul 27 23:22:36 arch libvirtd[2644]: libvirt version: 10.5.0
Jul 27 23:22:36 arch libvirtd[2644]: hostname: arch
Jul 27 23:22:36 arch libvirtd[2644]: internal error: Child process (VIR_BRIDGE_NAME=virbr0 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_>
                                     dnsmasq: failed to create listening socket for 192.168.122.1: Address already in use
Jul 27 23:22:43 arch systemd[1]: Stopping libvirt legacy monolithic daemon...
Jul 27 23:22:43 arch systemd[1]: libvirtd.service: Deactivated successfully.
Jul 27 23:22:43 arch systemd[1]: Stopped libvirt legacy monolithic daemon.

/var/lib/libvirt/dnsmasq/default.conf

##WARNING:  THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
##OVERWRITTEN AND LOST.  Changes to this configuration should be made using:
##    virsh net-edit default
## or other application using the libvirt API.
##
## dnsmasq conf file created by libvirt
strict-order
pid-file=/run/libvirt/network/default.pid
except-interface=lo
bind-dynamic
interface=virbr0
dhcp-range=192.168.122.2,192.168.122.254,255.255.255.0
dhcp-no-override
dhcp-authoritative
dhcp-lease-max=253
dhcp-hostsfile=/var/lib/libvirt/dnsmasq/default.hostsfile
addn-hosts=/var/lib/libvirt/dnsmasq/default.addnhosts

Last edited by rdx22 (2024-07-27 22:04:11)

Offline

#2 2024-07-27 22:12:18

rdx22
Member
Registered: 2024-07-21
Posts: 9

Re: Unable to start libvirt default network - address already in use

never mind the solution is to not have dnsmasq enabled in systemctl... no clue why it was enabled possibly done by mistake when troubleshooting

Offline

#3 2026-08-21 03:15:37

dtoraelek
Member
From: Sanford, NC
Registered: 2026-08-01
Posts: 4

Re: Unable to start libvirt default network - address already in use

Having the same exact issue on my system, except NAT does not work when dnsmasq is not running. I theorize something could potentially be interfering with the program. Here is a list of currently running processes:

 $ rc-status
Runlevel: default
 dbus                                                                                         [  started 04:03:06 (0) ]
 NetworkManager                                                                                           [  started  ]
 dnsmasq                                                                                      [  started 00:04:01 (0) ]
 netmount                                                                                                 [  started  ]
 lxdm                                                                                                     [  started  ]
 ntpd                                                                                         [  started 04:03:04 (0) ]
 libvirtd                                                                                                 [  started  ]
 local                                                                                                    [  started  ]
 agetty.tty1                                                                                  [  started 04:03:04 (0) ]
 agetty.tty2                                                                                  [  started 04:03:04 (0) ]
 agetty.tty3                                                                                  [  started 04:03:04 (0) ]
 agetty.tty4                                                                                  [  started 04:03:04 (0) ]
 agetty.tty5                                                                                  [  started 04:03:04 (0) ]
 agetty.tty6                                                                                  [  started 04:03:04 (0) ]
Dynamic Runlevel: hotplugged
 user.dtor                                                                                    [  started 04:00:04 (0) ]
Dynamic Runlevel: needed/wanted
 virtlogd                                                                                                 [  started  ]
Dynamic Runlevel: manual

Disabling dnsmasq causes an error claiming it isn't found. I wonder if I have to modify the IPv4 address statically to fix the conflict.


In my hatred of AI, Industrialized Linux [components], and Microsoft; I have taken to a more... aggressively different of a system without IBM's or Microsoft's Influence.

Offline

#4 2026-08-21 08:15:57

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,643
Website

Re: Unable to start libvirt default network - address already in use


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB