1

I have Ubuntu 14.04 server installed on a Virtual Machine with VirtualBox. I've enabled host-only networking in the VM's settings. When I do ifconfig | grep addr I get an inet addr: 192.168.56.101. I went through the steps in this post: How can I access Apache (on VirtualBox guest) from host? but it's simply not working. When I ping the server, all I get are packet timeouts. I'm trying to make my host and guest talk to each other so that I can test some networking code. Any ideas?

0

192.168.56.101 is an address given by virtualbox's internal DHCP server if you select host-only networking, but it doesn't mean that it will magically be able to communicate with your host system, this needs some extra configuration to ensure that routes are properly set up. The easiest way to get host and guest to talk to each other is to select bridged networking, in this case the guest (VM) will appear to be connected to the same network as the host. This depends on having a DHCP server on your home or work network to assign an address to the VM which will appear like just another computer on the network. Either that, or configure an IP address for it manually.

  • I want to use host-only specifically. Is there a way to make that work? – Halen Aug 1 '14 at 23:08
  • On second thought, I'll use the bridged networking. Where do I give the virtual machine a static IP? Would I use the VirtualBox application or a utility in Ubuntu? – Halen Aug 2 '14 at 4:00

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.