1
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 10.10.10.2/24, 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 10.10.10.1/24. These addresses aren't in the same range as the host (which is DHCP-assigned in the 192.168.1.0/24 range).
From the host, I can browse to 10.10.10.2 and see Apache's "It works" page, and I can SSH to 10.10.10.2 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 10.10.10.2
or ssh 10.10.10.2
. Both commands say "no route to host". ping 10.10.10.2
causes From 10.10.10.1 [...] 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?