若要使用 Azure 更新管理器管理 Azure 虚拟机(VM)或已启用 Azure Arc 的服务器,必须分配相应的角色。 可以使用预定义角色,也可以使用具有所需特定权限的自定义角色。
角色
内置角色在虚拟机上提供全面权限,其中包括所有 Azure 更新管理器权限。
| Resource | 角色 |
|---|---|
| Azure VM | Azure 虚拟机参与者或 Azure 所有者 |
| 已启用 Azure Arc 的服务器 | Azure Connected Machine 资源管理员 |
权限
下表显示了使用更新管理器管理更新作时所需的权限。 可以创建自定义角色,并仅为特定作分配该角色所需的权限。
更新管理器读取权限,用于查看更新管理器数据
| Action | 许可 | Scope |
|---|---|---|
| 读取 Azure VM 属性 | Microsoft.Compute/virtualMachines/read | |
| 读取 Azure VM 的评估数据 | Microsoft.Compute/virtualMachines/patchAssessmentResults/read Microsoft.Compute/virtualMachines/patchAssessmentResults/softwarePatches/read |
|
| 读取 Azure VM 的修补程序安装数据 | Microsoft.Compute/virtualMachines/patchInstallationResults/read Microsoft.Compute/virtualMachines/patchInstallationResults/softwarePatches/read |
|
| 读取已启用 Azure Arc 的服务器属性 | Microsoft.HybridCompute/machines/read | |
| 读取已启用 Azure Arc 的服务器评估数据 | Microsoft.HybridCompute/machines/patchAssessmentResults/read Microsoft.HybridCompute/machines/patchAssessmentResults/softwarePatches/read |
|
| 读取启用 Azure Arc 的服务器的补丁安装数据 | Microsoft.HybridCompute/machines/patchInstallationResults/read Microsoft.HybridCompute/machines/patchInstallationResults/softwarePatches/read |
|
| 获取 Azure VM 异步操作的状态 | Microsoft.Compute/locations/operations/read | 计算机订阅 |
| 查看 Azure Arc 启用的计算机上更新中心操作的状态 | Microsoft.HybridCompute/locations/updateCenterOperationResults/read | 计算机订阅 |
在更新管理器中执行按需操作的权限
除了前面在单个计算机上进行按需操作时记录的读取权限外,还需要以下权限。
| Action | 许可 | Scope |
|---|---|---|
| 在 Azure VM 上触发评估 | Microsoft.Compute/virtualMachines/assessPatches/action | |
| 在 Azure VM 上安装更新 | Microsoft.Compute/virtualMachines/installPatches/action | |
| 获取 Azure VM 异步操作的状态 | Microsoft.Compute/locations/operations/read | 计算机订阅 |
| 在已启用 Azure Arc 的服务器上触发评估 | Microsoft.HybridCompute/machines/assessPatches/action | |
| 在已启用 Azure Arc 的服务器上安装更新 | Microsoft.HybridCompute/machines/installPatches/action | |
| 查看 Azure Arc 启用的计算机上更新中心操作的状态 | Microsoft.HybridCompute/locations/updateCenterOperationResults/read | 计算机订阅 |
| 更新 Azure 虚拟机的补丁模式或评估模式 | Microsoft.Compute/virtualMachines/write | Machine |
| 更新已启用 Azure Arc 的计算机的评估模式 | Microsoft.HybridCompute/machines/write | Machine |
与计划修补相关的权限(维护配置)
除了对由计划管理的各个计算机的权限外,还需要以下权限。
| Action | 许可 | Scope |
|---|---|---|
| 注册 Microsoft.Maintenance 资源提供程序的订阅 | Microsoft.Maintenance/register/action | 订阅 |
| 创建或修改维护配置 | Microsoft.Maintenance/maintenanceConfigurations/write | 订阅/资源组 |
| 读取维护配置 | Microsoft.Maintenance/maintenanceConfigurations/read | 订阅/资源组 |
| 删除维护配置 | Microsoft.Maintenance/maintenanceConfigurations/delete | 订阅/资源组 |
| 创建或修改配置分配 | Microsoft.Maintenance/configurationAssignments/write | 订阅/资源组/主机 |
| 读取配置分配 | Microsoft.Maintenance/configurationAssignments/read | 订阅/资源组/主机 |
| 删除配置分配 | Microsoft.Maintenance/configurationAssignments/delete | 订阅/资源组/主机 |
| 读取维护更新资源 | Microsoft.Maintenance/updates/read | Machine |
| 阅读用于执行维护更新的资源 | Microsoft.Maintenance/applyUpdates/read | Machine |
| 获取更新部署列表 | Microsoft.Resources/deployments/read | 维护配置和虚拟机订阅 |
| 创建或更新更新部署 | Microsoft.Resources/deployments/write | 维护配置和虚拟机订阅 |
| 获取更新部署的操作状态列表 | Microsoft.Resources/deployments/operationstatuses | 维护配置和虚拟机订阅 |
| 读取 InGuestPatch 维护范围内的维护配置分配 | Microsoft.Maintenance/configurationAssignments/maintenanceScope/InGuestPatch/read | 订阅/资源组/主机 |
| 为 InGuestPatch 维护范围创建或修改维护配置任务 | Microsoft.Maintenance/configurationAssignments/maintenanceScope/InGuestPatch/write | 订阅/资源组/主机 |
| 删除 InGuestPatch 维护范围的维护配置分配任务 | Microsoft.Maintenance/configurationAssignments/maintenanceScope/InGuestPatch/delete | 订阅/资源组/主机 |
| 读取 InGuestPatch 维护范围内的维护配置 | Microsoft.Maintenance/maintenanceConfigurations/maintenanceScope/InGuestPatch/read | 订阅/资源组 |
| 为 InGuestPatch 维护范围创建或修改维护配置 | Microsoft.Maintenance/maintenanceConfigurations/maintenanceScope/InGuestPatch/write | 订阅/资源组 |
| 删除 InGuestPatch 维护范围的维护配置 | Microsoft.Maintenance/maintenanceConfigurations/maintenanceScope/InGuestPatch/delete | 订阅/资源组 |