适用于:✔️ Windows VM ✔️ Linux VM ✔️ 本地环境 ✔️ Azure VM ✔️ 已启用 Azure Arc 的服务器。
本教程介绍如何根据条件创建动态范围并应用修补程序。
在本教程中,你将了解:
如果没有 Azure 订阅,可在开始前创建一个试用帐户。
Prerequisites
没有补丁编排的先决条件。 但是,您必须将时间表与 VM 关联,以便进行计划的补丁管理。
创建动态范围
动态范围仅存在于计划的上下文中。 可以使用一个调度关联到计算机、动态范围或两者。 一个动态范围不能有多个计划。
若要创建动态范围,请执行以下步骤:
登录到 Azure 门户,然后转到“Azure 更新管理器”。
选择“概述”“计划更新”>“创建维护配置”>。
在“创建维护配置”窗格中,输入“基本信息”选项卡上的详细信息。对于维护范围,请选择“来宾”(Azure VM,已启用 Arc 的 VM/服务器)。
在 “动态作用域 ”选项卡上,按照 步骤添加动态作用域。
在“ 计算机 ”选项卡上,选择“ 添加计算机 ”,将任何单个计算机添加到维护配置。
在“ 更新 ”选项卡上,选择要包含或排除的修补程序分类。 然后选择 “标记”。
在“ 标记 ”选项卡上,提供标记。
在“ 审阅 + 创建 ”选项卡上,查看配置,然后选择“ 创建”。
az maintenance assignment create-or-update-subscription --maintenance-configuration-id "/subscriptions/{subscription_id}/resourcegroups/{rg}/providers/Microsoft.Maintenance/maintenanceConfigurations/clitestmrpconfinguestadvanced" --name cli_dynamicscope_recording01 --filter-locations chinanorth3 chinaeast3 --filter-os-types windows linux --filter-tags {{tagKey1:[tagKey1Val1,tagKey1Val2],tagKey2:[tagKey2Val1,tagKey2Val2]}} --filter-resource-group rg1, rg2 --filter-tags-operator All -l global
New-AzConfigurationAssignment -ConfigurationAssignmentName $maintenanceConfigurationName -MaintenanceConfigurationId $maintenanceConfigurationInGuestPatchCreated.Id -FilterLocation chinanorth3,chinaeast3 -FilterOsType Windows,Linux -FilterTag '{"tagKey1" : ["tagKey1Value1", "tagKey1Value2"], "tagKey2" : ["tagKey2Value1", "tagKey2Value2", "tagKey2Value3"] }' -FilterOperator "Any"
提供同意
同意应用更新是计划修补工作流中的一个重要步骤。 有关涵盖提供同意的各种方法的步骤,请参阅 “提供同意以应用更新”。
相关内容