issue with accessing created VM
See original GitHub issueDescription
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:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
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
ok, got it! what I have is:
clear case create new user credentials works fine az vm create … --image … --admin-password Azure1234567890+ --admin-username azureuser --authentication-type password
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+”}’
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!