HTML5, CSS3, jQuery, JSON, Responsive Design...

Networking for VirtualBox Machines

Michael Brown   March 23 2009 04:36:36 AM
Part 4 of Setting up a home test environment for Notes/Domino 8.5

Update for VirtualBox 2.2 - 16/04/2009
Since I wrote the instructions below, Sun has released VirtualBox 2.2, which contains some major changes to the way that host networking is implemented:
  • The Host Interface Networking setting has now disappeared from VirtualBox 2.2 and have been replaced by a new setting called Bridged Networking!  When I checked my virtual machines which had been set up with Host Interface Networking I discovered that they had all been converted to Bridged Network after the upgrade to VirtualBox 2.2.  I've only checked into the Bridged Network setting briefly but it set up appears very similar, if not identical, to Host Interface Networking.
  • There is now a new network mode called Host Only Networking.  Apparently, this allows you to network your virtual machines so that they can all access each other, but without the need for a router to handle your networking for you.  It works by creating a new "loopback" interface on the host.
As always, you should check the VirtualBox User Manual - which you can download from - for details of these changes.

The Router

Your home router (see "What you will need" section in Part 4 of the introduction )  already takes care of networking for any devices that you add to your network.   The router has a built-in DHCP router, which automatically assigns a local IP addresses to each device plugged into it, either directly or wirelessly.  This local IP range varies among different brands of router.  For my own Billion router, the range starts at  Each new device added to your network receives an incrementally higher IP:, and so on.
NB: if you are using VirtualBox 2.2, you can take advantage of the Host Only Networking setting, which should get around the requirement for a personal router.  However, you are restricted to using only virtual machines that are physically on the host machine.  With a router you can plug in any device - wired or wireless -  to your home network and have them access your virtual servers too.

Host Interface Networking (Now Bridged Networking)

Host Interface Network is a VirtualBox feature that allows each of your virtual machines to be treated as a separate device for netorking purposes.  Your router will assign each virtual machine a local IP of its own.  The host OS can ping the guest virtual machines and vice-versa.  Multiple virtual machines can even ping each other, which is just what we want for our home test environment.

To enable Host Interface Networking:
  1. Click on the Settings button for your virtual machine - which must not be running at the time - and navigate to its Network settings.
  2. Switch the Attached to drop-down box to say "Host Interface".
  3. In the Host Interfaces list at the bottom, select the host operating system's live network card.  If you have only one, it will likely be called "eth0" and will be selected automatically.  I have two and the live one is "eth1".  You may need to use your host OS's network tools - e.g. ipconfig for Windows or ifconfig for Linux - in order to determine which is your live network card.
  4. Ok out of the dialog.

To test Host Interface Networking is working:
  1. Start up your virtual machine
  2. From within the virtual machine OS, start a terminal (command prompt in Windows) and type "ifconfig" (Linux) or "ipconfig" (Windows).  In the resulting information, look for the IP address; it will start 192.168.
  3. Start a terminal in the host OS and see if you can ping the guest IP address, which you determined in the previous step.
  4. From your guest OS terminal, see if you can ping the guest OS.  (You can use ipconfig or ifconfig to determine the host OS's IP address, just like you did for the guest.  The host's OS will also start with 192.168.)

If you get ping responses in both directions then Host Interface Networking is working for you.  Can can install servers and/or clients into that virtual machine, and you will be able to access it over your home network as if it were a physical machine.


If you get no ping response from the guest it may be blocked by a firewall, such as the built-in firewall for Windows.  You can safely turn off virtual machine firewalls if the host OS is properly firewalled.

Host Interface Networking does not work well with versions of Ubuntu previous to 8.10 Intrepid as the host operating system.  There is a work around for Ubuntu 8.04 Hardy as a host,, but I got into a total mess when I tried it.  You'll be better off sticking to Ubuntu 8.10 and higher.  I have not tested Windows as the host OS for Host Interface Networking, but I've read it works okay.  I will test this at some point and update this guide accordingly.

Fixed/Static IPs

For any virtual machine that you intend as a server, you should probably assign a fixed IP.  Otherwise the IP assigned to that virtual machine by your router's DHCP is likely to change in the future.  Please see Assigning A Static IP To A Fedora VirtualBox Guest for how to do this.

Previous - Installing Windows in VirtualBox | Next - Installing Domino on Fedora Linux

No Comments Found