1

I'm previewing Azure Labs (managed) which is in preview at this moment. I've followed a tutorial from Microsoft on how to get started.

I've created a classroom lab with 3 virtual machines, based of a default Ubuntu image from the Marketplace. I've copied/pasted the default credentials of that template which is used for all virtual machines in that classroom lab.

Then I published it, added a user, got a registration link and used that to register as that user (a so called student). I can see the VM I expected to see. I can start it, wait some 30 seconds and then I can click on the connect button to get the ssh connection details. I open terminal, paste the ssh connection details and I get a password challenge. Excellent! So far it all works as expected. But when I enter the password I copied from the default template, permission is denied. So I try again, denied. So I wait a minute (maybe the VM needs some more time to fully boot up), but permission denied.

The tutorial looks very easy to me, I choose a default Ubuntu 18.04 LTS image to be used. I even tried to create a new classroom lab, but during creation of that template, I choose to start it, connect to it and install additional software before publishing it. That worked (as I expected). But when I publish that classroom lab, register a student account and try to login to a VM in that classroom with the correct default credentials I used to install additional software, I too get permission denied.

I'm confused.

Anyone?

0

3 Answers 3

1

Thanks to D43m0n for the feedback from Microsoft. I have been having the same issue but on CentOS images.

It appears the provisioning of the student machines after the template is published locks the default user account. Creating a new user is not such a great workaround because students will have to change the SSH or RDP settings to connect. The issue also affects more than just Ubuntu. I am seeing it on the newer version of CentOS (7.8 and greater it looks like). I think it is for any images that use cloudinit for the provisioning of the student machines. The older CentOS images use WALinuxAgent and don't seem to have this issue.

I have worked around it unlocking the default user account in /etc/rc.d/rc.local so that is executed on boot. The rc file differs on other systems so check what it is for your flavour of linux.

usermod -U default_username

This has fixed the issue for me until Microsoft fix their provisioning.

0

thanks for posting! Were you able to connect to the template machine (Ubuntu) and then you weren't able to connect to the student machine (Ubuntu)? Could you copy the exact error message you're seeing?

We are aware of an issue with Ubuntu images--when you connect, the VM tells you to reset the password but doesn't provide a way to do so. We're working on a feature that will resolve this issue. Is this what you're seeing?

You can use other flavors of Linux fine.

Let us know!

3
  • To answer shortly: your first paragraph; yes. Second paragraph; no. I’ve created a support ticket with Microsoft. They’ve confirmed the issue and are able to reproduce it. The development team for Labs is involved now.
    – D43m0n
    Jan 23, 2019 at 16:38
  • @D43m0n I have exactly the same problem, do you receive some resolution from support? Apr 2, 2019 at 14:41
  • No, they suggested a workaround: deploy a Windows Server virtual machine and on that enable Hyper-V. Once that is done, deploy Ubuntu VM's on that hypervisor... I know, I was stunned too... Instead, they acknowledged my workaround was a better approach: Either start the template before publishing and add a second user account, or add a public ssh key for the initial user account. Later I thought of a third one: add a cronjob @reboot to check for a locked account, if so, unlock it. I found It's locked by cloud-init. But only with Ubuntu images... I told MS support, still no resolution in GA..
    – D43m0n
    Apr 3, 2019 at 15:37
0

In the template-vm create a new user:

sudo adduser newuser #follow the agent
sudo usermod -aG sudo newuser

after that you can start your course vm's an login with that user.

1
  • I provided that workaround in my comment as an answer to @Łukasz-Szewczak who made a comment on Ji-Eun-MSFT 's answer. But later on, on another forum, someone from Microsoft replied (after 2 months of initially creating the issue) that this particular image is unsupported... (I mean, Ubuntu? Unsupported?) It would get supported somewhere around may this year. Yep.. I guess it's a matter of priorities...
    – D43m0n
    May 4, 2019 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.