【问题标题】:Configure Windows Defender for VMs in Scaleset为 Scaleset 中的 VM 配置 Windows Defender
【发布时间】:2018-03-28 06:01:55
【问题描述】:

我有一个包含 5 个 VM 的 Azure Scaleset。当我将我的应用程序(服务结构应用程序)部署到规模集时,Windows Defender 实时保护导致 CPU/内存最大化。我认为这是因为 Windows Defender 软件中没有设置适当的排除项。

谁能告诉我是否可以在每个 VM 上配置排除项,而无需对所有 VM 进行 RDP?

【问题讨论】:

    标签: azure-service-fabric azure-virtual-machine


    【解决方案1】:

    通常这是 VM 级别的配置,因此通常通过已经设置好的自定义 VM 映像或通过将 Defender 配置为即将到来的机器的一部分的 VM 扩展进行管理(这类似于 @jason-ye -msft 的回答)。关于在集群中设置反恶意软件有一些类似的指导 here

    # Script to add Microsoft Antimalware extension to VM Scale Set(VMSS) and Service Fabric Cluster(in turn it used VMSS)
    # Login to your Azure Resource Manager Account and select the Subscription to use
    Login-AzureRmAccount
    # Specify your subscription ID
    #$subscriptionId="SUBSCRIPTION ID HERE"
    Select-AzureRmSubscription -SubscriptionId $subscriptionId
    # Specify location, resource group, and VM Scaleset for the extension
    #$location = "LOCATION HERE" # eg., “West US or Southeast Asia” or “Central US”
    #$resourceGroupName = "RESOURCE GROUP NAME HERE"
    #$vmScaleSetName = "YOUR VM SCALE SET NAME"
    # Configuration.JSON configuration file can be customized as per MSDN documentation: https://msdn.microsoft.com/en-us/library/dn771716.aspx
    #$settingString = ‘{"AntimalwareEnabled": true}’;
    # retrieve the most recent version number of the extension
    $allVersions= (Get-AzureRmVMExtensionImage -Location $location -PublisherName “Microsoft.Azure.Security” -Type “IaaSAntimalware”).Version
    $versionString = $allVersions[($allVersions.count)-1].Split(“.”)[0] + “.” + $allVersions[($allVersions.count)-1].Split(“.”)[1]
    $VMSS = Get-AzureRmVmss -ResourceGroupName $resourceGroupName -VMScaleSetName $vmScaleSetName
    Add-AzureRmVmssExtension -VirtualMachineScaleSet $VMSS -Name “IaaSAntimalware” -Publisher “Microsoft.Azure.Security” -Type “IaaSAntimalware” -TypeHandlerVersion $versionString
    Update-AzureRmVmss -ResourceGroupName $resourceGroupName -Name $vmScaleSetName -VirtualMachineScaleSet $VMSS
    

    Service Fabric 团队确实有关于 how to configure your environment 的指导,其中包含有关您要添加的排除项的信息。其中包括:

    Antivirus Excluded directories
    Program Files\Microsoft Service Fabric
    FabricDataRoot (from cluster configuration)
    FabricLogRoot (from cluster configuration)
    
    Antivirus Excluded processes
    Fabric.exe
    FabricHost.exe
    FabricInstallerService.exe
    FabricSetup.exe
    FabricDeployer.exe
    ImageBuilder.exe
    FabricGateway.exe
    FabricDCA.exe
    FabricFAS.exe
    FabricUOS.exe
    FabricRM.exe
    FileStoreService.exe
    

    目前尚不清楚是否有一种好方法可以在您启用反恶意软件扫描的同时设置这些排除项。

    【讨论】:

    • 不幸的是,我使用 Azure 门户中的 Microsoft 设置设置了 SF 环境,而不是使用自定义 vm 映像。我想这意味着我现在唯一的选择是远程访问每台机器以更新排除项并为后续缩放创建图像。
    【解决方案2】:

    谁能告诉我是否可以在每个 VM 上配置排除项 无需对所有虚拟机进行 RDP?

    据我所知,您应该为您的映像配置排除项,然后将此映像上传到 Azure,然后使用此映像创建新的 VMSS,这样,在您增加 VMSS 实例后,新创建的 vmss 实例将不受 Windows Defender 软件的影响。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-01-26
      • 1970-01-01
      • 2018-02-10
      • 1970-01-01
      • 2019-11-05
      • 1970-01-01
      • 2018-10-10
      • 1970-01-01
      相关资源
      最近更新 更多