VMware Communities
srynoname
Contributor
Contributor

Slow DNS lookup

Hello,

in all my virtual machines (workstation 7, vmware tools installed, guest systems: xp, 7, server 03, server 08) a DNS lookup takes around 4 seconds! How can I speed this up / fix this? Thanks!

Reply
0 Kudos
21 Replies
AWo
Immortal
Immortal

Which network do you use (bridged, NAT) and how long does that lookup take on the host (assumed the same DNS server and URL is used).


AWo

\[:o]===\[o:]

=Would you like to have this posting as a ringtone on your cell phone?=

=Send "Posting" to 911 for only $999999,99!=

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
Reply
0 Kudos
srynoname
Contributor
Contributor

thanks for your reply, I'm using the default NAT. DNS lookup on the host happens "immediately". This is why I have no idea where to start looking for errors 😞

Reply
0 Kudos
louyo
Virtuoso
Virtuoso

PMJI:

Somewhat internet address sensitive, but NAT seems to make a difference... Win 7 guest/ Ubuntu host:

-


From Guest, NAT mode:

C:\Users\Administrator>nslookup

Default Server: UnKnown

Address: 172.16.202.2

vmware.com

Server: UnKnown

Address: 172.16.202.2

DNS request timed out.

timeout was 2 seconds.

DNS request timed out.

timeout was 2 seconds.

Non-authoritative answer:

Name: vmware.com

Address: 165.193.233.120

yahoo.com

Server: UnKnown

Address: 172.16.202.2

Name: b1.www.vip.sp1.yahoo.com

Addresses: 209.131.36.159

209.131.36.159

Aliases: yahoo.com.localdomain

(172.16.202.2 is the default gateway assigned via NAT DHCP).

-


From Host:

lou@dell690:~$ nslookup

vmware.com

Server: 208.67.222.222

Address: 208.67.222.222#53

Non-authoritative answer:

Name: vmware.com

Address: 165.193.233.120

-


From Win7, changed to bridged mode, replicate physical network:

C:\Users\Administrator>nslookup vmware.com

Server: resolver1.opendns.com

Address: 208.67.222.222

Non-authoritative answer:

Name: vmware.com.ffhffh

Address: 208.69.32.132

-


Note that converting the DNS to static, when in NAT mode does not help.

Lou

Reply
0 Kudos
AWo
Immortal
Immortal

Which DNS server do you use in your guest? The host VMnet8 adapter +1?


AWo

\[:o]===\[o:]

=Would you like to have this posting as a ringtone on your cell phone?=

=Send "Posting" to 911 for only $999999,99!=

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
Reply
0 Kudos
srynoname
Contributor
Contributor

thank you all for your replies.

I'm using the "NAT: used to share the hosts ip address" option (the one where you don't explicitely choose a network adapter).I tried the bridged entwork adapter, this one works fine (meaning fast dns lookup). interesting, that gets the same results, so this seems to be a vmware problem.

