Selitev na inoviranje vrha:
Preberite, kako lahko selitev in posodobitev v Azure izboljšata učinkovitost delovanja, odpornost in varnost vašega podjetja, kar vam omogoča, da v celoti sprejmete AI.Prijavite se zdaj
Ta brskalnik ni več podprt.
Izvedite nadgradnjo na Microsoft Edge, če želite izkoristiti vse prednosti najnovejših funkcij, varnostnih posodobitev in tehnične podpore.
The Machine Configuration extension performs audit and configuration operations inside virtual machines (VMs).
To check policies inside VMs, such as Azure compute security baseline definitions for Linux and Windows, the Machine Configuration extension must be installed.
Prerequisites
To enable your VM to authenticate to the Machine Configuration service, your VM must have a system-assigned managed identity. You can satisfy the identity requirement for your VM by setting the "type": "SystemAssigned" property:
The agent installed by the Machine Configuration extension must be able to reach content packages listed by guest configuration assignments,
and report status to the Machine Configuration service. The VM can connect by using outbound HTTPS over TCP port 443, or a connection provided through private networking.
To learn more about private networking, see the following articles:
You can install and deploy the Machine Configuration extension directly from the Azure CLI or PowerShell. Deployment templates are also available for Azure Resource Manager (ARM), Bicep, and Terraform. For deployment template details, see Microsoft.GuestConfiguration guestConfigurationAssignments.
Opomba
In the following deployment examples, replace <placeholder> parameter values with specific values for your configuration.
Deployment considerations
Before you install and deploy the Machine Configuration extension, review the following considerations.
Instance name. When you install the Machine Configuration extension, the instance name of the extension must be set to AzurePolicyforWindows or AzurePolicyforLinux. The security baseline definition policies described earlier require these specific strings.
Versions. By default, all deployments update to the latest version. The value of the autoUpgradeMinorVersion property defaults to true unless otherwise specified. This feature helps to alleviate concerns about updating your code when new versions of the Machine Configuration extension are released.
Automatic upgrade. The Machine Configuration extension supports the enableAutomaticUpgrade property. When this property is set to true, Azure automatically upgrades to the latest version of the extension as future releases become available. For more information, see Automatic Extension Upgrade for VMs and Virtual Machine Scale Sets in Azure.
Azure Policy. To deploy the latest version of the Machine Configuration extension at scale including identity requirements, follow the steps in Create a policy assignment to identify noncompliant resources. Create the following assignment with Azure Policy:
Other properties. You don't need to include any settings or protected-settings properties on the Machine Configuration extension. The agent retrieves this class of information from the Azure REST API Guest Configuration assignment resources. For example, the ConfigurationUri, Mode, and ConfigurationSetting properties are each managed per-configuration rather than on the VM extension.
Azure CLI
To deploy the extension for Linux:
Azure CLI
az vm extension set --publisher Microsoft.GuestConfiguration --name ConfigurationForLinux --extension-instance-name AzurePolicyforLinux --resource-group<myResourceGroup>--vm-name<myVM>--enable-auto-upgradetrue
To deploy the extension for Windows:
Azure CLI
az vm extension set --publisher Microsoft.GuestConfiguration --name ConfigurationforWindows --extension-instance-name AzurePolicyforWindows --resource-group<myResourceGroup>--vm-name<myVM>--enable-auto-upgradetrue
İstenen Durum Yapılandırması (DSC) uzantılarını dağıtmayı, uyumsuz sunucuları düzeltmek için bu uzantıları uygulamayı ve özel betik uzantısını kullanmayı öğrenin.