VirtualBox

Opened 14 years ago

Closed 14 years ago

#5789 closed defect (invalid)

UseHostResolver not working for Linux guest on Windows XP host

Reported by: Alberto Lusiani Owned by:
Component: network/NAT Version: VirtualBox 3.1.2
Keywords: Cc:
Guest type: Linux Host type: Windows

Description

UseHostResolver is not working for me both with VirtualBox 3.1.0 and 3.1.2 for Linux guests on a Windows XP host. The Windows XP account used for running VirtualBox is *unprivileged*. I setup a Centos 5.4 guest and a Slitaz guest on Windows XP as mentioned in the manual. Although the manual is not clear enough, by reading the web and the log files it appears that for UseHostResolver to work DNSProxy should be zero. Therefore I configured as follows:

VBoxManage setextradata "Linux Guest"
      "VBoxInternal/Devices/pcnet/0/LUN#0/Config/UseHostResolver" 1
VBoxManage setextradata "Linux Guest"
      "VBoxInternal/Devices/pcnet/0/LUN#0/Config/DNSProxy" 0

I tried also "!DNSProxy 1" and it did not work either.

Both Linux guests are configured to either set DNS from DHCP or set it statically to 10.0.2.3 and end up with 10.0.2.3 in /etc/resolv.conf. I use NAT networking plus one hostonly interface in the default subnet to communicate between host and guest. Attempting DNS resolution from the guest with "host" or "nslookup" commands hangs. By forcing the DNS server to other addresses like 10.0.2.2 or 10.0.2.14 I the host/nslookup command ends with an error, while with DSN server = 10.0.2.3 it hangs. The same commands work if the VM is rebooted after configuration with "DNSProxy 1" and "UseHostResolver 0".

I report a probably unrelated issue. With the mentioned configuration I can connect from the guest to the host using the hostonly address at 192.168.56.1 but also at other addresses which were unexpected for me: 10.0.2.2, 10.0.2.3, 10.0.2.4. I have an ssh server on the host, I am able to login on the host from the guest at all the above addresses, the only thing that changes is that for the ssh server on the host the connection appear to come from "localhost" for the 10.* addressed and from the hostonly guest IP in the other case.

Attachments (3)

VBox.log (64.6 KB ) - added by Alberto Lusiani 14 years ago.
VBox.2.log (38.2 KB ) - added by Alberto Lusiani 14 years ago.
slitaz-2.0-x86.xml (6.4 KB ) - added by Alberto Lusiani 14 years ago.

Download all attachments as: .zip

Change History (25)

by Alberto Lusiani, 14 years ago

Attachment: VBox.log added

comment:1 by vasily Levchenko, 14 years ago

Component: networknetwork/NAT

in reply to:  description ; comment:2 by vasily Levchenko, 14 years ago

Replying to alusiani:

UseHostResolver is not working for me both with VirtualBox 3.1.0 and 3.1.2 for Linux guests on a Windows XP host. The Windows XP account used for running VirtualBox is *unprivileged*. I setup a Centos 5.4 guest and a Slitaz guest on Windows XP as mentioned in the manual. Although the manual is not clear enough, by reading the web and the log files it appears that for UseHostResolver to work DNSProxy should be zero.

Let's for beginning clarify difference between DNSProxy and HostResolver. DNSProxy offer x.x.x.3 as DNS server forwarding all DNS requests to registered name servers on host. UseHostResolver offers x.x.x.3 server as DNS server but all requests are wrapped to calls to gethostbyname and responses are sent back. When this both this options used DNSproxy is disabled with force.

Therefore I configured as follows:

VBoxManage setextradata "Linux Guest"
      "VBoxInternal/Devices/pcnet/0/LUN#0/Config/UseHostResolver" 1
VBoxManage setextradata "Linux Guest"
      "VBoxInternal/Devices/pcnet/0/LUN#0/Config/DNSProxy" 0

I tried also "!DNSProxy 1" and it did not work either.

