In VirtualBox on Windows, I have a guest running Ubuntu Server, with the apache2 and openssh-server services running. The configuration file /etc/network/interfaces gives it a static IP of, and in the properties of the VM, the network adapter is set to host-only. The VirtualBox Host-Only Ethernet Adapter on the host has the IP These addresses aren't in the same range as the host (which is DHCP-assigned in the range).

From the host, I can browse to and see Apache's "It works" page, and I can SSH to and log into the guest. All good.

The setup I'm aiming for, though, is this same Ubuntu guest running on an Ubuntu Server host (rather than a Windows host). So I have exported the guest as an appliance, and imported it to VirtualBox on Ubuntu. Because VirtualBox Host-Only Ethernet Adapter is Windows-specific, and on Linux the adapter is called vboxnet0, I used vboxmanage modifyvm <foo> hostonlyadapter1 vboxnet0 to update the guest appropriately. The guest boots headless with no errors, but from the host, I cannot wget or ssh Both commands say "no route to host". ping causes From [...] Destination Host Unreachable.

What extra do I need to do on Ubuntu that must be happening automatically on Windows, so that the host can reach the guest via the host-only network?


My guess is that your ubuntu server does not auto-configure vboxnet0 (that is, the fake network card on the host computer) properly. You can verify this using ifconfig - vboxnet0 should be present and list the correct IP configuration.

If vboxnet0 does not exist, you need to create it (see this description for how to do that).

If it does exist, it may need to be configured manually (by editing /etc/interfaces or whatever other method is recommended for ubuntu).


I came across similar behavior of vitrualbox on osx host. When you start your guest machine (as you said you do "headless" start), it creates vboxnet0 interface, sends it up and all that.

If you create vboxnet0 yourself (via vboxmanage) before VM starts, the VM will NOT re-use what you have done. In fact, I ended up with a script saying ifconfig vboxnet0 down before calling VM start to make sure VM configures the interface itself. It was quite counterintuitive.

Let me know if it works on ubuntu host.


From the sounds of it it is an issue with the routing inside the VM host. To fix it you will want to check if bridged networking is on, it should be in the options on the virtual machine.

Here is the docs to get you started: http://www.virtualbox.org/manual/ch06.html#network_bridged

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.