Cannot login to ARM deployed virtual machine

Andrew Currie 21 Reputation points
2021-02-17T20:30:11.26+00:00

I cannot access my ARM template deployed Windows VM. When I RDP, I get error "The login attempt failed". It's driving me nuts - surely this is so simple!!!

To rule out my template I have tried the GitHub sample 101 windows VM. Still nothing. Every time, I have to go into portal.azure.com, go to the VM choose reset password, then I can login fine.

Surely this works? I have spent whole day on this, getting nowhere :(

https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vm-simple-windows/azuredeploy.json

no parameters file, I was prompted in Powershell for username and password.

I downloaded the azuredeploy.json and named it QuickStartTemplate.json. Powershell command below.

az deployment group create -g AzureTest --template-file .\QuickStartTemplate.json

69252-image.png

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,474 questions
0 comments No comments
{count} votes

Accepted answer
  1. JessicaH-MSFT 246 Reputation points Microsoft Employee
    2021-02-18T00:53:00.233+00:00

    @Andrew Currie
    To reproduce the situation you're facing I used the same quickstart template, saved it as a .json on my local machine and used Powershell to deploy and provided credentials at the prompt when asked. Once the machine was running I was able to RDP to the Public IP and I was able to log in using the credentials I set in Powershell.

    I want to make sure I'm understanding what you're experiencing. All of the above matches what you did, however when you attempt to provide credentials, you are getting "The logon attempt failed" error message. Once you visit the Azure portal and provide new credentials through Support + troubleshooting > Reset Password, you're finally able to connect is that right?

    If so, when you click on "More choices" do you have the option to "Use a different account"? This should let you enter the credentials you set up in the Powershell session.

    Please verify that the username and password you're creating in the Powershell session meet the requirements per this doc
    Please also make sure you are not copy/pasting your password into Powershell and/or the login screen as this can cause issues as well.

    I hope this helps, if not, write back here and we'll work more on getting this sorted.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Andrew Currie 21 Reputation points
    2021-02-18T17:04:13.71+00:00

    I've tried with a completely different username and password. AndrewAdmin and F3BrU@rY202! which seems to have worked. Maybe it didn't like my previous values

    EbixEuropeAdmin Eb!x£uR0P3!!123 maybe it saw the username and password as too similar. Thanks for your help.

    0 comments No comments

  2. JessicaH-MSFT 246 Reputation points Microsoft Employee
    2021-02-18T17:17:17.957+00:00

    @Andrew Currie

    I'm happy to hear it got sorted out :) I hope you enjoy experimenting with Azure! If you run into any other questions or issues, don't hesitate to post or create a support case through your Azure Portal.

    Best,
    Jessica

    0 comments No comments