Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure VM Remote Desktop Can't Connect

Tags:

azure

Following a how-to book's guide on setting up a VM through the Azure Portal and getting the error when trying to connect

Remote Desktop can't connect to the remote computer for one of these reasons: 1) Remote access to the service is not enabled 2) The remote computer is turned off [Verified through the Azure Portal it is turned on because Start is faded, while Restart and Stop are not] 3) The remote computer is not available on the network.

The error occurs before I'm able to enter any credentials - it doesn't find the IP at all. The RDP file details (IP removed of course):

full address:s:[IPAddress]:3389
prompt for credentials:i:1
administrative session:i:1

What I've tried:

  1. Even though the How-To book doesn't show where/how to specify a port, when I download the RDP file from the Connect option, it specifies the port 3389. The book seems to imply that simply downloading this file and connecting will work and there's no need to specify the port. I get the above error.
  2. Flushed DNS on my computer, ipconfig /flushdns
  3. In the Network Security Group option for the VM, I verified that port 3389 allowed any source and wasn't specific.
  4. I did miss associating the subnet part of the Network Security Group to a virtual network, so I did associate my NSG with the default subnet set up for my Virtual Network.
  5. From the Quick start option, I don't see how to connect to this either; I'm guessing, I need to specify a different port, but don't see where to do it here either => Update: this appears to be in the Network Security Group's Inbound security rules in the Azure portal.
  6. Boot Diagnostics option shows the login screen. A ping to the IP address fails four times with "Request timed out."

Note: this is not a Virtual Machine (classic).

like image 236
rob Avatar asked Jun 27 '16 18:06

rob


People also ask

Why RDP is not connecting in Azure?

If the Connect button for your VM is grayed out in the portal and you are not connected to Azure via an Express Route or Site-to-Site VPN connection, you need to create and assign your VM a public IP address before you can use RDP. You can read more about public IP addresses in Azure.

How do I reset my Azure VM Remote Desktop?

Reset the Remote Desktop Services configurationSelect your Windows VM and then select Reset password under Help. The Reset password window is displayed. Select Reset configuration only and then select Update. Try connecting to your VM again.

Does an Azure VM need a public IP to RDP to?

You don't need Public IPs to access your VMs over RDP/SSH. Additionally, Azure Bastion provides integrated connectivity using RDP/SSH directly from your browser and the Azure portal experience. You don't need an additional client, agent, or piece of software.


3 Answers

just wanted to share what worked for me.

After receiving an error prompt:

Connect is disabled for this virtual machine because of the following issues: Network interface 'vmwindows1094': Network security group 'VMWindows10-nsg' does not have inbound security rule that allows port 3389. VMWindows10-nsg

I have added an inbound port rule. Under VM > Settings > Add inbound port rules.

Port: 3389 Protocol/Source/Destination: Any (this can be configured based on your security rules) Action: Allow

like image 164
jcdevilleres Avatar answered Oct 31 '22 13:10

jcdevilleres


On the Azure portal, Select your VM -> Settings -> Boot diagnostics. Make sure that you can see the login screen. You might need to enable diagnostics (under Monitoring section) if not enabled already. If you don't see the login screen, trying the 'Redeploy' option under 'Support and Troubleshooting' section of settings.

If you can see that the machines has booted correctly, the connectivity issue might be because of a firewall at your end or on the VM. See if you can ping the machine. If you are behind a corporate firewall, try connecting from elsewhere and check your PC's firewall.

Creating a new Virtual Machine on the new portal now creates a NSG (Network Security Group) along with the VM. You should be able to find it under all resources, same name as you VM. Make sure that there is an Inbound rule configured for Remote desktop (it is created by default but might be worth checking).

like image 35
AVS Avatar answered Oct 31 '22 13:10

AVS


I had the same problem but adding an inbound security rule was not sufficient (although it is also needed). I had to go to virtual machines > (myVm) > Reset password and then choose Reset configuration only

enter image description here

like image 1
Pitchmatt Avatar answered Oct 31 '22 11:10

Pitchmatt