I’m using Virtualbox 4.3.30 and I’ve successfully set a virtual machine up with a host-only network to work on DHCP with a non-static IP, but of course, for a virtual machine server, it’s essentially useless. So now, I’m trying to set up a virtual machine Linux server with access to the internet, and a host-only static IP. Host is Windows 8.1, guest is Ubuntu server.
I have two network devices, one for NAT, and one host-only set to adapter #3. The NAT allows for access to the internet which works. The host-only adapter doesn’t allow the host to access the virtual machine.
Host-only adapter #3 has DHCP disabled, an IP of
192.168.50.101, and a netmask of
The VM system
sudo ifconfig eth1 192.168.50.101 netmask 255.255.255.0 up
…(from here then
ifconfig reveals that eth1 (host-only) is connected to the IP address. On the virtual machine, if I do
wget 192.168.50.101 it pulls down the default Nginx page on itself. From the host I’m able to ping the static IP address however in the browser, the IP address times out with the message
Unable to connect.
Stuff I've tried!
I have also tried editing
/etc/network/interfaces from here to no success.
What’s happening here? I’m guessing it can’t be a firewall issue as the host connects when the host-only is using DHCP and I can successfully ping from the host. It also looks like the browser's "cannot connect message" appears in the browser faster than a simple timeout.
I think I've hit on a bug - if I activate the DHCP in the network only adapter, and set the lower and upper to the same ip address, it seems the browser can all of a sudden allow the network to occur and succeeds.