The RPC Server is unavailable

When installing SharePoint Server 2016 on Azure hosted VM in a single server Environment with AD Directory Services and SQL Server on the same box the configuration wizart might fail at step 3 (creating configuration database) with an error like "The RPC Server is unavailable".

To resolve that issue you just need to modify the hosts file (C:\Windows\System32\drivers\etc\hosts) so that your domain will be resolved on you virtual machine. In my case I just had to add the line

 100.114.200.40 mycontoso.com

to the hosts file and the configuration of SharePoint Server 2016 finished successfully.