我正在尝试使用尽可能多的JSON模板和参数通过JSON在azure中部署虚拟机,当我尝试为VM生成扩展时出现错误:
“VMExtensionProvisioningError”
带有消息:
“无法对受保护的设置字符串进行解码,解密和反序列化。错误消息:密钥集不存在”
我不知道这代表什么。
{
"apiVersion": "2017-12-01",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]"
],
"location": "[resourceGroup().location]",
"name": "[concat(parameters('virtualMachineName'),'/CustomScriptExtension')]",
"properties": {
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.7",
"autoUpgradeMinorVersion" : true,
"settings": {
"fileUris": [
"https://{storageAccountName}.blob.core.windows.net/scripts/{scriptName}"
],
"commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -file "{scriptName}" ')]"
},
"protectedSettings": { "storageAccountName": "[parameters('storageAccountName')]" }
},
"type": "Microsoft.Compute/virtualMachines/extensions"
},
我正在尝试的是执行从Azure中的blob获取的脚本。
我做错了什么?