The best way to do this is to use a Bridge Adapter in virtualbox. In virtual box go to the settings for your machine->Network->Adapter 1 and select Bridged Adapter. This will make you virtual machine part of your main network.
Give the guest two network adapters, one NAT and the other Host-only. The NAT one will allow the guest to see the Internet, and the Host-only one will allow the host to see the guest.
One of them also allows the guest to see the host. I'm not sure which, but I know it works since I've tested web server stuff with it. You just have to choose the right IP address, 10.x.x.x or 192.168.x.x.
Also, you may have to be careful about having File and Printer Sharing running on both adapters at once, since the guest will see its own name and conflict with itself. I ran into this during install.
I've got a better answer than my first one.
Give the guest a single Host-only network adapter, and enable Internet Connection Sharing (ICS) on the host. I've tried this on a Windows XP host with a Windows XP guest.
The guest can connect to the Internet.
The guest can connect to the host at an address like 192.168.0.1 (chosen by ICS). -- Remember to allow the guest through the host's firewall.
The host can connect to the guest at an address like 192.168.0.22 (assigned by the DHCP service provided by ICS).
You can do this on a Linux host. I've documented the steps I took in Ubuntu 9.04 here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With