I am running VirtualBox both on a Snow Leopard OSX host machine and on a Windows Vista host machine. Whenever my host machines lose internet connection the guest machines seem to lose internet connectivity permanently even after the host connection to the Internet is reestablished.

Resetting guest networking on the guest os, disconnecting cable via host virtualbox settings, and even restarting the guest OS do not help at all. The guest no longer can access the Internet. The only solution is restarting VirtualBox itself while the host is connected to the Internet. This really gets to be a pain when the host goes into sleep mode or I disconnect my laptop at work and then reconnect at home.

Guests are setup with NAT networking. It affects guest machines with both Ubuntu and Windows XP OS'es.

Is this expected behavior? Does anyone know of a fix? Or am I setup incorrectly?

  • I'm not too familiar with VBox, but this sounds like a problem with the NAT'ing that VBox is trying to do, and maybe a hiccup in the route between the 'private' network and the 'public' network. Can you post ifconfigs and traceroutes? – Guamaniac Feb 25 '10 at 1:46
  • 1
    Cross posted this question in the VirtualBox forums and got this response: "It is unwanted but expected behaviour, a workaround is possible but not for the faint hearted it involves sharing a hostonly link via ics for a Guest via the Host. Ics can recover from a disconnect, VBox nat can't." – Dave Konopka Feb 25 '10 at 5:20
  • @Guamaniac So, while attempting to recreate the problem I found that the host->router disconnection alone is not unrecoverable. When I disconnect host->router wireless network manually then reconnect the guest recovers its connection to the Internet. Normally I experience the problem when I put my machine to sleep and try to reconnect it minutes/hours later. I'll do some more testing to see when the guest goes unrecoverable and run a traceroute when I get it to happen. – Dave Konopka Feb 25 '10 at 5:57

NAT on VirtualBox is not that good you might want to try Host-only with some "host natting" as explained in this article : http://akutz.wordpress.com/2009/08/20/building-a-better-os-x-firewall-or-how-i-solved-the-nat-problem-for-virtualbox/


I operate different virtual servers here and had similar problems (and more) when using NAT. What works best for me is using bridged conenctions: Create a network bridge on the host OS (basically not bridging anything but the primary network connection) and use bridged networking in VirtualBox using the newly created bridge. My hosts are Windows Vista and Windows 7, Clients Windows Server 2008 and debian.

This will put your clients in the same net as your host and therefore make host and client see each other as well as different clients see each other (if you have mutliple clients on the same host).

I don't know if there are any side effects and do have no clue about the technical background of bridging, however, so take this advice with special caution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.