Azure AVD添加VM到主机池时通过ARM模板部署Sophos AV的配置问题
AVD主机池新增VM自动部署Sophos AV的ARM模板问题
- 我需要在新VM添加到主机池时安装Sophos AV。由于该应用需要从Sophos Cloud Management Console获取动态数据完成镜像通用化,且该操作需要人工介入,因此我无法通过AIB编写Sophos安装脚本。
- 基于此,我计划通过ARM Template File URL在VM被添加到主机池时部署Sophos,但我不清楚如何编写可用的json文件,经过大量搜索后我得到了如下最接近需求的代码:
{ "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", "contentVersion": "1.0.0.0", "variables": {}, "resources": [ { "type": "Microsoft.Compute/virtualMachines/extensions", "apiVersion": "2018-06-01", "name": "[concat(parameters('vmName'),'/CustomScriptExtension')]", "location": "[resourceGroup().location]", "properties": { "publisher": "Microsoft.Compute", "type": "CustomScriptExtension", "typeHandlerVersion": "1.10", "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ "https://demostoracc.file.core.windows.net/scripts/sophos_install.ps1" ], "timestamp": 202101021 }, "protectedSettings": { "commandToExecute": "powershell.exe -ExecutionPolicy Unrestricted -File sophos_install.ps1" } } } ] }
上述代码目前仍无法正常运行。我已知该json文件需要存储在blob中,之后在AVD更新后自定义配置中引用该blob地址,配置界面参考如下:
内容的提问来源于stack exchange,提问作者Maelito
相关产品推荐
相关产品推荐

