Hi @kedar giri
Thank you for reaching out to the Microsoft Q&A platform.
If there is no DNS server available, the solution is adding the IP address and hostname of each server to the hosts file on both servers.
On the Azure VM, you need edit the hosts file located at C:\Windows\System32\drivers\etc\hosts. Add the IP address and hostname of the on-premises VM to the file, using the following format:
Did you add it in the below format? If possible share a screenshot of hosts file masking IP addresses.
For example:
192.168.1.2 onpremisesvm
Let me know if you want to discuss further, I will be more than happy to help
Please click "Accept as answer" if this helps.