Azure VM creation fails due to invalid username

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

I configure all the settings, if necessary, using the 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}"}]}

User name I set this time to waterloo , but it also did not work with any other username I tried.

So which Linux distribution is used and what is the username policy?

-

Sorry if this is very obvious, or if I referred to things incorrectly, I just started learning Azure. I am currently evaluating whether Azure or AWS is suitable for my project.

Thanks!

+5
source share
1 answer

When I create a Docker for Azure CE VM through the Azure portal, I get the same error. To create this virtual machine, we must provide the docker username.

Based on my knowledge, I think that something is wrong with this template.

This docker virtual machine image publisher, docker-ce product:

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

This image only supports the docker username.

Thus, we can specify the username for docker to create it.

The template should look like this:

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

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

For more information on docker for Azure CE vm, see the link.

+11
source

Source: https://habr.com/ru/post/1269870/


All Articles