由于用户名无效,Azure VM创建失败

Jon*_*Cox 5 linux azure docker

我正在尝试在门户中为Azure CE VM创建一个新的Docker.

我配置所有相应的设置,使用Authentication typePassword.

但总是无法部署,总是出现此错误:

{"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我设置这个时间waterloo,但它也无法与所有其他用户的名字我已经试过工作.

那么,它使用的是什么Linux发行版以及什么是用户名策略?

-

如果这是非常明显的道歉,或者我错误地提到了事情,我只是开始尝试学习Azure.目前我正在评估Azure或AWS是否适合我的项目.

谢谢!

Jas*_* Ye 11

当我通过Azure门户创建Docker for Azure CE VM时,我得到相同的错误.要创建此VM,我们应该为docker指定用户名.

根据我的知识,我认为这个模板有问题.

这个VM的图像发布者是docker,产品是docker-ce:

"plan": {
                "name": "docker-ce",
                "publisher": "docker",
                "product": "docker-ce"
            },
Run Code Online (Sandbox Code Playgroud)

此图片仅支持用户名"docker".

所以我们可以指定用户名docker来创建它.

模板应该是这样的:

"osProfile": {
                        "computerNamePrefix": "[parameters('virtualMachineName')]",
                        "adminUsername": "docker",
Run Code Online (Sandbox Code Playgroud)

默认情况下,当您SSH到管理器时,您将以常规用户名登录:docker

有关Azure CE vm的docker的更多信息,请参阅此链接.