You are not logged in.

#1 2024-08-01 12:02:29

meijin
Member
From: Israel
Registered: 2009-03-05
Posts: 99

[Solved] Libvirt networking and systemd-reosolved instead of dnsmasq

I am trying to use `virt-manager` and create a new VM, based on QEMU/KVM, which fails with

Unable to complete install: 'Requested operation is not valid: network 'default' is not active'

As far as I understood from looking around, the problem is that I need to have `dnsmasq` installed and running. But when I am trying to start

dnsmasqd.service

it is unable to start with the following error (from `journalctl -xeu dnsmasq.service`):

Aug 01 14:53:27 Sapir-i7 dnsmasq[209126]: dnsmasq: syntax check OK.
Aug 01 14:53:27 Sapir-i7 dnsmasq[209127]: dnsmasq: failed to create listening socket for port 53: Address already in use
Aug 01 14:53:27 Sapir-i7 dnsmasq[209127]: failed to create listening socket for port 53: Address already in use
Aug 01 14:53:27 Sapir-i7 dnsmasq[209127]: FAILED to start up

I guess this is because I use

systemd-resolved`

as my DNS/DHCP resolver.
Is there any way to bypass that, besides not using `systemd-resolved`?

Last edited by meijin (2024-08-02 06:01:36)

Offline

#2 2024-08-01 12:36:40

cryptearth
Member
Registered: 2024-02-03
Posts: 666

Re: [Solved] Libvirt networking and systemd-reosolved instead of dnsmasq

an option could be to use a network-bridge instead of nat

Online

#3 2024-08-01 15:33:46

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,674

Re: [Solved] Libvirt networking and systemd-reosolved instead of dnsmasq

https://wiki.archlinux.org/title/Libvirt#Networking wrote:

If the default network cannot be started, make sure iptables-nft and dnsmasq are installed.

Arte both those programs installed ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2024-08-02 05:48:28

meijin
Member
From: Israel
Registered: 2009-03-05
Posts: 99

Re: [Solved] Libvirt networking and systemd-reosolved instead of dnsmasq

Lone_Wolf wrote:
https://wiki.archlinux.org/title/Libvirt#Networking wrote:

If the default network cannot be started, make sure iptables-nft and dnsmasq are installed.

Arte both those programs installed ?

both are installed, but as I wrote I can't start the dnsmasq service.

Offline

#5 2024-08-02 05:57:46

meijin
Member
From: Israel
Registered: 2009-03-05
Posts: 99

Re: [Solved] Libvirt networking and systemd-reosolved instead of dnsmasq

I also see it's written:

libvirt handles DHCP and DNS with dnsmasq, launching a separate instance for every virtual network. It also adds iptables rules for proper routing, and enables the ip_forward kernel parameter. This also means that having dnsmasq running on the host system is not necessary to support libvirt requirements (and could interfere with libvirt dnsmasq instances).p

Offline

#6 2024-08-02 06:01:20

meijin
Member
From: Israel
Registered: 2009-03-05
Posts: 99

Re: [Solved] Libvirt networking and systemd-reosolved instead of dnsmasq

so restarting the machine seems to have some progress, and this error is not longer shown.

Offline

Board footer

Powered by FluxBB