5

I'm trying to create a new Docker for Azure CE VM in the portal.

I configure all the settings as appropriate, using an Authentication type of Password.

However it always fails to deploy, always with this error:

{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.","details":[{"code":"Conflict","message":"{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"OSProvisioningClientError\",\r\n \"message\": \"Username specified for the VM is invalid for this Linux distribution. Error details: (000004)Failed to handle ovf-env.xml: (000007)Failed to create user account:waterloo, retcode:127, output:/bin/sh: useradd: not found\\n.\"\r\n }\r\n ]\r\n }\r\n}"}]}

The User name I set this time was waterloo, but it has also failed to work with every other User name I've tried.

So, what Linux distribution is it using and what is the username policy?

-

Apologies if this is very obvious, or I've referred to things incorrectly, I've only just started trying to learn Azure. Currently I'm evaluating if Azure or AWS is the way to go for my project.

Thank you!

2
  • I'd ask this over at Server Fault instead. But I don't think this is a username policy issue. The error is in the message posted: output:/bin/sh: useradd: not found. Whatever image you are provisioning doesn't have the useradd utility. It is likely Azure is using cloud-init or other provisioning system that relies on some binaries to be available in the image. The Docker image must not have these available. Though, more information is needed so someone can reproduce (what settings / steps are taken to create the VM).
    – Andy Shinn
    Commented Jul 16, 2017 at 17:03
  • what base image are you using?
    – 4c74356b41
    Commented Jul 16, 2017 at 17:50

1 Answer 1

11

When I create Docker for Azure CE VM via Azure portal, I get the same error. To create this VM, we should specify username to docker.

Based on my knowledge, I think there are something wrong with this template.

This VM's image publisher is docker, product is docker-ce:

"plan": {
                "name": "docker-ce",
                "publisher": "docker",
                "product": "docker-ce"
            },

This image only support username "docker".

So we can specify username to docker to create it.

Template should like this:

"osProfile": {
                        "computerNamePrefix": "[parameters('virtualMachineName')]",
                        "adminUsername": "docker",

By default when you SSH into a manager, you will be logged in as the regular username: docker

More information about docker for Azure CE vm, please refer to this link.

2
  • Only when I specified the username as docker I was able to deploy the machine. Thanks!
    – amp
    Commented Jul 17, 2017 at 13:37
  • 1
    Note that using a password also fails to deploy claiming it's an "internal error". You have to use the 'docker' username and SSH login.
    – Beanow
    Commented Oct 16, 2017 at 9:23

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