Both Linux guests are configured to either set DNS from DHCP or set it statically to 10.0.2.3 and end up with 10.0.2.3 in /etc/resolv.conf. I use NAT networking plus one hostonly interface in the default subnet to communicate between host and guest. Attempting DNS resolution from the guest with "host" or "nslookup" commands hangs. By forcing the DNS server to other addresses like 10.0.2.2 or 10.0.2.14 I the host/nslookup command ends with an error, while with DSN server = 10.0.2.3 it hangs.

Do you trying to resolve valid host name (resolved fine from host), or it happens for any nslookups? Please send me (vasily _dot_ v _dot_ levchenko _at_ Sun _dot_ COM) pcap file if you're able to trace traffic from host using wireshark that would be helpful.

The same commands work if the VM is rebooted after configuration with "DNSProxy 1" and "UseHostResolver 0".

I report a probably unrelated issue. With the mentioned configuration I can connect from the guest to the host using the hostonly address at 192.168.56.1 but also at other addresses which were unexpected for me:

10.0.2.2 - your host 10.0.2.3 - DNS 10.0.2.4 - built-in TFTP server

. I have an ssh server on the host, I am able to login on the host from the guest at all the above addresses, the only thing that changes is that for the ssh server on the host the connection appear to come from "localhost" for the 10.* addressed and from the hostonly guest IP in the other case.

in reply to:  2 comment:3 by Alberto Lusiani, 14 years ago

Replying to Hachiman:

Replying to alusiani:

UseHostResolver is not working for me both with VirtualBox 3.1.0 and 3.1.2 for Linux guests on a Windows XP host. The Windows XP account used for running VirtualBox is *unprivileged*. [...]

Do you trying to resolve valid host name (resolved fine from host), or it happens for any nslookups? Please send me (vasily _dot_ v _dot_ levchenko _at_ Sun _dot_ COM) pcap file if you're able to trace traffic from host using wireshark that would be helpful.

I try to resolve valid host names such as "www.cern.ch" which are resolved fine both on the host and on the guests when UseHostResolver=0 and DNSProxy=1.

I followed instructions on pcap file but encountered the following error when starting the VM:

shell> VBoxManage modifyvm slitaz-2.0-x86 --nictrace1 on --nictracefile1 "VBox.pcap"
shell> VirtualBox -startvm slitaz-2.0-x86

[error popup appears]

Relevant fragments of VBox.log:

