在Scaleset中为VM配置Windows Defender

时间:2018-03-26 15:58:58

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

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

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

2 个答案:

答案 0 :(得分:1)

  

任何人都可以告诉我是否可以在每个VM上配置排除项   没有RDP到所有VM?

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

答案 1 :(得分:1)

通常这是VM级别的配置,因此通常通过已经设置好的自定义VM映像或通过VM扩展来管理,后者将Defender配置为机器的一部分(这类似于@ 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

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