我有ARM部署模板,其中包含与DSC扩展虚拟机资源ARM部署失败不正确的DSC扩展模板错误
"resources": [
{
"name": "Microsoft.Powershell.DSC",
"type": "extensions",
"location": "[resourceGroup().location]",
"apiVersion": "2015-06-15",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', parameters('appVMName'))]"
],
"tags": {
"displayName": "appDSC"
},
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.9",
"autoUpgradeMinorVersion": true,
"forceUpdateTag": "[parameters('appDSCUpdateTagVersion')]",
"settings": {
"configuration": {
"url": "[parameters('dscArchiveUrl')]",
"script": "appDSC.ps1",
"function": "Main"
},
"configurationArguments": {
"nodeName": "[parameters('appVMName')]",
"webDeployPackage": "[parameters('appWebPackage')]",
"backgroundServicePackage": "[parameters('backgroundServicePackage')]"
}
}
}
}
]
我设法让这项工作我第一次执行,但现在它响应错误:
15:37:17 - Resource Microsoft.Compute/virtualMachines 'Unique-InApp' failed with message '{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "VMExtensionProvisioningError",
"message": "VM has reported a failure when processing extension 'Microsoft.Powershell.DSC'. Error message: \"The
DSC Extension received an incorrect input: Configuration.url requires that configuration.script is specified.\nPlease c
orrect the input and retry executing the extension.\"."
}
]
}
}'
正如你所看到的,我明明把script
到configuration
,但由于某种原因它不是由ARM部署脚本的认可。 我想,这只是错误的错误信息,我有不同的问题,但没有正确的诊断信息,我无法理解它。 那么问题是怎么解决的?
你为什么要使用2.9版本的任何原因? latets是2.22 ...你试过卸载扩展,然后重新部署? – Kiran
它帮助,谢谢 – Sovent
它不可能帮助,有autoupgrademinorversion标志设置为true @Kiran – 4c74356b41