Saturday, November 8, 2008

Virtual Networking with xVM 2.0.4

With Virtual Box 2.1.4 and later version, the process has been simplified.

Even though Sun's documentation provided with the software is full of useful detailed information, it might take some time to read and understand everything if you want to quick setup a virtual networking. Once you have first setup a xVM guest, a default network adapter is automatically created with the Network Translation Address mode and will allow you to use the Internet and other network connections of your host. This mode does not require configuration and the xVM will act like a router between your host and your guest; your guest will receive an IP address. But this IP address will be on a completely different network than your host, and like any host in a private network, the (xVM) guest will be invisible from the outside network. (Unless you use the Port Forwarding functionality, which requires some command-line configuration and also still have limitations.) If you need to setup a (Web/Application) server on your guest, you can choose the Host Interface Networking mode. This mode will create a brand new Networking Interface (for your guest) in your host computer.

Warning: Setting up this mode will cause your host to lose its network connection temporarily. Because of that, do not do this on a production server unless you are aware of what you are doing on remote access or on remote access as you will lose your connection.

Network bridging is the most simple method for Host Interface Networking mode. Bridging allows you to connect several network devices together (in software), so that data sent to one of the device will be sent to all of them. Sun's documention mentions that network bridging only works for wired connection, but you will need additional settings to make it works with a wireless network adapter.
How to Configure a Host Interface Network with Vista (host) and Linux Ubuntu (guest)

1- Setup the Network Interface
From the xVM window click Settings and click Networking in the left list.Select the Interface 1 tab, check Activate Networking Interface. Select PCnet-FASTIII as the Interface Type. Sun's documentation explains the differences between those different interface types.
In the Host Network Interface, click the "Add a new interface" button in the right.

2- Create the Bridge from Windows Vista as a the host side.

From Windows Vista, go to Control Panel > Network and Sharing Center > Manage Network Connection.You can see in the list the Network Interface you have configured earlier. Control select the Virtual Box Interface and your Network Connection. Right-click and choose Bridge Connection.

You will have a new icon called Network Bridge in your Network Connections window.

Right-click the Network Bridge and go to Properties.




Click OK to apply your new change.

You now have your virtual network setup between your host and your guest.