Can't ping a local VM from the host

user2690101 picture user2690101 · Aug 16, 2013 · Viewed 103.7k times · Source

My work laptop is is a member of a domain (the OS is Windows 8). Created a new VM, locally on this laptop (using built-in Hyper-V). DHCP is provided by the domain and all IP addresses are assigned by the DHCP, both to the host and to the VM. The VM is not a member of the domain, just a member of the WORKGROUP. Trying to ping a local VM from the host. Pinging by machine name does not work. Pinging by IP address works just fine. Both host OS and the VM are on the same sub-network.

The IP addresses change every time I reconnect the laptop to office network. I would like to avoid the pain of using different IP's all the time.

Is there anything I can do on my end to make names resolution work? Adding the VM to the domain is not an option.

Answer

ExceptionLimeCat picture ExceptionLimeCat · Oct 2, 2013

The issue could be that the VM is connected to the network via NAT. You need to set the network adapter of the VM to a bridged connection so that the VM will get it's own IP within the actual network and not on the LAN on the host.