00:00:01.308 [/Devices/pckbd/0/LUN#1/AttachedDriver/Config/] (level 6)
00:00:01.308   Object <integer> = 0x0000000001073900 (17250560)
00:00:01.308 
00:00:01.308 [/Devices/pckbd/0/LUN#1/Config/] (level 5)
00:00:01.308   QueueSize <integer> = 0x0000000000000080 (128)
00:00:01.308 
00:00:01.308 [/Devices/pcnet/] (level 2)
00:00:01.308 
00:00:01.308 [/Devices/pcnet/0/] (level 3)
00:00:01.308   PCIDeviceNo   <integer> = 0x0000000000000003 (3)
00:00:01.308   PCIFunctionNo <integer> = 0x0000000000000000 (0)
00:00:01.308   Trusted       <integer> = 0x0000000000000001 (1)
00:00:01.308 
00:00:01.308 [/Devices/pcnet/0/Config/] (level 4)
00:00:01.308   Am79C973       <integer> = 0x0000000000000001 (1)
00:00:01.308   CableConnected <integer> = 0x0000000000000001 (1)
00:00:01.308   LineSpeed      <integer> = 0x0000000000000000 (0)
00:00:01.308   MAC            <bytes>   = "08 00 27 9a f1 75" (cb=6)
00:00:01.308 
00:00:01.308 [/Devices/pcnet/0/LUN#0/] (level 4)
00:00:01.308   Driver <string>  = "NetSniffer" (cb=11)
00:00:01.308 
00:00:01.308 [/Devices/pcnet/0/LUN#0/AttachedDriver/] (level 5)
00:00:01.308   Driver <string>  = "NAT" (cb=4)
00:00:01.308 
00:00:01.308 [/Devices/pcnet/0/LUN#0/AttachedDriver/Config/] (level 6)
00:00:01.308   BootFile   <string>  = "slitaz-2.0-x86.pxe" (cb=19)
00:00:01.308   TFTPPrefix <string>  = "C:\Documents and Settings\VBox\.VirtualBox\TFTP" (cb=48)
00:00:01.308 
00:00:01.308 [/Devices/pcnet/0/LUN#0/Config/] (level 5)
00:00:01.309   DNSProxy        <integer> = 0x0000000000000000 (0)
00:00:01.309   File            <string>  = "VBox.pcap" (cb=10)
00:00:01.309   UseHostResolver <integer> = 0x0000000000000001 (1)
00:00:01.309 
00:00:01.309 [/Devices/pcnet/0/LUN#999/] (level 4)
00:00:01.309   Driver <string>  = "MainStatus" (cb=11)
00:00:01.309 
00:00:01.309 [/Devices/pcnet/0/LUN#999/Config/] (level 5)
00:00:01.309   papLeds <integer> = 0x00000000010855b8 (17323448)
00:00:01.309 
00:00:01.309 [/Devices/pcnet/1/] (level 3)
00:00:01.309   PCIDeviceNo   <integer> = 0x0000000000000008 (8)
00:00:01.309   PCIFunctionNo <integer> = 0x0000000000000000 (0)
00:00:01.309   Trusted       <integer> = 0x0000000000000001 (1)
00:00:01.309 
00:00:01.309 [/Devices/pcnet/1/Config/] (level 4)
00:00:01.309   Am79C973       <integer> = 0x0000000000000001 (1)
00:00:01.309   CableConnected <integer> = 0x0000000000000001 (1)
00:00:01.309   LineSpeed      <integer> = 0x0000000000000000 (0)
00:00:01.309   MAC            <bytes>   = "08 00 27 41 19 3e" (cb=6)
00:00:01.309 
00:00:01.309 [/Devices/pcnet/1/LUN#0/] (level 4)
00:00:01.309   Driver <string>  = "IntNet" (cb=7)
00:00:01.309 
00:00:01.309 [/Devices/pcnet/1/LUN#0/Config/] (level 5)
00:00:01.309   Network   <string>  = "HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter" (cb=62)
00:00:01.309   Trunk     <string>  = "\DEVICE\{6AE384E6-2948-4D0C-A4A9-0AF1000BFD94}" (cb=47)
00:00:01.309   TrunkType <integer> = 0x0000000000000004 (4)
00:00:01.309 
00:00:01.309 [/Devices/pcnet/1/LUN#999/] (level 4)
00:00:01.309   Driver <string>  = "MainStatus" (cb=11)
00:00:01.309 
00:00:01.309 [/Devices/pcnet/1/LUN#999/Config/] (level 5)
00:00:01.309   papLeds <integer> = 0x00000000010855bc (17323452)
00:00:01.309 

[...]

00:00:01.396 PDM: Failed to construct 'pcnet'/0! VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES (-2805) - A driver encountered an unknown configuration value. This means that the driver is potentially misconfigured and the driver construction failed because of this.
00:00:01.407 VMSetError: D:\tinderbox\win-3.1\src\VBox\VMM\VM.cpp(323) VMR3Create
00:00:01.407 VMSetError: Unknown error creating VM
00:00:01.408 ERROR [COM]: aRC=E_FAIL (0x80004005) aIID={6375231a-c17c-464b-92cb-ae9e128d71c3} aComponent={Console} aText={Unknown error creating VM (VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES)} aWarning=false, preserve=false
00:00:01.412 Power up failed (vrc=VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES, rc=E_FAIL (0X80004005))

Doing

VBoxManage modifyvm slitaz-2.0-x86 --nictrace1 off --nictracefile1 "VBox.pcap"

is sufficient to let the VM start agains, but without network tracing.

comment:4 by vasily Levchenko, 14 years ago

Could you please try this

# VBoxManage setextradata slitaz-2.0-x86 "VBoxInternal/Devices/pcnet/0/LUN#0/Config/DNSProxy"
# VBoxManage modifyvm slitaz-2.0-x86 --nictrace1 on --nictracefile1 "VBox.pcap"
# VirtualBox -startvm slitaz-2.0-x86

And please don't paste logs, just attach them.

in reply to:  4 ; comment:5 by Alberto Lusiani, 14 years ago

Replying to Hachiman:

Could you please try this

# VBoxManage setextradata slitaz-2.0-x86 "VBoxInternal/Devices/pcnet/0/LUN#0/Config/DNSProxy"
# VBoxManage modifyvm slitaz-2.0-x86 --nictrace1 on --nictracefile1 "VBox.pcap"
# VirtualBox -startvm slitaz-2.0-x86

The start VM command aborts with error, like before, I attach the log file separately. I also add here the commands I typed:

vbox@nbalu2> VBoxManage setextradata slitaz-2.0-x86 "VBoxInternal/Devices/pcnet/0/LUN#0/Config/DNSProxy"
VirtualBox Command Line Management Interface Version 3.1.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

vbox@nbalu2> VBoxManage modifyvm slitaz-2.0-x86 --nictrace1 on --nictracefile1 "VBox.pcap"
VirtualBox Command Line Management Interface Version 3.1.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

vbox@nbalu2> VirtualBox -startvm slitaz-2.0-x86

by Alberto Lusiani, 14 years ago

Attachment: VBox.2.log added

in reply to:  5 ; comment:6 by vasily Levchenko, 14 years ago

Replying to alusiani:

Replying to Hachiman:

The start VM command aborts with error, like before,

I attach the log file separately.

Thanks. Could you please attach your xml config file.

by Alberto Lusiani, 14 years ago

Attachment: slitaz-2.0-x86.xml added

in reply to:  6 ; comment:7 by Alberto Lusiani, 14 years ago

Replying to Hachiman:

Replying to alusiani:

Replying to Hachiman:

The start VM command aborts with error, like before,

I attach the log file separately.

Thanks. Could you please attach your xml config file.

I have just done it. Thanks for your attention.

in reply to:  7 ; comment:8 by vasily Levchenko, 14 years ago

Replying to alusiani:

I have just done it.

Thanks, looks good. Does it make any change if for testing host resolver you've disable your second adapter (host-only)?

in reply to:  8 ; comment:9 by Alberto Lusiani, 14 years ago

Replying to Hachiman:

Replying to alusiani:

I have just done it.

Thanks, looks good. Does it make any change if for testing host resolver you've disable your second adapter (host-only)?

I tried now: I observe the same problems when I disable the hostonly interface.

in reply to:  9 ; comment:10 by vasily Levchenko, 14 years ago

Replying to alusiani:

I tried now: I observe the same problems when I disable the hostonly interface.

Hm, does UseHostResolver work for other guest, e.g. Ubuntu linux for you? I've noticed it much slower here for the same nslookups on SliTaz guest than on Ubuntu, but can't get hangs response.

in reply to:  10 ; comment:11 by Alberto Lusiani, 14 years ago

Replying to Hachiman:

Replying to alusiani:

I tried now: I observe the same problems when I disable the hostonly interface.

Hm, does UseHostResolver work for other guest, e.g. Ubuntu linux for you? I've noticed it much slower here for the same nslookups on SliTaz guest than on Ubuntu, but can't get hangs response.

I only have one Slitaz and one Centos 5 guest: UseHostResolver hangs for both. If a find some spare time I will check if I can get an already prepared Ubuntu client.

in reply to:  11 comment:12 by vasily Levchenko, 14 years ago

Replying to alusiani: Have you got any news? Still can't reproduce issue here.

comment:13 by Gary, 14 years ago

I am not sure if it is related but I am having problems with DNS resolution for ANY guest under the Win host. I am using Win7 and any vm I reate with "bridged" networking fails to allow DNS resolution. I am routing fine and can access via IP address and I can ping my DNS server, but requests to that server always fail. If I use "NAT" networking, the DNS works ok.

This has only begun happening since my upgrade to 3.1.2. Prior to that the DNS worked fine. My guest failures include Win7(64 and 32 bit), WinXP, Ubuntu and OpenSolaris.

in reply to:  13 comment:14 by vasily Levchenko, 14 years ago

Replying to ghutch:

I am not sure if it is related but I am having problems with DNS resolution for ANY guest under the Win host. I am using Win7 and any vm I reate with "bridged" networking fails to allow DNS resolution. I am routing fine and can access via IP address and I can ping my DNS server, but requests to that server always fail. If I use "NAT" networking, the DNS works ok.

Do I understand you right? DNS resolving doesn't work with bridged networking, but works with NAT. Could you please check if DNS resolving works for you with NAT if you enable host resolver mechanism:

VBoxManage setextradata "Linux Guest"
      "VBoxInternal/Devices/pcnet/0/LUN#0/Config/UseHostResolver" 1

your guests should receive x.x.x.3 as dns server via dhcp.

This has only begun happening since my upgrade to 3.1.2. Prior to that the DNS worked fine. My guest failures include Win7(64 and 32 bit), WinXP, Ubuntu and OpenSolaris.

comment:15 by Gary, 14 years ago

I am having trouble finding where to edit for the host resolver mechanism. What path is the file? I looked in a OpenSolaris guest. I dont see it in /etc, /var, /usr or /opt.

It is odd that no matter the guest OS, I can get DNS within the guest to work if I setup the guest networking to NAT, but not if I set it to bridged. My router (dlink) is set to forward DNS activity to 192.168.1.1. If the guest is set to bridged it shows 192.168.1.1 as the DNS server and I can ping that server. However, nslookup fails as do any attempts via browsers to access any URL by it's name. I can access URL's by IP address with no problem.

Does this sound related to what this thread started to document? If not, I can start a new thread..

comment:16 by Gary, 14 years ago

I am sorry, Actually, it was Fedora guest I was looking for the "resolver mechanism" file to edit??

comment:17 by Gary, 14 years ago

Here is some NAT info from a successful DNS config. Again, it is NAT.


ifconfig -a
eth0      Link encap:Ethernet  HWaddr 08:00:27:B2:05:49
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:feb2:549/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:29 errors:0 dropped:0 overruns:0 frame:0
          TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3786 (3.6 KiB)  TX bytes:5997 (5.8 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:22 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1868 (1.8 KiB)  TX bytes:1868 (1.8 KiB)

pan0      Link encap:Ethernet  HWaddr D6:25:56:27:0F:63  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

[gary@fedspike ~]$ cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver 192.168.1.1

comment:18 by Gary, 14 years ago

Here is a bridged session. I can ping the 192.168.1.1 or even the google.com IP address. I just cannot get ANY name resolution at all...


[gary@fedspike ~]$ nslookup google.com
;; connection timed out; no servers could be reached

[gary@fedspike ~]$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 08:00:27:B2:05:49  
          inet addr:192.168.1.148  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:feb2:549/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:205 errors:0 dropped:0 overruns:0 frame:0
          TX packets:140 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:13542 (13.2 KiB)  TX bytes:13592 (13.2 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1040 (1.0 KiB)  TX bytes:1040 (1.0 KiB)

pan0      Link encap:Ethernet  HWaddr 2A:FF:22:C6:BD:87  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

[gary@fedspike ~]$ cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver 192.168.1.1


comment:19 by Gary, 14 years ago

Is it possible that there is a problem in the VBoxNetflt driver? It seems to have been updated in 3.1.2 for Windows.

in reply to:  17 comment:20 by vasily Levchenko, 14 years ago

Replying to ghutch: Looks like you're experiencing problem with bridged networking. It'd be better to open separate defect for that because it's been open for NAT networking.

comment:21 by Gary, 14 years ago

Ok, I have opened a new bugtrack as #5890.

http://www.virtualbox.org/ticket/5890

comment:22 by vasily Levchenko, 14 years ago

Resolution: invalid
Status: newclosed

no a NAT bug, corresponding bug for hostif was opened.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use