[Solved] DNS Not Working Any Guest on Linux Mint 13/Ubuntu 12.04
-
- Posts: 8
- Joined: 18. Oct 2008, 22:40
- Primary OS: Ubuntu 12.04
- VBox Version: PUEL
- Guest OSses: WinXP, Win7, OSGeo-Live
[Solved] DNS Not Working Any Guest on Linux Mint 13/Ubuntu 12.04
Just upgraded from VBox 3.1.x on Ubuntu 10.04 to VBox 4.1.12 on Linux Mint 13, which is based on Ubuntu 12.04. I installed the Oracle version of VBox from the standard repository, 4.1.12-77245~Ubuntu~precise. I have several virtual machines, including WinXP, Win7, Ubuntu 12.04, and OSGeo-Live (a Xubuntu-based geographic distro). I have DNS configured on my router, not on my host OS.
Running on 10.04, DNS lookup is working from all guest OSes. After upgrading the OS and the VBox version, DNS lookup is not working in any of them. If I set DNS "manually", i.e. in each guest OS, then everything works. Obviously, it would be easier to rely on setting DNS servers in just one place (i.e., the router). I did test setting DNS on the *host* OS, and reboot a guest OS to see if it would find the DNS server there, but that didn't work either.
All guest OSes are set to NAT. WinXP and OSGeo-Live are using the PCnet-FAST III adapter. Win7 and Ubuntu 12.04 are using the Intel PRO/1000 MT Desktop adapter.
Any ideas why this is and how to fix it?
Thanks,
--Lee
Running on 10.04, DNS lookup is working from all guest OSes. After upgrading the OS and the VBox version, DNS lookup is not working in any of them. If I set DNS "manually", i.e. in each guest OS, then everything works. Obviously, it would be easier to rely on setting DNS servers in just one place (i.e., the router). I did test setting DNS on the *host* OS, and reboot a guest OS to see if it would find the DNS server there, but that didn't work either.
All guest OSes are set to NAT. WinXP and OSGeo-Live are using the PCnet-FAST III adapter. Win7 and Ubuntu 12.04 are using the Intel PRO/1000 MT Desktop adapter.
Any ideas why this is and how to fix it?
Thanks,
--Lee
Last edited by leehach on 9. Jul 2012, 01:56, edited 1 time in total.
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: DNS Not Working Any Guest on Linux Mint 13/Ubuntu 12.04
Try this (on the host) in a terminal.
Replace the "VM name" with the name of your guest and don't forget the quotes " "
Code: Select all
VBoxManage modifyvm "VM name" --natdnshostresolver1 on
-
- Posts: 8
- Joined: 18. Oct 2008, 22:40
- Primary OS: Ubuntu 12.04
- VBox Version: PUEL
- Guest OSses: WinXP, Win7, OSGeo-Live
Re: DNS Not Working Any Guest on Linux Mint 13/Ubuntu 12.04
Awesome. Fixed the problem exactly.
So, was this an issue because I pulled the VMs from my old OS to my new OS? Or will to have to do these steps for each new VM that I create?
Thanks,
--Lee
So, was this an issue because I pulled the VMs from my old OS to my new OS? Or will to have to do these steps for each new VM that I create?
Thanks,
--Lee
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: [Solved] DNS Not Working Any Guest on Linux Mint 13/Ubuntu 12.04
Actually it is because Ubuntu in their infinite wisdom decided to change the way the (default) resolv.conf works so VPN users had it easier. So it was nothing you did. You can change it back to the original/everyone else's default but the command I sent you will allow it to work with the new settings. Google it and you can decide how you want to proceed.
-
- Posts: 8
- Joined: 18. Oct 2008, 22:40
- Primary OS: Ubuntu 12.04
- VBox Version: PUEL
- Guest OSses: WinXP, Win7, OSGeo-Live
Re: [Solved] DNS Not Working Any Guest on Linux Mint 13/Ubuntu 12.04
Thanks, Perryg. Will investigate further, but for now the fix you gave will suffice.
--Lee
--Lee
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: [Solved] DNS Not Working Any Guest on Linux Mint 13/Ubuntu 12.04
Just remember that this is a per VM fix. I am trying to investigate a global fix for this issue.
Re: [Solved] DNS Not Working Any Guest on Linux Mint 13/Ubuntu 12.04
Works...
Great problem solved, now have my file sync back...
thanks
Great problem solved, now have my file sync back...
thanks
Re: [Solved] DNS Not Working Any Guest on Linux Mint 13/Ubuntu 12.04
Thanks for this Perryg! As already stated above - this really is an AWESOME fixPerryg wrote:Try this (on the host) in a terminal.Replace the "VM name" with the name of your guest and don't forget the quotes " "Code: Select all
VBoxManage modifyvm "VM name" --natdnshostresolver1 on
![Very Happy :D](./images/smilies/icon_biggrin.gif)
-
- Posts: 1
- Joined: 8. Apr 2015, 20:34
Re: [Solved] DNS Not Working Any Guest on Linux Mint 13/Ubuntu 12.04
Just signed up to say thank you for this solution~
Re: [Solved] DNS Not Working Any Guest on Linux Mint 13/Ubuntu 12.04
I know this is an old post but it still comes up on google near the top for this problem. I had this problem and worked around the issue using the VBoxManage command above. It worked for a long time but then stopped working again today. I ran tcpdump and saw a dns packet leaving my Ubuntu vm, wireshark on windows host saw it resolve and return a response back to the vm... very frustrating! My Arch box works just fine with resolv.conf generated traditionally, but Ubuntu couldn't resolve DNS with resolv.conf at localhost (via dnsmask).
I couldn't figure it out, I ended up disabling dnsmask
sudo vi /etc/NetworkManager/NetworkManager.conf
#dns=dnsmasq
sudo restart network-manager
My resolv.conf changes from localhost to the nameservers specified by cisco anyconnect. It is able to resolve now (although it was able to before -- just didn't work!)
This works for now but i'm curious why this combination breaks, and only sometimes!:
W7 host
Ubuntu 14.04 guest with default dnsmasq running
Cisco Anyconnect
I couldn't figure it out, I ended up disabling dnsmask
sudo vi /etc/NetworkManager/NetworkManager.conf
#dns=dnsmasq
sudo restart network-manager
My resolv.conf changes from localhost to the nameservers specified by cisco anyconnect. It is able to resolve now (although it was able to before -- just didn't work!)
This works for now but i'm curious why this combination breaks, and only sometimes!:
W7 host
Ubuntu 14.04 guest with default dnsmasq running
Cisco Anyconnect
Re: [Solved] DNS Not Working Any Guest on Linux Mint 13/Ubuntu 12.04
Just say thank you, it run for me =)Perryg wrote:Try this (on the host) in a terminal.Replace the "VM name" with the name of your guest and don't forget the quotes " "Code: Select all
VBoxManage modifyvm "VM name" --natdnshostresolver1 on
Re: [Solved] DNS Not Working Any Guest on Linux Mint 13/Ubuntu 12.04
Thank you for this! I tried using the original suggestion to run the VBoxManage command on my host OS, but it did not fix the issue for me (although it did seem to work for many others). Doing as you suggested, however, has allowed my VM to perform DNS resolution properly again. Unfortunately, this does not work with the "Bridged Adapter" network adapter enabled in the VM settings, so I had to use NAT, instead (I'm currently looking for an alternative solution).quickmana wrote:I ended up disabling dnsmask
sudo vi /etc/NetworkManager/NetworkManager.conf
#dns=dnsmasq
sudo restart network-manager
My resolv.conf changes from localhost to the nameservers specified by cisco anyconnect. It is able to resolve now (although it was able to before -- just didn't work!)
Nevertheless, thank you for posting this helpful answer!
For reference, here is my system configuration:
Code: Select all
Windows 7 host OS
Linux Mint 17.3 Rosa guest OS
VirtualBox 5.0.26
Cisco AnyConnect
-
- Posts: 11
- Joined: 17. Mar 2011, 17:47
- Primary OS: MS Windows 7
- VBox Version: OSE other
- Guest OSses: Linux Mint 18 & Kali Linux 2
- Location: England
- Contact:
Re: [Solved] DNS Not Working Any Guest on Linux Mint 13/Ubuntu 12.04
my host is Windows 7 with latest virtual box
client is kali linux and mint 18 and mint 17 (i use all 3 of these) and when i try to restart network-manager service it never works (i mean the internet will not return until reboot) how can i fix this please?
client is kali linux and mint 18 and mint 17 (i use all 3 of these) and when i try to restart network-manager service it never works (i mean the internet will not return until reboot) how can i fix this please?
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: [Solved] DNS Not Working Any Guest on Linux Mint 13/Ubuntu 12.04
@ jamied_uk,
You say your host is Windows and you posted in the Linux host section. I would repost in the Windows host section and see what they have to say.
You say your host is Windows and you posted in the Linux host section. I would repost in the Windows host section and see what they have to say.
-
- Posts: 11
- Joined: 17. Mar 2011, 17:47
- Primary OS: MS Windows 7
- VBox Version: OSE other
- Guest OSses: Linux Mint 18 & Kali Linux 2
- Location: England
- Contact:
Re: [Solved] DNS Not Working Any Guest on Linux Mint 13/Ubuntu 12.04
Ok thanks for not removing b4 i had chance to copy and paste question lol.