Skip to content
Advertisement

DNS server not working in QEMU usermode networking

I am trying to get QEMU 2.8.0 on Windows host to work with my Linux guest with vanilla 2.6.11.12 kernel but it is responding with unknown host.

nslookup

I am using user mode networking (SLIRP). Here’s my qemu network status:

info network

And my ifconfig:

eth0

And my routing table:

routing table

I am able to ping the router but not the QEMU DNS server:

ping

Any help would be greatly appreciated! Thank you very much.

Advertisement

Answer

This was not a problem with QEMU but instead a problem with my DNS setup.

My /etc/nsswitch.conf contained:

hosts: files

instead of the correct:

hosts: files dns

So it was not making the DNS requests to the server.

Advertisement