Azure ARM 模板,VM扩展命令
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Azure ARM 模板,VM扩展命令相关的知识,希望对你有一定的参考价值。
Azure ARM模板中,给虚拟机安装扩展脚本的命令
"resources": [
{
"apiVersion": "[variables(‘apiVersion‘)]",
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters(‘nginxVmNamePrefix‘), copyIndex(),‘/LinuxRMCustomScriptExtension‘)]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat(‘Microsoft.Compute/virtualMachines/‘,parameters(‘nginxVmNamePrefix‘),copyIndex())]"
],
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.4",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[concat(variables(‘nginxInstallScriptPrefix‘), ‘.sh‘)]"
],
"commandToExecute": "[concat(‘sh ‘, variables(‘nginxInstallName‘), ‘.sh‘, ‘ ‘, copyIndex(), ‘ ‘, parameters(‘numberOfWebClusterInstances‘), ‘ ‘, variables(‘webClusterStartIPAddress‘))]"
}
}
}
]
以上是关于Azure ARM 模板,VM扩展命令的主要内容,如果未能解决你的问题,请参考以下文章