This is really a note-to-self but it might help other people too.
I have two network interfaces in my Ubuntu guest (on OS X 10.4 host), one NAT, one host-only.
Sometimes one of them doesn’t get an IP address — in ifconfig it has an inet6 address but not an inet address.
Today I tried
sudo dhclient eth1
and it worked — all it needed to do was re-query VirtualBox’s built-in DHCP server.
I would have thought this would do that automatically:
sudo /etc/init.d/networking restart
However that didn’t help… But dhclient did.
Another recurring problem is that when I move between different networks, DNS resolution gets screwed up. There’s a description of this with a suggested work around (using VBox’s DNS Proxy) here:
http://forums.virtualbox.org/viewtopic.php?f=1&t=28332
However, while this seemed to help with two of the networks I use frequently, it didn’t with a third, even after rebooting.
So, as suggested on one or two threads, I’ve removed the DNSProxy setting, and set the Ubuntu guest to use Google’s public DNS servers instead of those provided by the DHCP server for the NATted virtual NIC. (Blah blah blah.) Follow example here (more or less):
http://grumpymole.posterous.com/how-to-use-google-public-dns-or-opendns-in-ub
Seems to be working so far… But only tested on one of the offending networks, and without rebooting yet. Updates to come later.
… Nope, after upgrading to Snow Leopard and the latest VirtualBox (it’s now from Oracle — scary), random problems persist.
Sometimes I’ll lose guest-host connectivity in the middle of a session, without any sleep or other interruptions, but will still be able to see the internet from the NAT adaptor.
One possible solution here involving using OS X itself as the NAT router:
… but it’ll take work.
Or maybe a simpler version of the same approach: have a single host-only adaptor, use OS X’s internet sharing to share the AirPort card, and manually tell the vbox to use 192.168.56.1 as the default gateway:
http://forum.virtualbox.org/viewtopic.php?f=1&t=26544
If all else fails, try using a different ethernet hardware emulator.
Post a Comment