Hi Arun,
In the Network Security Group that applies to the VM, did you create inbound port rule that Allow ICMP? If not, please navigate to the VM in the portal, Network settings blade, and click Create port rule - Inbound port rule button. Select ICMP and click Save.
Inside of the VM, did you enable ICMP Echo in the firewall? For windows, you would open wf.msc and right-click on Inbound rule File and Printer Sharing (Echo Request - ICMPv4-In) and choose Enable Rule.
Please click Accept Answer and upvote if the above was helpful.
Thanks.
-TP