virtualbox dns says "unknown host" Win7 host/ubuntu guest

My PC runs Windows 7 and I have installed Virtualbox.

In virtualbox I have configured a virtual Ubuntu 12 machine.

When I run nm-tool in Ubuntu, it lists my local home router 192.168.N.M as the DNS server and I can ping this IP address. I can also ping 4.2.2.2 from the virtual Ubuntu.

My Windows 7 host OS has the same DNS server and it works fine.

The difference between the guest and the host OS is in the Gateway. My host OS has 192.168.N.M as the Gateway, but the virtual Ubuntu says 10.0.2.2.

In /etc/hosts it says:

"nameserver 127.0.0.1" but also warnings that I should not edit this file as edits will be overwritten.

Why is /etc/resolv.conf and nm-tool in disagreement about the DNS server address and how do I remedy this?