[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Libvirt dnsmasq oddity



On 1/16/23 05:02, Charles Curley wrote:
On Sun, 15 Jan 2023 18:18:00 -0600
Nicholas Geovanis <nickgeovanis@gmail.com> wrote:

I would first want to find out why the samba server is doing that
"sometimes" but not others.

My first guess would be that you have a hostname identified somewhere
that resolves to 2 different addresses, depending. And one or both
may be defaulted addresses.

Indeed. And you are correct, but not, I think, in the way you mean.
On the network's DNS server, hawk (the samba server and host for the vms
in question) resolves to an address on the internal network for the
benefit of other computers on the network. But, thanks to /etc/hosts,
on hawk it resolves to an address on the loopback interface.

The problem appears to be that libvert's dnsmasq instance picks up the
contents of /etc/hosts in order to serve them to the VMs, all well and
good, except that it serves up the address of hawk as well.

root@hawk:~# cat /etc/hosts
127.0.0.1	localhost
127.0.1.1	hawk.localdomain	hawk

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
root@hawk:~#

I don't think I added those entries. I just checked a few other
machines, including a vm I recently built, and they all show similar
entries.

Perhaps I should comment out one or both entries for hawk.


Or use [1].

[1] https://libvirt.org/formatnetwork.html#network-namespaces

--
John Doe


Reply to: