Page 1 of 1
Losing vb network connectivity when moving between locations
Posted: 9. May 2009, 14:34
by clancyd
Hello -
I have a straightforward setup on my Mac laptop with kubuntu as guest. Everything works very well so far except that my internet connectivty disappears whenever I move from home to work, or from work to home, and is only restored when I restart the vitual machine. It is not lost if I move from an ethernet connection to wireless connection at the one location. I've tried all the different Network adaptors. I've tried /etc/init.d/network restart and restarting the NetworkManager.
I'm pretty ignorant of networking in general, and have had trouble finding relevant posts and where to start with this problem. Any help would be appreciated!
Thanks
Eugene
Re: Losing vb network connectivity when moving between locations
Posted: 9. May 2009, 14:59
by baf
How is virtualbox networking configured? Nat? or what.
Re: Losing vb network connectivity when moving between locations
Posted: 9. May 2009, 15:03
by Perryg
From terminal try
sudo dhclient -r
to switch lease to different location.
Re: Losing vb network connectivity when moving between locations
Posted: 9. May 2009, 15:46
by clancyd
Thanks for the fast responses.
So, I've kept the hardware adapter as the default one, but have tried all the network modes, primarily using NAT. When I've tried the others, I've added them as additional network adapters - I'm not sure if that's appropriate.
"sudo dhclient -r" run ok, but didn't enable internet connectivity. pinging google gives "unkown host". I can connect to the host.
Re: Losing vb network connectivity when moving between locations
Posted: 9. May 2009, 16:16
by Perryg
Try leaving it in NAT with no other adapters and changing the DNS to a known good one like opendns in the guest.
Re: Losing vb network connectivity when moving between locations
Posted: 9. May 2009, 16:53
by baf
Also how does /etc/resolv.conf look when working and when not ? Any difference?
And do this to see if it is a connectivity or dns problem:
ping -c4 google.com
ping -c4 74.125.45.100
Re: Losing vb network connectivity when moving between locations
Posted: 14. May 2009, 18:30
by clancyd
Thanks for the help.
Problem was the DNS - after a good bit of messing about I got a setup that can reliably handle both local and external domain names.
Re: Losing vb network connectivity when moving between locations
Posted: 5. Jan 2010, 07:32
by kyleb
OK, I have a similar problem. OS X host with Linux guest. Guest has one interface with NAT and a second one with Host-only.
If the host goes to a new location where its resolv.conf changes, the guest resolv.conf is still stuck with the old nameserver and search domain.
I can take the interfaces down and back up on the guest and the resolv.conf still shows the old information. If I hand-edit resolv.conf on the guest with the right information and then take the interfaces down and back up again, resolv.conf gets overwritten with the wrong (old) information.
It's like VirtualBox grabs the resolv.conf info when it starts and won't check again to see if it has changed. Would it be possible to have the internal dhcp server check for fresh info in the host resolv.conf and pass that onto the guest rather than caching old information?
Re: Losing vb network connectivity when moving between locations
Posted: 5. Jan 2010, 11:05
by Hachiman
kyleb wrote:OK, I have a similar problem. OS X host with Linux guest. Guest has one interface with NAT and a second one with Host-only.
If the host goes to a new location where its resolv.conf changes, the guest resolv.conf is still stuck with the old nameserver and search domain.
You might try
host resolver to avoid manual re-configuration of guest.