Perhaps a change could be added to ignore 127.0.0.1 and 127.0.1.1
addresses returned by default?

Dnsmasq supports such an option, though it would need to be added to
libvirt as it regerates the dnsmasq conf file used each time a network
is started.


Add following by default to dnsmasq.conf generated by libvirt
---------------
ignore-address=127.0.0.1
ignore-address=127.0.1.1
---------------

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/1326536

Title:
  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:
  Triaged
Status in lxc package in Ubuntu:
  Triaged

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 127.0.1.1. 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 127.0.1.1. For example, if the host's hostname is
  BoxA, any VM running on the host will resolve BoxA to 127.0.1.1, 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:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1326536/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to