从自动化帐户启用更新管理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,必须使用更新管理启用现有 VM。To enable Azure VMs at scale, you must enable an existing 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 中没有的计算机。Machines not in Azure need to be added manually.

  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, select Enable on all available machines on the Manage Machines page. 此操作禁用单独添加计算机的控件。This action disables the control to add machines individually. 此任务会将向工作区进行报告的所有计算机的名称添加到计算机组保存的搜索查询。This task adds all the names of the machines reporting to the workspace to the computer group saved search query. 选中此项后,此操作将禁用“管理计算机”按钮。When selected, this action disables the Manage Machines button.

  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 searches and scope configurations from the workspace and opens the feature for all Azure and non-Azure machines that are reporting to the workspace. 选中此项后,此操作将永久禁用“管理计算机”按钮,因为没有剩余的作用域配置。When selected, this action disables the Manage Machines button permanently, as there's no scope configuration left.

  5. 如果需要,可以通过重新添加初始的已保存搜索来添加作用域配置。If necessary, you can add the scope configurations back by re-adding the initial saved searches. 有关详细信息,请参阅限制更新管理的部署范围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