Dnsmasq error when tried to run virtualization

Hi folks,
I need to resolve this error
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_leaseshelper) unexpected exit status 2: dnsmasq: failed to create listening socket for 192.168.122.1: Address already in use
When using the Virsh command, got the similar error message like this

virsh # net-start default
error: Failed to start network default
error: 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_leaseshelper) unexpected exit status 2: 
dnsmasq: failed to create listening socket for 192.168.122.1: Address already in use

This error occurs when I tried to activate the virtual machine networks. I don’t know what cause this error, because last week when use the QEMU virtualization, it works fine, and I didn’t do anything related with virtual network things recently.
I realize today, the virbr0 is missing and got that error message when tried to run my image.
the dnsmasq status

[kris@agung ~]$ systemctl status dnsmasq
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
     Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; enabled; preset: disabled)
     Active: active (running) since Wed 2024-04-24 10:28:15 WIB; 1h 5min ago
       Docs: man:dnsmasq(8)
    Process: 561 ExecStartPre=/usr/bin/dnsmasq --test (code=exited, status=0/SUCCESS)
   Main PID: 570 (dnsmasq)
      Tasks: 1 (limit: 18974)
     Memory: 2.5M (peak: 3.0M)
        CPU: 81ms
     CGroup: /system.slice/dnsmasq.service
             └─570 /usr/bin/dnsmasq -k --enable-dbus --user=dnsmasq --pid-file

Apr 24 10:31:21 agung dnsmasq[570]: using nameserver 203.142.82.222#53
Apr 24 10:31:21 agung dnsmasq[570]: using nameserver 203.142.84.222#53
Apr 24 11:32:58 agung dnsmasq[570]: no servers found in /etc/resolv.conf, will retry
Apr 24 11:33:01 agung dnsmasq[570]: reading /etc/resolv.conf
Apr 24 11:33:01 agung dnsmasq[570]: using nameserver 203.142.82.222#53
Apr 24 11:33:01 agung dnsmasq[570]: using nameserver 203.142.84.222#53
Apr 24 11:33:01 agung dnsmasq[570]: no servers found in /etc/resolv.conf, will retry
Apr 24 11:33:01 agung dnsmasq[570]: reading /etc/resolv.conf
Apr 24 11:33:01 agung dnsmasq[570]: using nameserver 203.142.82.222#53
Apr 24 11:33:01 agung dnsmasq[570]: using nameserver 203.142.84.222#53

the content of resolv.conf

[kris@agung ~]$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 203.142.82.222
nameserver 203.142.84.222

Please, help me resolve this problem. I need to run some software that only works in Ms. Windows.

Do you need this dnsmasq to be running? It conflicts with the dnsmasq process libvirt is trying to start.

If you don’t need the dnsmasq process started by the systemd service, you should stop and disable it. Libvirt will start and manage it’s own dnsmasq instance.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.