Cannot connect to VM in Azure using RDP RRS feed

  • Question

  • Hi

    I hope you can help me since I have just been working for a day on my Azure VM environment and now I cannot connect anymore to one of the machines in Azure.

    My setup is as follows:

    • I created a virtual network in Azure without DNS Server
    • I created 2 VM's, one windows server 2012 and one windows server 2012R2 with SQL 2014
    • On the Windows Server 2012 machine I setup a domain and a DNS server (using the steps fromhttps://azure.microsoft.com/en-in/documentation/articles/active-directory-new-forest-virtual-machine/)
    • I joined the VM running SQL to the domain

    So far so good, but now I cannot connect to the VM running AD anymore and I do not understand why. Last thing I tried is to increase the size (via the dashboard), because the machine was running slow due to AD I suspect.

    Previously I was using another public port (which was working fine), to see if that solved the problem I switched back to the default one. No luck however.

    Both VM's run in the same virtual network (I can see both running), but with their own cloud service. From the other VM (which I can RDP to), I also cannot ping (both public and private ip) or telnet the other VM.

    I do not want to start from scratch again since it takes a lot of time to set this up.

    Monday, June 1, 2015 12:32 PM


All replies

  • Hi Dion Brands,

    Thanks for posting here.

    Can you check that port 3389 is open in your VM? This port is normally used by remote desktop? You can check this from Virtual machine->Endpoint section within new azure preview portal. if there is no port defined, you will have to create new one.

    run mstsc command on your machine  ->  In mstsc, you will have to follow format of <your VMURL(VMnameme.cloudapp.net>:63252 when connecting            

    You can change the virtual machine size and then change it back and you will be able to get back into the VM. And not because the VM size matters, but because changing the size will move it to a different host server, which will present a virtual NIC with a different hardware ID, which the guest OS will detect as a new NIC and therefore give it default TCP/IP settings including dynamic IP and DNS - which is what you must use for Azure VMs.

    See also the Resize VM section of this page:



    Hope the above steps helps you.

    Let us know the results.

    Girish Prajwal

    • Marked as answer by Dion Brands Wednesday, June 3, 2015 9:25 AM
    Monday, June 1, 2015 1:06 PM
  • Hi Dion,

    You may try the below steps :-

    1.Try to download the RDP file again and then try to connect.(public IP may change if all servers in cloud service stopped)

    2.Please check if RDP port is open, as mentioned above by Grisih

    3.If you are able to get the mstsc console then try to open with local admin with machinename/userID and then domainname/userID.

    Kindly check and let us know .



    Monday, June 1, 2015 1:24 PM
  • Hi Girish,

    I think the problem occured because I resized it. Based one of the articles I put the AD files on D and this drive is lost now due to the resize. Correct?

    If I check the dashboard the host name is only a dash (-). So this is also a problem. Although the VM has the status running, I do not think it started correctly.

    I changed the VM back to the original size, but that does not solve the problem.


    Monday, June 1, 2015 1:38 PM
  • Hi Dion Brands,

    If you have access to powershell, you can try starting the Stopped VM's using the command 

    Start-AzureVM [-ServiceName] <String> [-Name] <String> [ <CommonParameters>]

    Howevere, if you do not have access to Powershell, suggest you to try the below steps from the Azure Management Portal

    • Resize the Virtual Machine from the Portal but ensure to Back up the Data in the Temporary Drive ( D:\) since the data will be lost while Resizing.
    • If the issue is still not fixed, please recreate the VM by retaining the attached Disk’s and attaching the same to the new VM

    Girish Prajwal

    Monday, June 1, 2015 2:40 PM
  • Hi Girish,

    the VM is not stopped, it is running (according to the dashboard). Since I did not backup the data on my d-drive (disk is still visible in the dashboard), I think this is lost.

    My plan now is the following:

    - remove the VM from the domain (not sure if this will work, since the domain cannot be contacted). Otherwise I have to recreate this VM as well

    - remove the VM hosting AD

    - remove the DNS server

    - recreate the VM, install AD and DNS and follow the steps again.

    Do you see any issues with this?

    Thanks for all the help!



    Monday, June 1, 2015 3:01 PM
  • Hi Dion Brands,

    I suggest you to remove the VM from the network and then try RDP'ing to your VM.

    I hope you have 2 VM's and are connected to Virtual network. Divide them and check if that works. If that doesn't work. I guess, the ports are disabled on the VM try the below steps carefully as suggested by Craig.


    This should help you.

    Girish Prajwal

    Monday, June 1, 2015 3:11 PM
  • Hi Dion Brands,

    Any update on this issue.

    Girish Prajwal

    • Marked as answer by Shreya Hajela Wednesday, June 3, 2015 10:52 AM
    Tuesday, June 2, 2015 3:38 PM
  • Hi Girish,

    I decided to start from scratch again and everything is working OK now.




    • Marked as answer by Dion Brands Wednesday, June 3, 2015 9:25 AM
    • Unmarked as answer by Dion Brands Wednesday, June 3, 2015 9:25 AM
    Wednesday, June 3, 2015 9:25 AM