No Internet access in VirtualBox
I had a bit of a problem the other day.
I run VirtualBox on Linux Mint and have a copy of Windows 7 running on a virtual machine. I use it to run those very few programmes that don’t have a Linux equivalent.
For various reasons I decided to install a new copy of 7 and delete the old one.
The installation ran without a hitch and everything worked perfectly except for one thing – I couldn’t access the Internet.
I was able to browse my local network all right and to connect to and browse the other devices. However I could not access any web sites. I was able to ping external sites but that’s all.
I tried searching the Net for a solution and found loads of suggestions about changing the network configuration of VirtualBox, mostly suggesting I attach to Bridged Adaptor instead of NAT. I tried all the suggestions without success, so I had to rely on my own efforts.
The solution was simple and quite obvious.
The installation of the guest software [Windows 7] had configured the Network to default values. The IP4 was set to “Obtain an IP address automatically” and the DNS to “Obtain DNS server address automatically”. The solution is to simply manually enter the DNS server IP addresses (I used the addresses supplied by my ISP, though any DNS servers should do). The main IP address should be left as is, to obtain automatically.
The only thing that baffles me now is how I got the original guest Windows to work!
Have you installed the “Oracle VM VirtualBox Extension Pack” into VirtualBox itself yet? It might help the problem. The extension pack is for VirtualBox version 4.1.18 so if you installed VirtualBox from the repos you’ll need to update it by downloading and installing the latest version from the VirtualBox website and then install the extension pack. VirtualBox should update in place without a problem.
It’s the first thing I do after installation, and it’s (semi-)automatically done each time I upgrade. Apart from anything else it enables USB attachment and host file access!
slightly OT
For reasons which are not rational (so obviously not my choice) I [sadly] need IE7 to access a pair of sites for work now. I *could* install XP into the VM but I was hoping for a less overkill solution. Various wine ‘solutions’ only gets me as far as IE6 which apparently is not good enough.
June: Good old Internet Explorer! My first suggestion would have been Wine, but if that doesn’t work then really your only recourse is to use VirtualBox. It may be a tad cumbersome, but it works.
You saved my day (and the weeks before). Thanks!
My pleasure!
I was able to resolve the issue by upgrading to 4.2.4 (default in Linux Mint is 4.2.0). I needed to add "deb http://download.virtualbox.org/virtualbox/debian precise contrib" as a software source and then do:
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add –
sudo apt-get install virtualbox-4.2=4.2.4-81684~Ubuntu~precise
For some reason I needed to force installation of the new version, by default it still took the older version. After this the network worked fine out-of-the-box.
I was having this same issue with Windows 8. I left my adapter as is, kept automatically obtained IPs, and set it to use Google's DNS servers (8.8.4.4 and 8.8.8.8). It worked right away on the first try! Thanks for the post!