Common VM connection issue

Common VM connection issue

I am not a network guy however for most of us with any IT background having a Virtual machine is a great thing, if you’re a developer, database admin etc you might need to have VM to do your part.

Typically, you choose a virtual machine when you need more control over the computing environment than the other choices offer.

Creating VM in Azure is easy I explained that here how you can create it, one of the big advantages of having VM in Azure is you can auto shutdown your VM and only run it for anytime that you need it.

Don't forget you can start with $200 Azure credit for 12 months, which is awesome! See here and start it now...

When I created my first VM a few years back I got issue with connectivity. That’s why I try to explain some simple steps that you can find the root cause and fix it.

As you may know the easiest way to connect to your VM in Azure is jump to the portal and from Virtual machine click on connect then download the RDP, like the following screenshot.

How to RDP to Azure VM?

If in your case, you got the following error message you need to follow some basic steps and in most cases, you can fix the issue in a few minutes.

Remote Desktop Connection error
 
Remote Desktop Connection
[Content]
Remote Desktop can't connect to the remote computer for one of these reasons:
1) Remote access to the server is not enabled
2) The remote computer is turned off
3) The remote computer is not available on the network
Make sure the remote computer is turned on and connected to the network, and that remote access is enabled.

1- Check if the VM is starting

Like the following screenshot go the Virtual network and click on start button if it’s enabled, as you see the “Stop” and “Restart” buttons are gray, that means my server is stop.

Try start your VM in Azure, You might need to restart it again

2- Change the password if you’re not sure

You might do not know the password is right or no, if you doubt you can search “Rest password” then put new password for your VM then try to connect again.

Chnage the VM password

3- Check Inbound port rules

If all those steps which I explained before are fine in your case and you still have issue, that could be a network issue, go to VM page in Azure portal and from the “setting / Network” go and check if you allow you connect with your IP address or no, click on “Add inbound port rule”

Then like the following screenshot add your IP address as source, you could find out about your IP address by googling what’s my IP address for destination you need to add your VM’s private IP address.

You can find that in Azure portal for RDP put 3389 as a port and save it. In the “Inbound port list” you need to make sure your source and destination’s IP  are correct and Allow.

Please see the details below

Check if your computer allows to connect to VM

With these three simple steps probably you can fix the error message and if you try to connect to VM again that should be fine. I suggest that like I explained in the first step, try to download RDP connection then try to connect again.