Libvirt dnsmasq oddity

Charles Curley charlescurley at
Sun Jan 15 22:40:14 UTC 2023

I seem to have hit an oddity in how dnsmasq operates for libvirt.

I have two host machines each with several guests. One of those is also
the local samba server. Guests on the non-samba server can resolve the
samba server's host name correctly, so far without fail.

Guests on the samba server sometimes get the correct IP address for the
samba server, and other times get an IP address for the samba server of That is the IP address provided in the host's /etc/hosts.
Similarly for amanda and hosts.

I have a workaround of hard coding the IP address in the fstab entry,
but that's tacky. Is there a better way to handle this?

One possible way: non-virtual machines use a bind9 server. dnsmasq has
an option, --no-hosts, to inhibit reading the hostnames in /etc/hosts.
How do I feed that to dnsmasq?

Thank you.

root at hawk:~# cat /etc/debian_version 
root at hawk:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye
root at hawk:~# pre libvirt dnsmasq qemu
dnsmasq-base	2.85-1		amd64
gir1.2-libvirt-glib-1.0	3.0.0-1		amd64
ipxe-qemu	1.0.0+git-20190125.36a4c85-5.1		all
libvirt0	7.0.0-3		amd64
libvirt-clients	7.0.0-3		amd64
libvirt-daemon	7.0.0-3		amd64
libvirt-daemon-config-network	7.0.0-3		all
libvirt-daemon-config-nwfilter	7.0.0-3		all
libvirt-daemon-driver-lxc	7.0.0-3		amd64
libvirt-daemon-driver-qemu	7.0.0-3		amd64
libvirt-daemon-driver-vbox	7.0.0-3		amd64
libvirt-daemon-driver-xen	7.0.0-3		amd64
libvirt-daemon-system	7.0.0-3		amd64
libvirt-daemon-system-systemd	7.0.0-3		all
libvirt-glib-1.0-0	3.0.0-1		amd64
python3-libvirt	7.0.0-2		amd64
qemu	1:5.2+dfsg-11+deb11u2		amd64
qemu-system-common	1:5.2+dfsg-11+deb11u2		amd64
qemu-system-data	1:5.2+dfsg-11+deb11u2		all
qemu-system-gui	1:5.2+dfsg-11+deb11u2		amd64
qemu-system-x86	1:5.2+dfsg-11+deb11u2		amd64
qemu-utils	1:5.2+dfsg-11+deb11u2		amd64
root at hawk:~# 

Does anybody read signatures any more?

More information about the libvirt-users mailing list