Thanks Nathan to share you workaround as well, but IMHO it is "just as
good" as the --no-hosts flag. In that I mean while it prevent the reply
of for the Host it also stops any other entry in Hosts to be
used (which users might want or even already rely on).

Darragh, Jason and Serge tried to find a solution which keeps the wanted
behaviour (all but Host from /etc/hosts) but fixes the issue (Host
itself resolved to to make something suitable for libvirt
upstream submission.

Despite the time passing since then, I didn't see this or a similar
approach to be realized upstream yet.

You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to lxc in Ubuntu.

  libvirt's dnsmasq setup will read /etc/hosts on the host, resulting in
  odd resolution behaviour on the VM

Status in libvirt package in Ubuntu:
Status in lxc package in Ubuntu:

Bug description:
  When libvirt configures / starts up dnsmasq on the host, it does not
  pass --no-hosts, resulting in it reading in the /etc/hosts file from
  the host.

  The default ubuntu setup will have the host's hostname in /etc/hosts
  under Since libvirt's dnsmasq is reading this file,
  anything querying that dnsmasq instance will resolve the host's
  hostname out of /etc/hosts.

  The result of this is any VM running on the host will resolve the
  host's hostname as For example, if the host's hostname is
  BoxA, any VM running on the host will resolve BoxA to, which
  is not BoxA's actual address.

  Would recommend passing --no-hosts to dnsmasq when libvirt starts it
  up. If a user wants hardcoded hosts for their libvirt network, they
  can add them to /var/lib/libvirt/dnsmasq/default.addnhosts . If this
  is an acceptable solution, I'd be happy to write the patch up.

To manage notifications about this bug go to:

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to