question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

issue with accessing created VM

See original GitHub issue

Description

Outline the issue here: I’m using Azure CLI 2.0. I’ve installed it under Bash on Ubuntu on Windows according to https://docs.microsoft.com/en-us/cli/azure/install-azure-cli#windows I have a VHD-image in Azure and I try to create VM from it. I have issue with accessing to created VM if I use the command: az vm create … --attach-os-disk … --admin-password Azure1234567890+ --admin-username azureuser --authentication-type password --os-type linux when I try to connect to VM using ssh azureuser@VM-IP-address I get an error message about authentication failure. If I reset password of ‘azureuser’ with az vm extension set --name VMAccessForLinux --publisher Microsoft.OSTCExtensions --protected-settings ‘{“username”:“azureuser”,“password”:“Azure1234567890+”}’ I can connect to the VM.

I don’t have authentication failure issue, i.e. I can successfully connect to created VM if I use the following commands: az vm create … --attach-os-disk … --os-type linux az vm extension set --name VMAccessForLinux --publisher Microsoft.OSTCExtensions --protected-settings ‘{“username”:“azureuser”,“password”:“Azure1234567890+”}’

Environment summary

Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: Bash on Ubuntu on Windows according to https://docs.microsoft.com/en-us/cli/azure/install-azure-cli#windows CLI Version: What version of the CLI and modules are installed? (Use az --version)
Answer here: D:>az --version azure-cli (2.0.6) D:>bash root@ALEXEY-HP:/mnt/d# az --version azure-cli (2.0.6) OS Version: What OS and version are you using?
Answer here: Windows 10 Pro 64-bit Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: cmd.exe, Bash on Windows

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
yugangw-msftcommented, May 16, 2017

The pertinent issue is when attach to an existing OS disk, the creds provided in the command line are not picked up by server, probably by design. We should either error out on unused args or make it work

az vm create ... --attach-os-disk ... --admin-password Azure1234567890+ --admin-username azureuser --authentication-type password --os-type linux
0reactions
alexeyshishkin01commented, May 17, 2017

ok, got it! what I have is:

  1. clear case create new user credentials works fine az vm create … --image … --admin-password Azure1234567890+ --admin-username azureuser --authentication-type password

  2. needs to be fixed/documented case, but at least with known solution create new user credentials doesn’t work with az vm create … --attach-os-disk … --admin-password Azure1234567890+ --admin-username azureuser --authentication-type password new user credentials have to be created with additional command az vm extension set … --name VMAccessForLinux --publisher Microsoft.OSTCExtensions --protected-settings ‘{“username”:“azureuser”,“password”:“Azure1234567890+”}’

  3. needs to be clarified case reset password of the user existing in VHD image doesn’t work either with az vm create … --attach-os-disk … --admin-password <NEW_PASSWORD_FOR_EXISTING_USER> --admin-username <EXISTING_USER> --authentication-type password or with az vm extension set … --name VMAccessForLinux --publisher Microsoft.OSTCExtensions --protected-settings ‘{“username”:“<EXISTING_USER>”,“password”:“<NEW_PASSWORD_FOR_EXISTING_USER>”}’

thanks in advance!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot VM application access in Azure - Virtual Machines
Use these detailed troubleshooting steps to isolate issues in connecting to applications running on virtual machines in Azure.
Read more >
Troubleshooting a virtual machine that has stopped responding
Virtual machines can become unresponsive/freeze/hang in the same way as a physical server for various reasons.
Read more >
Chapter 13. Configuring virtual machine network connections
To work around this problem, you can set destination NAT using nftables for the VM. Additional resources. Configuring externally visible virtual machines ......
Read more >
Troubleshooting SSH errors - Compute Engine - Google Cloud
Connect to your VM using the Google Cloud console or the Google Cloud CLI. ... To resolve this issue, create a custom firewall...
Read more >
Having trouble accessing host drives within a Windows XP ...
I have an XP virtual machine (VHD) with legacy development software installed and I was able to get it working within a Hyper-V...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found