2017-07-16 77 views
4

我正在尝试在门户中为Azure CE VM创建新的Docker。由于用户名无效,Azure虚拟机创建失败

我根据需要配置所有设置,使用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是否适合我的项目。

谢谢!

+0

我会问服务器故障,而不是。但我不认为这是用户名政策问题。错误发布在消息中:'output:/ bin/sh:useradd:not found'。无论您配置哪个映像都没有useradd工具。 Azure很可能使用cloud-init或其他供应系统,这些系统依赖于映像中可用的一些二进制文件。 Docker镜像必须没有这些可用的镜像。虽然需要更多信息,以便有人可以复制(创建虚拟机采取了哪些设置/步骤)。 –

+0

你使用什么样的基础图像? – 4c74356b41

回答

9

当我通过Azure门户为Azure CE VM创建Docker时,出现同样的错误。 要创建此虚拟机,我们应该指定用户名为docker

基于我的知识,我认为这个模板有问题。

此VM的形象出版商docker,产品docker-ce

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

此图片仅支持用户名 “泊坞窗”。

因此,我们可以指定用户名到docker来创建它。

模板应该是这样的:

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

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

更多关于码头工人为天青CE VM的信息,请参阅本link

+0

仅当我将用户名指定为'docker'时,才能部署机器。谢谢! – amp

+0

请注意,使用密码也无法部署声称它是“内部错误”。您必须使用'码头'用户名**和SSH登录**。 – Beanow

相关问题