[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] dns server not working in QEMU using usermode networkin
From: |
Samuel Thibault |
Subject: |
Re: [Qemu-devel] dns server not working in QEMU using usermode networking (SLIRP) |
Date: |
Sat, 6 May 2017 11:23:16 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
FONNEMANN Mark, on sam. 06 mai 2017 04:18:52 +0000, wrote:
> >That's so weird there's no packet log. Does your guest perhaps have the
> >strace tool? Or perhaps you >can manage to copy it over from another VM,
> >since it only depends on libc.
>
> See attached file.
Ok, so for some reason it doesn't even try to emit a packet...
> open("/etc/resolv.conf", O_RDONLY) = 3
> read(3, "nameserver 10.0.2.3\n\n", 4096) = 21
It does get the proper nameserver.
> connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT
> (No such file or directory)
It tries to connect to nscd but that's not running.
> open("/etc/nsswitch.conf", O_RDONLY) = 3
> read(3, "hosts: files\n", 4096) = 18
> read(3, "", 4096) = 0
And I guess that's the culprit: in nsswitch.conf you only have
"hosts: files", so
> open("/lib/libnss_files.so.2", O_RDONLY) = 3
> open("/etc/hosts", O_RDONLY) = 3
> read(3, "127.0.0.1\tlocalhost\n10.0.2.15\tqe"..., 4096) = 35
It only uses /etc/hosts.
So, in your /etc/nsswitch.conf, use
hosts: files dns
Samuel