我有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