Q. I cannot RDP to my VM in Azure, what can I do?
A. There are a number of things to try.
- Make sure its running! Also try shutting it down from the portal and restarting it
- If you are connecting from the Internet make sure you have the correct service name and endpoint (for ASM) for the VM or if its an ARM VM ensure you have a PIP for the VM or a load balancer with a NAT rule pointing to 3389 for the VM
- If connecting via ExpressRoute or S2S VPN ensure the connection is functioning and available
- If you have the Azure agent installed in the VM run the PowerShell below to reset RDP and make sure its enabled and the firewall rule open:
$AzureVM = Get-AzureVM -ServiceName <service name> -Name <vm name>
$AzureVM | Set-AzureVMAccessExtension | Update-AzureVM #Enable RDP - If you still cannot RDP check if there is a Network Security Group applied to the subnet the VM is in and if so remove the NSG if you think it is blocking the RDP access (or create a new one overriding to enable RDP)
Get-AzureNetworkSecurityGroupForSubnet -VirtualNetworkName <virtual network name> -SubnetName <subnet name>
Get-AzureNetworkSecurityGroup -Name "<name of NSG found" | Remove-AzureNetworkSecurityGroupFromSubnet -VirtualNetworkName <virtual network name> -SubnetName <subnet name> - If all else fails you could try deleting the VM while keeping its storage and then recreating
- Finally download the VHD and try fix on a local Hyper-V box
1 comment
Hide comments