我正在尝试使用 VHD 创建自动缩放,这是我的模板:
...
{
"type": "Microsoft.Compute/virtualMachineScaleSets",
"sku": {
"name": "[parameters('vmSize')]",
"tier": "Standard",
"capacity": "[parameters('instanceCount')]"
},
"name": "[variables('namingInfix')]",
"apiVersion": "2016-03-30",
"location": "[variables('location')]",
"tags": {
"displayName": "VMScaleSet"
},
"properties": {
"overprovision": "true",
"upgradePolicy": {
"mode": "Manual"
},
"virtualMachineProfile": {
"storageProfile": {
"osDisk": {
"name": "vmname",
"osType": "Linux",
"caching": "ReadWrite",
"vhd": {
"uri": "https://myvhd.vhd"
},
"createOption": "Attach"
}
},
"osProfile": {
"computerNamePrefix": "[parameters('vmSSName')]",
"adminUsername": "[parameters('adminUsername')]",
"adminPassword": "[parameters('adminPassword')]"
},
"networkProfile": {
}
}
}
}
...
不幸的是,当我通过时收到此错误osProfile
:
Parameter 'osProfile' is not allowed. (Code: InvalidParameter)
但是,如果我删除osProfile
我收到此错误:
Required parameter 'osProfile' is missing (null). (Code: InvalidParameter)