Bug#963797: qemu user-mode networking (SLIRP) DNS doesn't work without resolv.conf

2020-07-03 Thread Michael Tokarev
Control: reassign -1 libslirp0 4.0.0-1
Control: tag -1 + confirmed upstrea

27.06.2020 14:46, Etienne Dechamps wrote:
> Package: qemu-system-x86
> Version: 1:5.0-5
> 
> resolv.conf(5) states:
> 
>> If [/etc/resolv.conf] does not exist, only the name server on the local 
>> machine will be queried, and the search list contains the local domain name 
>> determined from the hostname.
> 
> qemu user-mode networking (a.k.a SLIRP, a.k.a -netdev user) doesn't
> seem to follow this convention. Indeed, if the host doesn't have
> /etc/resolv.conf (or if it's empty), qemu is unable to answer DNS
> queries from the guest VM.

This is an issue in libslirp. I'll take care of it there.

Thanks!

/mjt



Bug#963797: qemu user-mode networking (SLIRP) DNS doesn't work without resolv.conf

2020-06-27 Thread Etienne Dechamps
Package: qemu-system-x86
Version: 1:5.0-5

resolv.conf(5) states:

> If [/etc/resolv.conf] does not exist, only the name server on the local 
> machine will be queried, and the search list contains the local domain name 
> determined from the hostname.

qemu user-mode networking (a.k.a SLIRP, a.k.a -netdev user) doesn't
seem to follow this convention. Indeed, if the host doesn't have
/etc/resolv.conf (or if it's empty), qemu is unable to answer DNS
queries from the guest VM.

The workaround is to create a valid /etc/resolv.conf with a
"nameserver 127.0.0.1" line.