Azure 虚拟机扩展和功能Azure virtual machine extensions and features

扩展是小型应用程序,用于在 Azure VM 上提供部署后配置和自动化。Extensions are small applications that provide post-deployment configuration and automation on Azure VMs. Azure 平台可承载许多扩展,涵盖 VM 配置、监视、安全性和实用工具应用程序。The Azure platform hosts many extensions covering VM configuration, monitoring, security, and utility applications. 发布服务器采用某个应用程序,将其包装到扩展中,对安装进行简化。Publishers take an application, wrap it into an extension, and simplify the installation. 你只需提供必需的参数。All you need to do is provide mandatory parameters.

如何了解哪些扩展可用?How can I find what extensions are available?

若要查看可用扩展,可以先在左侧菜单中选择 VM,然后选择“扩展”。You can view available extensions by selecting a VM, the selecting Extensions in the left menu. 若要拉取扩展的完整列表,请参阅了解适用于 Linux 的 VM 扩展了解适用于 Windows 的 VM 扩展To pull a full list of extensions, see Discovering VM Extensions for Linux and Discovering VM Extensions for Windows.

如何安装扩展?How can I install an extension?

可以通过 Azure CLI、PowerShell、资源管理器模板和 Azure 门户托管 Azure VM 扩展。Azure VM extensions can be managed using the Azure CLI, PowerShell, Resource Manager templates, and the Azure portal. 若要试用扩展,请转到 Azure 门户,选择“自定义脚本扩展”,然后传入运行扩展所需的命令或脚本。To try an extension, go to the Azure portal, select the Custom Script Extension, then pass in a command or script to run the extension.

有关详细信息,请参阅 Windows 自定义脚本扩展Linux 自定义脚本扩展For more information, see Windows Custom Script Extension and Linux Custom Script Extension.

如何管理扩展应用程序生命周期?How do I manage extension application lifecycle?

不需要直接连接到 VM 即可安装或删除扩展。You do not need to connect to a VM directly to install or delete an extension. Azure 扩展生命周期在 VM 外管理,已集成到 Azure 平台中。The Azure extension lifecycle is managed outside of the VM and integrated into the Azure platform.

关于扩展,有什么其他需要考虑的内容?Anything else I should be thinking about for extensions?

某些单独的 VM 扩展应用程序可能有其自己的环境先决条件,如对终结点的访问权限。Some individual VM extension applications may have their own environmental prerequisites, such as access to an endpoint. 每个扩展都有一篇文章,其中会介绍先决条件,包括支持哪些操作系统。Each extension has an article that explains any pre-requisites, including which operating systems are supported.

排查扩展问题Troubleshoot extensions

可以在扩展概述的 故障排除和支持 部分中找到每个扩展的故障排除信息。Troubleshooting information for each extension can be found in the Troubleshoot and support section in the overview for the extension. 下面列出了可用的故障排除信息:Here is a list of the troubleshooting information available:

命名空间Namespace 故障排除Troubleshooting 适用于 Linux 的 Azure 磁盘加密Azure Disk Encryption for Linux 适用于 Windows 的 Azure 磁盘加密Azure Disk Encryption for Windows
microsoft.compute.customscriptextensionmicrosoft.compute.customscriptextension 适用于 Windows 的自定义脚本Custom Script for Windows
microsoft.ostcextensions.customscriptforlinuxmicrosoft.ostcextensions.customscriptforlinux 适用于 Linux 的 Desired State ConfigurationDesired State Configuration for Linux
microsoft.powershell.dscmicrosoft.powershell.dsc 适用于 Windows 的 Desired State ConfigurationDesired State Configuration for Windows 适用于 Windows 的反恶意软件扩展Antimalware Extension for Windows
microsoft.enterprisecloud.monitoring.omsagentforlinuxmicrosoft.enterprisecloud.monitoring.omsagentforlinux 用于 Linux 的 Azure MonitorAzure Monitor for Linux
microsoft.enterprisecloud.monitoring.microsoftmonitoringagentmicrosoft.enterprisecloud.monitoring.microsoftmonitoringagent 用于 Windows 的 Azure MonitorAzure Monitor for Windows 重置 Linux 密码Reset password for Linux
microsoft.recoveryservices.vmsnapshotmicrosoft.recoveryservices.vmsnapshot 适用于 Linux 的快照Snapshot for Linux
microsoft.recoveryservices.vmsnapshotmicrosoft.recoveryservices.vmsnapshot 适用于 Windows 的快照Snapshot for Windows

后续步骤Next steps