首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法启动AD Forest by ARM模板

无法启动AD Forest by ARM模板
EN

Stack Overflow用户
提问于 2019-08-07 15:24:26
回答 1查看 135关注 0票数 1

我正在尝试创建Windows VM、AD Forest、Domain和DC by ARM模板。

我在使用这里的模板:

代码语言:javascript
复制
https://github.com/Azure/azure-quickstart-templates/tree/master/active-directory-new-domain

我创建了资源组,然后通过以下命令进行部署:

代码语言:javascript
复制
az group create --name arm-template --location "australiaeast"
az group deployment create -g arm-template --template-file=azuredeploy.json --parameters=azuredeploy.parameters.json

不幸的是,我得到了下面的错误:

代码语言:javascript
复制
400 Client Error: Bad Request for url: https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxx/resourcegroups/arm-template/providers/Microsoft.Resources/deployments/azuredeploy?api-version=2018-05-01

我可以通过使用完全相同的参数转到Azure门户网站来手动创建它们!想知道问题是什么,以及如何解决它。

P.S:编辑,使用template-file不起作用。证据如下:

代码语言:javascript
复制
PS E:\OnlyOnMyPC\azure-quickstart-templates\active-directory-new-domain> New-AzResourceGroupDeployment -ResourceGroupName arm-template
 -TemplateFile azuredeploy.json -TemplateParameterFile .\azuredeploy.parameters.json
New-AzResourceGroupDeployment : 5:27:27 PM - Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'The
template resource '_artifactsLocation' at line '37' and column '31' is not valid: The language expression property 'templateLink'
doesn't exist, available properties are 'template, templateHash, parameters, mode, provisioningState'.. Please see
https://aka.ms/arm-template-expressions for usage details.'.
At line:1 char:1
+ New-AzResourceGroupDeployment -ResourceGroupName arm-template -Templa ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet

New-AzResourceGroupDeployment : The deployment validation failed
At line:1 char:1
+ New-AzResourceGroupDeployment -ResourceGroupName arm-template -Templa ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzResourceGroupDeployment], InvalidOperationException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
EN

回答 1

Stack Overflow用户

发布于 2019-08-08 15:14:25

我的工作方式是通过下面的命令:

代码语言:javascript
复制
az group deployment create -g arm-template --template-uri "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/active-directory-new-domain/azuredeploy.json" --parameters @azuredeploy.parameters.json

原因是azuredeploy.json使用templateLink.uri.不幸的是,在安全性方面,你必须使用存储帐户上传文件,并在模板中引用它。

更多阅读here

现在,理解是什么让我意识到是什么让我意识到我使用的是Azure PowerShell而不是Azure Cli,这一点也很重要,它报告了更好的错误消息,只是HTTP400。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57389001

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档