Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got two vms running on a windows host, each with a host-only network and ips in the 192.168.56.XXX range. One of them is running apache and serving some content that I want to access from my windows host.

However, the windows host can't access the apache server at all. The server is running on 192.168.56.103. ipconfig from windows says it's ip for the Virtual Box interface is 169.254.143.37. I tried route add to route 192.168.56.XX traffic, but everything I tried didn't work and I was probably using it wrong.

Any ideas on how to make this work?

share|improve this question

8 Answers 8

try this:

http://brianreiter.org/2010/09/18/fix-virtualbox-host-only-network-adapter-creates-a-virtual-public-network-connection-that-causes-windows-to-disable-services/

BTW, could not use powershell script. I needed to create *NdisDeviceType key via Regedit

share|improve this answer
    
Welcome to Server Fault! Generally we like answers on the site to be able to stand on their own - Links are great, but if that link ever breaks the answer should have enough information to still be helpful. Please consider editing your answer to include more detail. See the FAQ for more info. –  slm Apr 4 '13 at 18:00

If you can't ping host from VM, have you try to turn off firewall on host? perhaps it's filtering ICMP request. Turn off the firewall as test, if ping is OK then you should check your firewall configuration that filter ICMP request.

share|improve this answer

I was able to fix this by giving my server a static address of 192.168.56.11. Then, I was able to ping my guest OS from the host. I also added a host file entry on my host machine to make it easier to access.

I'm still unable to ping the host from the guest... not sure why.

share|improve this answer

169.254 = No DHCP server found. THis could be either there isnt one or there is a firewalling issue. Depending on your operating system it would also be advisable to check your firewall rules. Windows 7 is quite paranoid!

share|improve this answer

Once you find, install and start the Host-only adapter on your Windows host, if you still can't connect to the VMs, try turning off the Windows firewall for that adapter.

If that works, you can either leave it that way, or use your Windows Firewall-fu to open the correct ports and stuff.

share|improve this answer

Your VMs are getting IPs like 169.* because their DHCP clients are not finding a DHCP server to give them a lease. Therefore, the IP of the host & IPs of the VMs are not accessible to each other. A static route won't really solve this. You need to figure out why the VMs are not getting an IP lease, or you could try manually setting the IP addresses to the same private Class C (192.168.56.*) that your host is on.

share|improve this answer

If you want to communicate with your VMs with 192.168.56.XXX IP, you need the host Virtual Box interface to have an IP on the same range. Your interface don't (169.254).

On a fresh installation of VBox 3.1.8, it creates a new interface named "VirtualBox Host-Only Network" with a static IP address of : 192.168.56.1/24.

Your interface is most probably misconfigured to use DHCP. Change it to use 192.168.56.1 with 255.255.255.0 netmask and it should work.

share|improve this answer

Have you set the correct default gateway in your VM? What's the routing table look like on host and guest?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.