注:交叉发表在Hashicorp论坛:https://discuss.hashicorp.com/t/problems-in-adding-linux-defender-extension-in-azure/53949
我正在尝试将MS Defender扩展添加到Azure中的Linux VM(rockylinux 8.x)。下面是我的terraform代码:
resource "azurerm_virtual_machine_extension" "linux_defender" {
name = "linux_defender"
virtual_machine_id = azurerm_virtual_machine.linuxvm[0].id
auto_upgrade_minor_version = "true"
publisher = "Microsoft.Azure.AzureDefenderForServers"
type = "MDE.Linux"
type_handler_version = "1.0"
}
当我执行它时,我得到以下错误:
Error: Code="VMExtensionHandlerNonTransientError" Message="The handler for VM extension type 'Microsoft.Azure.AzureDefenderForServers.MDE.Linux' has reported terminal failure for VM extension 'linux_defender' with error message: '[ExtensionOperationError] Non-zero exit code: 53, /var/lib/waagent/Microsoft.Azure.AzureDefenderForServers.MDE.Linux-1.0.3.7/PythonRunner.sh src/MdeExtensionHandler.py enable\n[stdout]\nPython 3.6.8\n\n\n[stderr]\n2023-05-18 16:20:02,212, INFO - Start executing handler action: enable\n2023-05-18 16:20:02,213, ERROR - Failed to retrieve configuration. Expecting value: line 1 column 1 (char 0)\n'.\r\n \r\n'Enable handler for the extension failed. More information on troubleshooting is available at https://aka.ms/vmextensionlinuxtroubleshoot'"
│
│ with module.virtual_machines["d-rhub-vm0"].azurerm_virtual_machine_extension.linux_defender[0],
有没有人成功地为Azure中的Redhat风格的Linux服务器添加了防御者扩展?我不确定Defender是否会从Azure Marketplace映像中预加载到Linux中?
1条答案
按热度按时间rfbsl7qr1#
检查以下代码:
启用Azure Defender:源代码来自:Microsoft defender terraform-Github
编码:
下面是启用loganalytics代理或azure监控代理的示例。
创建日志分析工作区以存储这些日志。
**注意:**启用自动部署时,Defender for Endpoint for Linux安装将在已存在运行服务的计算机上中止
沿着possible resolutions VMExtensionProvisioningError| Microsoft learn
参考号:启用集成|Microsoft Learn