Hi @Kei Moon ,
Related to question 1:
You are talking about the DNS name resolution for the public IP of the VM?
The name resolution for the public IP of the VM is done by MS DNS servers. No need to change anything in the VM OS config.
Related to question 2:
If you have Network Security Groups (NSGs) associated in the subnet or to the VM: ICMP Protocol is blocked by default
If it's a Windows VM: Maybe the OS Firewall is blocking ICMP?
This is the configuration of a VM (Windows, OS Firewall allowing ICMP) with public IP, DNS name for public IP and allowing inbound ICMP rules in the NSGs:
The result:
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten