Page 1 of 1

Windows Host with and without internet access

Posted: 2. Nov 2009, 16:29
by stachobywatelpl
My setup is a laptop with WindowsXP as a host and an Ubuntu server running as a guest in VirtualBox.
I run PostgreSQL and Apache on Ubuntu, have the filesystem visible on Windows through ExpanDrive...

Usually I am at home with my router assigning IP addresses, so I use Bridged Network in the VB setup.
This works until I go someplace without an internet connection. Suddenly I cannot access my guest OS,
because Windows sees no network connections at all and there is no DHCP.

I've tried using NAT instead of Bridged Network. But with NAT I cannot access the guest from the host
except some tricks like:
VBoxManage setextradata "GuestName” “VBoxInternal/Devices/pcnet/0/LUN#0/Config/Apache/Protocol” TCP
And I don't think that they really work. Last time I tried, the guest acted like it didn't have a network interface at all
after I added this extra data to the config file.

So my question is: how do I set it all up so I can work with and without the internet connection available?

Stach

Re: Windows Host with and without internet access

Posted: 2. Nov 2009, 16:50
by Perryg
Set the first adapter to host-only and add a second one set to NAT.
See Chapter 6. Virtual networking in the VBox Users Guide. It covers all of this as well.