ICMP (Ping) is blocked in Azure so by design this will fail. You can get this to work depending on how you are setting up your network and what you are trying to ping. See https://social.msdn.microsoft.com/Forums/en-US/0669112c-a6dd-4290-bcde-9ce7b9d60d80/how-do-i-enable-pinging-a-vm for more details:
•Ping external address from Azure VM - does not work as Azure does not
permit outbound ICMP
•Ping Azure VM from external address - does not work as Azure does not
permit inbound ICMP
•Ping between Azure VMs using internal IP (DIP) - works, but guest OS
firewall must be configured to allow it as by default ICMP is blocked
by the guest.
•Ping between Azure VM and on-premise through Azure Connect
(point-to-point IPSec VPN tunnel) or Virtual Network Gateway
(site-to-site IPSec VPN tunnel) - works, but guest OS firewall must be
configured to allow it as by default ICMP is blocked by the guest.
To allow ICMP on a Windows VM, from an elevated command prompt, run:
netsh advfirewall firewall add rule name="ICMPv6" dir=in action=allow
enable=yes protocol=icmpv6 netsh advfirewall firewall add rule
name="ICMPV4" dir=in action=allow enable=yes protocol=icmpv4