Distributing VMs - networking best practice

This is for discussing general topics about how to use VirtualBox.

Distributing VMs - networking best practice

Postby Docproc » 29. Apr 2009, 11:54


We are developing a VirtualBox-based VM containing an installation of our software which we intend to distribute for people to run their own local installations of it. The software effectively presents a website using Apache, so it is critical that the webserver running in the guest is accessible to other people on the same network. The guest OS is Ubuntu 8.04, we anticipate that the host systems will be a mixture of Linux, OS X and Windows.

It is critical that this ends up working in as much of an "out of the box" way as possible, ideally with little or zero configuration that needs to be done by people running the VM.

We're struggling with the networking settings though. So far we've tried:

  • NAT - works, and the webserver is visible to machines on the network after we configure port forwarding for port 8080. We'd really prefer to avoid having to have the recipients set up port-forwarding though. Also the port forwarding configuration doesn't seem to be maintained when we export the machine to an OVF file, which is what we'd ideally like to do eventually.
  • Bridged - mixed success here, the VM works fine on my home network (gets an IP and is visible from other machines) but on both the wired and wireless networks at my employer, it refuses to get an IP address. Manually running dhclient shows it waiting for a DHCP lease and timing out when it doesn't get one. The eth0 interface in the guest appears to be OK but doesn't seem to get an IP address. Real machines on the same network get IP addresses without a problem. Since many of our target audience will also be on my employer's network, this is a showstopper at the moment.
  • Host-only - not applicable because guests using this mode can't communicate with the outside world
  • Internal - similar lack of success to bridged, doesn't get an IP address.
We're using version 2.2.2.

What would people suggest as being the easiest and most robust way to configure the networking for an appliance that is to be widely distributed?

Thanks in advance

Posts: 5
Joined: 27. Apr 2009, 17:53
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Ubuntu, Windows XP

Re: Distributing VMs - networking best practice

Postby vbox4me2 » 29. Apr 2009, 13:28

Without strict tested guidelines this won't work, for example, a Host with an intel NIC behaves differently then with a Realtek, with the different Guest NIC's(usually performance related). A change of a Guest MAC leaves Linux Guests without network(needs a manual fix). And then there are the various VM settings. You're going to need to test and supply documentation.
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam

Return to Using VirtualBox

Who is online

Users browsing this forum: No registered users and 17 guests