从自动化帐户启用更新管理Enable Update Management from an Automation account

本文介绍如何使用自动化帐户为环境中的 VM 启用更新管理功能。This article describes how you can use your Automation account to enable the Update Management feature for VMs in your environment. 要大规模启用 Azure VM,必须使用更新管理启用现有 Azure VM。To enable Azure VMs at scale, you must enable an existing Azure VM using Update Management.

备注

在启用更新管理时,只有某些区域支持链接 Log Analytics 工作区和自动化帐户。When enabling Update Management, only certain regions are supported for linking a Log Analytics workspace and an Automation account. 有关支持的映射对的列表,请参阅自动化帐户和 Log Analytics 工作区的区域映射For a list of the supported mapping pairs, see Region mapping for Automation account and Log Analytics workspace.

先决条件Prerequisites

登录 AzureSign in to Azure

登录 Azure 门户Sign in to the Azure portal.

启用更新管理Enable Update Management

  1. 在自动化帐户中,选择“更新管理”下的“更新管理”。In your Automation account, select Update management under Update management.

  2. 选择 Log Analytics 工作区和自动化帐户,然后选择“启用”以启用更新管理。Choose the Log Analytics workspace and Automation account and select Enable to enable Update Management. 安装最多需要 15 分钟才能完成。The setup takes up to 15 minutes to complete.

    启用更新管理

启用 Azure VMEnable Azure VMs

  1. 从自动化帐户中,选择“更新管理”下的“更新管理”。From your Automation account select Update management under Update management.

  2. 选择“+添加 Azure VM”,再从列表中选择一个或多个 VM。Select + Add Azure VMs and select one or more VMs from the list. 无法启用的虚拟机将灰显,无法选择。Virtual machines that can't be enabled are grayed out and unable to be selected. Azure VM 可以位于任何区域中,无论自动化帐户位于哪里。Azure VMs can exist in any region no matter the location of your Automation account.

  3. 选择“启用”,将所选 VM 添加到计算机组为此功能保存的搜索结果中。Select Enable to add the selected VMs to the computer group saved search for the feature.

    启用 Azure VM

启用非 Azure VMEnable non-Azure VMs

对于在 Azure 外部托管的计算机或服务器,请执行以下步骤,为它们启用“更新管理”。For machines or servers hosted outside of Azure, perform the following steps to enable them with Update Management.

  1. 从自动化帐户中,选择“更新管理”下的“更新管理”。From your Automation account, select Update management under Update management.

  2. 选择“添加非 Azure 计算机”。Select Add non-Azure machine. 此操作将打开一个新的浏览器窗口,其中包含有关安装和配置适用于 Windows 的 Log Analytics 代理的说明,使计算机可以开始向更新管理报告。This action opens a new browser window with instructions to install and configure the Log Analytics agent for Windows so that the machine can begin reporting to Update Management.

在工作区中启用计算机Enable machines in the workspace

必须将手动安装的计算机或已向工作区报告的计算机添加到 Azure 自动化中,才能启用更新管理。Manually installed machines or machines already reporting to your workspace must to be added to Azure Automation for Update Management to be enabled.

  1. 从自动化帐户中,选择“更新管理”下的“更新管理”。From your Automation account, select Update management under Update management.

  2. 选择“管理计算机”。Select Manage machines. 如果之前选择了“在所有可用的和将来的计算机上启用”选项,则“管理计算机”按钮可能灰显 The Manage machines button might be grayed out if you previously chose the option Enable on all available and future machines

    保存的搜索

  3. 要为向工作区报告的所有可用计算机启用更新管理,请在“管理计算机”页上选择“在所有可用计算机上启用”。To enable Update Management for all available machines reporting to the workspace, select Enable on all available machines on the Manage Machines page. 此操作禁止控件单独添加计算机,并将向工作区报告的所有计算机添加到计算机组保存的搜索查询 MicrosoftDefaultComputerGroup 中。This action disables the control to add machines individually and adds all of the machines reporting to the workspace to the computer group saved search query MicrosoftDefaultComputerGroup. 选中此项后,此操作会禁用“管理计算机”选项。When selected, this action disables the Manage Machines option.

  4. 若要为所有可用的计算机和将来的计算机启用该功能,请选择“在所有可用的和将来的计算机上启用”。To enable the feature for all available machines and future machines, select Enable on all available and future machines. 此选项从工作区中删除已保存的搜索和作用域配置,并允许该功能包括当前或将来向工作区报告的所有 Azure 和非 Azure 计算机。This option deletes the saved search and scope configuration from the workspace, and permits the feature to include all Azure and non-Azure machines that currently or in the future, report to the workspace. 选中此项后,此操作会永久禁用“管理计算机”选项,因为没有可用的范围配置。When selected, this action disables the Manage Machines option permanently, as there's no scope configuration available.

    备注

    由于此选项会删除 Log Analytics 中保存的搜索和范围配置,因此在选择此选项之前,必须先删除 Log Analytics 工作区中的所有删除锁。Because this option deletes the saved search and scope configuration within Log Analytics, it's important to remove any deletion locks on the Log Analytics Workspace before you select this option. 否则,该选项将无法删除配置,必须手动将其删除。If you don't, the option will fail to remove the configurations and you must remove them manually.

  5. 如果需要,可以通过重新添加初始的已保存搜索查询将范围配置添加回来。If necessary, you can add the scope configuration back by re-adding the initial saved search query. 有关详细信息,请参阅限制更新管理的部署范围For more information, see Limit Update Management deployment scope.

  6. 若要为一台或多台计算机启用该功能,请选择“在所选计算机上启用”,并选择每台计算机旁边的“添加” 。To enable the feature for one or more machines, select Enable on selected machines and select Add next to each machine. 此任务会将所选计算机名称添加到计算机组为此功能保存的搜索查询。This task adds the selected machine names to the computer group saved search query for the feature.

后续步骤Next steps