Perfect Dev Environment now with VirtualBox 2.2.0

VirtualBox 2.2.0 was released a week ago with a neat feature, that I really missed although I really like working with VirtualBox. Now VirtualBox comes with a virtual Host interface called host-only interface, that enables the communication between the host and the guest even when no physical cable is connected to the machine, which happens a lot when you are on the road and would like to do some development.

In my previous setup I had a bridged connection for the guest system, which basically handles the guest as an additional system in the network. That means both the host and the guest get an IP address in the same address range and can communicate this way. The guest has access to the internet and the host is able to access the guest system, e.g via ssh or smb for file access. There are two problems with this approach that I didn’t like and which are inconvenient. First, a cable connection or wire connection is needed, otherwise the bridged connection doesn’t work. Second, as in most cases you get the IP address from a DHCP server, the IP address changes everytime you connect to a different network. This is especially annoying as you always need to reassign the mounted network drives from the guest system.

Now with VirtualBox 2.2.0 and the host-only interface it is possible to create a internal network for just the host and the guest. Therefore VirtualBox has an integrated DHCP server, that assigns the IP addresses to the host and the guest. You can configure the host-only interface under File->Global Settings->Network. It is possible to add more host-only interfaces and also to define the DHCP settings, although very basic.

Now my configuration includes 3 network interfaces for my development VirtualBox.

  1. Host-only network
    I use this network interface to connect the host with the guest. I setup my network mounts on this interface and my putty configuration.
  2. Bridged network for cable
    I use this network interface for the outgoing connections in the guest system, if I have a network cable connected (office).
  3. Bridged network for wireless
    I use this network interface for the outgoing connections in the guest system, if I have a wireless network cable connected (on the road/home).

Now the work with eclipse and putty make much more fun without reassigning IP addresses anymore. Another positive effect I noticed is that the access to the shared
network drive seems to be faster than through the bridged network interface. I do not have any latency times anymore, while access the drive via windows explorer
or eclipse.

UPDATE:
There is a bug in the current PCnet network device implementation, which causes VirtualBox to freeze completely. Switching to the E1000 network device is a workaround
to that problem. Here is the link to the bug ticket:

http://www.virtualbox.de/ticket/3737

Are you smart? Innovative? Driven? If you’re interested in working on challenging projects in one of the world’s most fast-paced industries, why not check out the openings on our Careers page?