2 VMS cannot communicate

Edgar Walther (ITsmart) 46 Reputation points

I have 2 VMs created in the same vnet and the same subnet.

I can ping by (internal) ip address from VM2to VM1 but not from VM1 to VM2.
I cannot ping by server names at all.
What could I be doing wrong here?

Many thanks!

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
6,845 questions
{count} votes

Accepted answer
  1. Sumarigo-MSFT 42,761 Reputation points Microsoft Employee

    @Edgar Walther (ITsmart) Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    Do you use Windows VM? The default configuration of the Windows firewall prohibits ICMP. Could you try to test reachability with Test-NetConnection -Port 3389, please?

    • Peer the two VNets together.
    • Create an NSG rule that only allows those two VMs to communicate with each other; no other VMs should be able to communicate to the other VNet.
      On the rule, for PING (ICMP) to work, you need to also allow ICMP for the Virtual Machines to be able to ping each other.

    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 refer to the suggestion mentioned in this link

    • You can connect virtual networks to each other with virtual network peering. These virtual networks can be in the same region or different regions (also known as Global VNet peering). Once virtual networks are peered, resources in both virtual networks can communicate with each other, with the same latency and bandwidth as if the resources were in the same virtual network. In this tutorial, you learn how to: https://learn.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal


    Virtual networks and virtual machines in Azure: https://learn.microsoft.com/en-us/azure/virtual-network/network-overview

    Please let us know if you have any further queries. I’m happy to assist you further.


    Please do not forget to 157962-screenshot-2021-12-10-121802.png and 157920-image.png wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Edgar Walther (ITsmart) 46 Reputation points

    Yes, that was it!

    • I could not ping by number because in the windows defender firewall ICMP traffic was not allowed (that's by default apparently... ).
    • I could not ping by name because the DNS server wasn't aware of the new server I guess. This morning it did work.

    I turned off the windows defender firewall on the two VMs. The NSG rules are in place.

    Many thanks for your answers @Chris Bradshaw and @Sumarigo-MSFT !

    0 comments No comments