Why can't connect to my VM?

Aiden Mathew 21 Reputation points
2022-01-04T00:04:27.45+00:00

I cannot connect to the VM. It says Unable to connect. I'm using a mac. I also tried with my windows computer but that didn't work Error Code:0x204162014-screen-shot-2022-01-03-at-70319-pm.png

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,018 questions
Azure VMware Solution
Azure VMware Solution
An Azure service that runs native VMware workloads on Azure.
391 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andreas Baumgarten 123.4K Reputation points MVP Volunteer Moderator
    2022-01-04T23:02:08.003+00:00

    Hi @Aiden Mathew ,

    and directly under the lines in your screenshots you see which Security Rules are configured.
    162219-image.png

    You should compare your Security Rules in your NSG with the Security Rules in my NSGs screenshot above (the yellow marked Security Rule is required for RDP)
    .
    If this Security Rule is missing in your NSG -> Click on Add Inbound Rule
    Add a new Security Rule like this:
    Source IP: Any
    Source Port: Any
    Destination IP: Any
    Service: RDP
    Destination Port: 3389
    Protocol: TCP
    Action: Allow
    Priority: 100 (if 100 is already in use choose any priority like 200, 300 or 400, ...)
    Name: RDP Allow

    162294-image.png

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Andreas Baumgarten 123.4K Reputation points MVP Volunteer Moderator
    2022-01-04T00:14:27.507+00:00

    Hi @Aiden Mathew ,

    the Windows VM is running in Azure?
    If yes -> The VM got a public IP assigned?
    If yes -> Are there Network Security Groups (NSG) associated (associated to VM and/or Azure Virtual Network)?
    If yes ->Are there Security Inbound Rules defined for RDP Port 3389 allow?

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten


  2. Andreas Baumgarten 123.4K Reputation points MVP Volunteer Moderator
    2022-01-04T12:40:54.753+00:00

    Hi @Aiden Mathew ,

    in the Azure Portal the Public IP (used to connect via RDP from outside) you can check here:

    162139-image.png

    If there are NSGs associated with the VM and/or the Virtual Network and the configured Security Rules you can see here:

    162264-image.png

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten


  3. Prrudram-MSFT 28,201 Reputation points Moderator
    2022-01-04T19:30:16.473+00:00

    Hello @Aiden Mathew ,

    Welcome to the Microsoft Q&A platform. Happy to answer your question.

    Error Code 0x204 is a Remote Desktop Connection problem. It mostly occurs when a user tries to connect to a remote device but get failed due to some reasons such as a driver issue and security problems. It comes with an error message like this. Since when did this issue occurred? Did you make any new configurations or updates on the VM?

    After checking on the NSG rules as suggested by community member @andreas Baumgarten, please look at the thread explained about the same error 0x204 you might try first:
    https://learn.microsoft.com/en-us/answers/questions/187583/rdp-works-pc-to-pc-but-i-get-error-code-0x204-mac.html

    Another article talking about this error https://appuals.com/remote-desktop-error-code-0x204/

    And this article for general troubleshoot :
    How to Fix Remote Desktop Error Code 0x204 on Windows and MacOS?

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.