Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't ping a local VM from the host [closed]

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.

like image 927
user2690101 Avatar asked Aug 16 '13 16:08

user2690101


People also ask

Why can I not ping my virtual machine?

If both the machines are in the same Virtual Network, then just turn off Windows Firewall and they will be able to ping each other. Other way is to just allow all incoming ICMP traffic in Windows Firewall with Advanced Settings. (ping request or create an exception by just enabling ping (ICMP).

Can you ping a NAT IP?

Yes. As long as the router allows the Ping request to pass outbound and properly tracks the request so that it can return. Most routers I have dealt with handle this correctly. Pings in though a Firewall (NAT or not) are often blocked.


2 Answers

I know this is an old post, but I ran into this same issue with my VMs. Log into the VM and go to Control Panel > System and Security > Windows Firewall > Allowed Apps. Then check all of the boxes next to "File and Printer Sharing" to enable file sharing. This should allow you to ping the VM. The screenshot below is from a 2016 Windows Server but the same method will work on older ones.

enter image description here

like image 82
Marilee Turscak - MSFT Avatar answered Sep 29 '22 05:09

Marilee Turscak - MSFT


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.

like image 23
ExceptionLimeCat Avatar answered Sep 29 '22 06:09

ExceptionLimeCat