Adding VM's to Domain
Solution 1:
Agree with @garbrad. According to the error message, the SQL VM can't locate the DC.
Please check the DNS settings on the SQL VM, if it is not the private IP address of your DC VM, then you need to check the DNS settings of VNET. VNET uses Azure provided name resolution as the default settings. To change it, please refer to the screenshot below:
If the DNS settings are correct, then you need to check if the DNS records are created on the DC VM properly.
Also, here is a good article about How Domain Controllers are Located in Windows, which is helpful for you to understand the whole process.
Solution 2:
Generally when domain join says "the domain doesn't exist or cannot be contacted" it's because the VM isn't configured to use the AD DC as its DNS server. Check if the DNS server on the VNET matches the IP of the DC and that the VM is using that IP (ipconfig /all). If the DNS server was set on the vnet after the VM was recreated then the vm either needs a reboot or an ipconfig /refresh
Solution 3:
You would need to have restart flag at the end.
Also this command uses the local user account to add to the domain.
Add-Computer -DomainName "corp.contoso.com" -restart
IF the local user account cannot add the PC to the domain you can use:
Add-Computer -ComputerName "Server01" -LocalCredential "Server01\Admin01" -DomainName "Domain02" -Credential Domain02\Admin02 -Restart -Force
It will prompt your for a password