I also tried:

  • custom network (VMnet 😎 and in the network editor (option nat settings for vmnet 😎 I added the DNS server manually (instead of auto detect available dns servers).

  • "NAT: used to share the hosts ip address" option and setting IP and DNS manually. Even this doesn't work! (like louyo also noted)

I want to use NAT though, not bridged 😞

@Awo: DNS server in guest is the one VMware assigns (which seems to be a virtual one / it's not the address of the only one DNS server / router I have). Also tried setting the router as DNS Server manually. Still takes around 4 seconds when using the NAT interface!

Reply
0 Kudos
srynoname
Contributor
Contributor

maybe a dumb question, but where can I report this as bug? Support is not available for trial users!?

Reply
0 Kudos
Scissor
Virtuoso
Virtuoso

DNS lookups are (mostly) UDP based -- maybe something is messing with UDP packets... What operating system are you running on your Host? Will assume Windows.

What Antivirus do you have installed on your Host? Any 3rd party firewall or other "security" software installed?

Try (temporarily) disabling any "task offload" or other "offload" settings for the Network Adapter installed in your Host to see if that makes a difference.

Reply
0 Kudos
srynoname
Contributor
Contributor

hello,

yes, I'm running win 7 x64. no anti virus and only the windos firewall. no other security software installed.

unfortunately I don't know, what you mean with task offload settings and where to find them? thanks!

Reply
0 Kudos
Scissor
Virtuoso
Virtuoso

unfortunately I don't know, what you mean with task offload settings and where to find them? thanks!

From your Desktop... Right Click Computer -> Manage -> Device Manager -> Network adapters -> right-click on your Network Adapter, properties -> Advanced Tab

Look for entries that mention "offload". Each adapter will be different. For example, my Broadcom adapter has "Large Send Offload", "Proxy ARP offload", "Proxy NS Offload", and "TCP/UDP Checksum offload" settings that can be enabled or disabled.

Reply
0 Kudos
srynoname
Contributor
Contributor

thanks for your instructions, I tried that, but it din't change anything 😞 Also the problem only occurs when using NAT (it works fine when using bridged), while both connections - nat and bridged - use the same (real) lan card, so shouldn't this problem be independet of the network card if one of them works?

Reply
0 Kudos
Scissor
Virtuoso
Virtuoso

thanks for your instructions, I tried that, but it din't change anything 😞 Also the problem only occurs when using NAT (it works fine when using bridged), while both connections - nat and bridged - use the same (real) lan card, so shouldn't this problem be independet of the network card if one of them works?

Ideally that would be correct, but who knows exactly how the vmware NAT service works?

Maybe check to make sure you are running the latest driver for your Host's network card?

What happens if you manually configure the DNS entry for your Guests while they are using NAT and set it to be the same DNS server that your desktop uses? Are Guest DNS lookups faster then?

Reply
0 Kudos
srynoname
Contributor
Contributor

After hours of playing aroudn I finally found a way to fix it, though I claim it's still a VMware Workstation problem:

On Windows 7 you can select a network profile (home, at work, public...). You have to select home and maybe restart your NAT-ted VM, then DNS lookups are as fast as they should be. If one selects the public profile, this results in very slow DNS lookups. This is the irony of it - in an insecure, public environment you get problems (slow DNS lookups) when you try to secure your guest by using the NAT interface! For me this is clearly a bug, however I still don't know where to report this...

BTW the free virtualbox has no problems using nat and the public network profile...

Reply
0 Kudos
mateid
Contributor
Contributor

I have what appears to be the same problem and your solution doesn't work for me.

I'm running VMware Player 4.0.0 build-471780 on a Windows 7 Pro x64 host, with a Mint 11/Kubuntu 11.04 guest. My network adapter is set to NAT. The contents of my /etc/resolv.conf are:

$ cat /etc/resolv.conf

domain localdomain
search localdomain
nameserver 192.168.106.2

Each nslookup through the (virtual) DNS above takes 2s, each nslookup through the host's DNS is instantaneous:

$ time nslookup vmware.com
Server:         192.168.106.2
Address:        192.168.106.2#53

Non-authoritative answer:
Name:   vmware.com
Address: 165.193.233.120


real    0m2.006s
user    0m0.000s
sys     0m0.000s

$ time nslookup vmware.com <real_dns_ip>
Server:         <real_dns_ip>
Address:        <real_dns_ip>#53

Non-authoritative answer:
Name:   vmware.com
Address: 165.193.233.120


real    0m0.006s
user    0m0.000s
sys     0m0.000s

I tried Home/Work/Public network settings in the Windows host, but I see no difference in results. The problem goes away if I manually add the external DNS ip at the top of resolv.conf. Is there a way to do this automatically each time I switch the external network of the host?

When using a Bridged connection for the VM network (instead of NAT), the problem also goes away. In that case resolv.conf gets the real DNS ip. However, I would prefer using NAT.

EDIT: I have realized in the meantime that for me, the problem above occurs only when using a wired network connection for the host. Wireless seems to be fine. I still wish this was fixed.

Reply
0 Kudos
derickso
Contributor
Contributor

I'm seeing the same behavior, Win 7 host with Ubuntu guest, I tried setting the network to private in my host and it made no difference.  This looks like a bug in their NAT-DNS code, it is taking an explicit timeout before sending the query out on the wire, eg if I go to the VMware Virtual Network Editor -> click the NAT network -> NAT Settings -> DNS Settings -> Timeout, the Timeout value in seconds is the amount of time between when your guest will send the DNS request, and your host will actually put it on the wire.  Unfortunately timeout of 0 uses the default value of 2s, but you can set 1 which is at least better than 2.  This definitely needs to be fixed asap.  As a workaround set static DNS in your guest if you can.

Reply
0 Kudos
derickso
Contributor
Contributor

Bump, still broken in Workstation 9.

Reply
0 Kudos
mateid
Contributor
Contributor

I didn't check the issue remains, if so, is there a way to change the status of the thread to "not answered" instead of "possibly answered"?

In the meantime, my permanent workaround for Mint 11 guest on Windows 7 host is as follows. In my case, I use wired internet in one location only (wireless in all others- where the DNS issue doesn't appear), and I know the ip of the DNS server, say 192.168.0.42.

/etc/network/interfaces contains (I didn't change it from the default):

auto lo
iface lo inet loopback

This means the real network interface is managed by NetworkManager. Then, I created by hand the executable file

/etc/NetworkManager/dispatcher.d/42_add-static-dns with the contents:

#!/bin/bash

if [ "$1" = eth0 -a "$2" = up ] ; then
  if ! grep -q 192\.168\.0\.42 /etc/resolv.conf && ping -W 1 -c 1 192.168.0.42 ; then
    mv /etc/resolv.conf /etc/resolv.conf-orig
    echo "nameserver 192.168.0.42" | cat - /etc/resolv.conf-orig >/etc/resolv.conf
  fi
fi

This works for me because the DNS server at the wired location is on a LAN that can be accessed only from that location. Anywhere else the ping fails and the server is not added to resolv.conf. Use at your own risk...

Reply
0 Kudos
pixelrebel
Contributor
Contributor

This is absolutely ridiculous.  This bug still exists 6 years later!??  Jesus H Christ VMWare.
My guests' DNS resolution went from lightning fast to crawling when I switched to manual interface configuration (manual dans servers) in MacOS.  The MacOS DNS resolution is perfect, but the guests fail. 

COME ON VMWARE ADDRESS THIS BUG!!!!!!

Reply
0 Kudos
rbhkamal
Contributor
Contributor

Agreed this is just emmbarising, something as basic as DNS lookups should be working %100 from day 1.

I'm running Windows 10 VM on a Windows 10 Host and this problem is driving me insane. I miss VirtualBox, it at least I would've been able to troubleshoot this and fix it (maybe). The sad part is that they wont even help because I'm past the 30 days of the "complimentary" support. Let's wait until amazon services switch to VMware... lol I'm sure they will fix this problem then.

Reply
0 Kudos
IgorFi
Contributor
Contributor

It's 2018 and the bug is still there. Had to use static DNS (My physical router, that is default gateway)

Reply
0 Kudos