Software Development

Unable to connect to Azure VM Role for a long time after it is Deployed or Restarted

I have been really frustrated in waiting for days to log in to my VM Role instance via RDP. I have encountered this issue multiple times. Once a VM Role is deployed or it is restarted, we can not login via RDP for a long period, and it takes a lot of time, sometimes 2-3 (random) days once it is back and allows us to connect via RDP.

Reason

This issue occurs due to a problem with the Azure Remote Forwarder Service, which runs in your VM Role instance. Due to this service sometimes RDP packets get distorted which cresults in connection timing out or closing it.

Solution

The solution I describe here is not really a solution, rather it is a workaround. The workaround is to set the Windows Azure Remote Forwarder Service from Automatic to Automatic – Delayed, by going to Service Management Console (Services.msc)