By default, ping is not allowed on the public IP of VM. You need to enable ICMP in the ingress rule on the cloud subnet to enable pinging the IP. See example