I created a virtual network in Azure and added few VMs in it. My expectation was to Ping/Access each machine from the other machine in the same network. However, machines don't seem to recognize each other.
<?xml version="1.0"?>
<NetworkConfiguration xmlns="http://schemas.microsoft.com/ServiceHosting/2011/07/NetworkConfiguration" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<VirtualNetworkConfiguration>
<Dns/>
-<VirtualNetworkSites>
-<VirtualNetworkSite Location="East US" name="AshishGupta">
-<AddressSpace>
<AddressPrefix>172.16.0.0/12</AddressPrefix>
</AddressSpace>
-<Subnets>
-<Subnet name="Subnet-1">
<AddressPrefix>172.16.0.0/15</AddressPrefix>
</Subnet>
</Subnets>
</VirtualNetworkSite>
</VirtualNetworkSites>
</VirtualNetworkConfiguration>
</NetworkConfiguration>
If by "don't seem to recognize each other" you mean you can't send and receive ICMP pings that's because ICMP is disabled on Azure VMs.
Try opening a TCP socket on the desired port running the service to which you want to verify connectivity instead:
This isn't specific to Azure, but check your firewall settings. If you can't even ping the VM and you are sure it's up, make sure ICMP ECHO is not blocked by your firewall.