Hyper-V: Not able to ping my local VM from Host

I have an external ethernet switch which I'm using to connect to my VM. I'm able to access internet on my local VM. The problem is that I'm not able to ping it.

I've done the following after reading through many posts asking the same question:

  1. Assigned a static IP to my local VM.
  2. Opened all the local ports on my VM.

Still I'm not able to ping. What can I do to resolve this? Please let me know if you need more information from me.

Thanks.

Screenshots:

ipconfig host: enter image description here

local vm ip: enter image description here

ethernet switch: enter image description here

ping result: enter image description here

Firewall rule on vm: (Allow all local ports) enter image description here


Solution 1:

It sounds like the document is instructing you to use ping as a method of validating network connectivity, which it isn't unless you know that ping should work in the first place, which it doesn't by default in Windows. If you're going to use ping as a method of testing network connectivity then the document needs to reflect the steps needed to ensure that ping works, which includes making changes to the Windows Firewall.

My issue with using ping as a catch all network connectivity test is that more often than not people spend an inordinate amount of time troubleshooting ping instead of focusing on troubleshooting the actual problem.

If you want to use ping to validate network connectivity then make sure you modify the Windows Firewall appropriately.

That being said, getting ping to work has almost no value in making sure your actual application/service works.


OK, based on your screenshots I see where your problem is. It's in your firewall rule. PING is neither TCP nor UDP, it's ICMP. You need to modify the appropriate firewall rules to allow ICMP inbound based on the network/firewall profile in use on the client.

enter image description here

Solution 2:

For Windows 10 also look into Network Discoverability Settings on the VM which could be blocking the connection

Settings->Network & Internet->Wi-Fi -OR- Ethernet

Click on your Network Name

Under Network Profile, Select Private instead of Public