You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and [Windows](https://portal.azure.com/#blade/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2F72650e9f-97bc-4b2a-ab5f-9781a9fcecbc)
18
-
can't check settings inside machines until the extension is installed.
14
+
The machine configuration extension is a feature of Azure Automanage that performs audit and configuration operations inside virtual machines (VMs).
15
+
16
+
To check policies inside VMs, such as Azure compute security baseline definitions for [Linux](https://portal.azure.com/#blade/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2Ffc9b3da7-8347-4380-8e70-0a0361d8dedd) and [Windows](https://portal.azure.com/#blade/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2F72650e9f-97bc-4b2a-ab5f-9781a9fcecbc), the machine configuration extension must be installed.
19
17
20
18
## Prerequisites
21
19
22
-
For the machine to authenticate to the Guest Configuration service, the machine must have a
The identity requirement on a virtual machine is met if the following property is set.
20
+
To enable your VM to authenticate to the machine configuration service, your VM must have a [system-assigned managed identity](/azure/active-directory/managed-identities-azure-resources/overview). You can satisfy the identity requirement for your VM by setting the `"type": "SystemAssigned"` property:
25
21
26
-
```json
27
-
"identity": {
28
-
"type": "SystemAssigned"
29
-
}
30
-
```
22
+
```json
23
+
"identity": {
24
+
"type": "SystemAssigned"
25
+
}
26
+
```
31
27
32
-
### Operating Systems
28
+
### Operating systems
33
29
34
-
Support for the Guest Configuration extension is the same as operating system support
35
-
[documented for the end to end solution](../../governance/machine-configuration/overview.md#supported-client-types).
30
+
Operating system support for the machine configuration extension is the same as documented [operating system support for the end-to-end solution](/azure/governance/machine-configuration/overview#supported-client-types).
36
31
37
32
### Internet connectivity
38
33
39
-
The agent installed by the Guest Configuration extension must be able to reach
40
-
content packages listed by Guest Configuration assignments,
41
-
and report status to the Guest Configuration service.
42
-
The machine can connect using outbound HTTPS over
43
-
TCP port 443, or if a connection is provided through private networking.
34
+
The agent installed by the machine configuration extension must be able to reach content packages listed by guest configuration assignments,
35
+
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.
36
+
44
37
To learn more about private networking, see the following articles:
45
38
46
-
-[Guest Configuration, communicate over private link in Azure](../../governance/machine-configuration/overview.md#communicate-over-private-link-in-azure)
47
-
-[Use private endpoints for Azure Storage](../../storage/common/storage-private-endpoints.md)
39
+
-[Azure Automanage machine configuration, Communicate over Azure Private Link](/azure/governance/machine-configuration/overview#communicate-over-private-link-in-azure)
40
+
-[Use private endpoints for Azure Storage](/azure/storage/common/storage-private-endpoints)
48
41
49
-
## How can I install the extension?
42
+
## Install the extension
50
43
51
-
The instance name of the extension must be set to
52
-
"AzurePolicyforWindows" or "AzurePolicyforLinux",
53
-
because the policies referenced above require these specific strings.
44
+
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](/azure/templates/microsoft.guestconfiguration/guestconfigurationassignments?pivots=deployment-language-arm-template).
54
45
55
-
By default, all deployments update to the latest version. The value
56
-
of property _autoUpgradeMinorVersion_ defaults to "true" unless it is otherwise
57
-
specified. You do not need to worry about updating your code when
58
-
new versions of the extension are released.
46
+
> [!NOTE]
47
+
> In the following deployment examples, replace `<placeholder>` parameter values with specific values for your configuration.
59
48
60
-
##Automatic upgrade
49
+
### Deployment considerations
61
50
62
-
The guest configuration extension supports property `enableAutomaticUpgrade`. When this
63
-
property is set to `true`, Azure will automatically upgrade to the latest version
64
-
of the extension as future releases become available. For more information, see the page
65
-
[Automatic Extension Upgrade for VMs and Scale Sets in Azure](../automatic-extension-upgrade.md)
51
+
Before you install and deploy the machine configuration extension, review the following considerations.
66
52
67
-
### Azure Policy
53
+
-**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.
68
54
69
-
To deploy the latest version of the extension at scale including identity requirements,
70
-
[assign](../../governance/policy/assign-policy-portal.md) the Azure Policy:
55
+
-**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.
71
56
72
-
[Deploy prerequisites to enable Guest Configuration policies on virtual machines](https://github.com/Azure/azure-policy/blob/master/built-in-policies/policySetDefinitions/Guest%20Configuration/GuestConfiguration_Prerequisites.json).
57
+
-**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/virtual-machines/automatic-extension-upgrade).
58
+
59
+
-**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](/azure/governance/policy/assign-policy-portal#create-a-policy-assignment). Create the following assignment with Azure Policy:
60
+
-[Deploy prerequisites to enable Guest Configuration policies on virtual machines](https://github.com/Azure/azure-policy/blob/master/built-in-policies/policySetDefinitions/Guest%20Configuration/GuestConfiguration_Prerequisites.json)
61
+
62
+
-**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](/rest/api/guestconfiguration/guestconfigurationassignments) resources. For example, the [`ConfigurationUri`](/rest/api/guestconfiguration/guestconfigurationassignments/createorupdate#guestconfigurationnavigation), [`Mode`](/rest/api/guestconfiguration/guestconfigurationassignments/createorupdate#configurationmode), and [`ConfigurationSetting`](/rest/api/guestconfiguration/guestconfigurationassignments/createorupdate#configurationsetting) properties are each managed per-configuration rather than on the VM extension.
73
63
74
64
### Azure CLI
75
65
76
66
To deploy the extension for Linux:
77
67
78
-
79
68
```azurecli
80
-
az vm extension set --publisher Microsoft.GuestConfiguration --name ConfigurationforLinux --extension-instance-name AzurePolicyforLinux --resource-group myResourceGroup --vm-name myVM --enable-auto-upgrade true
69
+
az vm extension set --publisher Microsoft.GuestConfiguration --name ConfigurationForLinux --extension-instance-name AzurePolicyforLinux --resource-group <myResourceGroup> --vm-name <myVM> --enable-auto-upgrade true
81
70
```
82
71
83
72
To deploy the extension for Windows:
84
73
85
74
```azurecli
86
-
az vm extension set --publisher Microsoft.GuestConfiguration --name ConfigurationforWindows --extension-instance-name AzurePolicyforWindows --resource-group myResourceGroup --vm-name myVM --enable-auto-upgrade true
75
+
az vm extension set --publisher Microsoft.GuestConfiguration --name ConfigurationforWindows --extension-instance-name AzurePolicyforWindows --resource-group <myResourceGroup> --vm-name <myVM> --enable-auto-upgrade true
See below for a list of the possible error messages when enabling the extension
216
+
The following table lists possible error messages related to enabling the Guest Configuration extension.
240
217
241
-
|Error Code|Description|
242
-
|-|-|
243
-
|NoComplianceReport|VM has not reported the compliance data.|
244
-
|GCExtensionMissing|Guest Configuration extension is missing.|
245
-
|ManagedIdentityMissing|Managed identity is missing.|
246
-
|UserIdentityMissing|User assigned identity is missing.|
247
-
|GCExtensionManagedIdentityMissing|Guest Configuration extension and managed identity is missing.|
248
-
|GCExtensionUserIdentityMissing|Guest Configuration extension and user identity is missing.|
249
-
|GCExtensionIdentityMissing|Guest Configuration extension, managed identity and user identity are missing.|
218
+
|Error code |Description|
219
+
|---|---|
220
+
|**NoComplianceReport**| The VM hasn't reported the compliance data.|
221
+
|**GCExtensionMissing**| The machine configuration (guest configuration) extension is missing.|
222
+
|**ManagedIdentityMissing**| The managed identity is missing.|
223
+
|**UserIdentityMissing**| The user-assigned identity is missing.|
224
+
|**GCExtensionManagedIdentityMissing**| The machine configuration (guest configuration) extension and managed identity are missing.|
225
+
|**GCExtensionUserIdentityMissing**| The machine configuration (guest configuration) extension and user-assigned identity are missing.|
226
+
|**GCExtensionIdentityMissing**| The machine configuration (guest configuration) extension, managed identity, and user-assigned identity are missing.|
250
227
251
228
## Next steps
252
229
253
-
* For more information about Azure Policy's guest configuration, see [Understand Azure Policy's Guest Configuration](../../governance/machine-configuration/overview.md)
254
-
* For more information about how the Linux Agent and extensions work, see [Azure VM extensions and features for Linux](features-linux.md).
255
-
* For more information about how the Windows Guest Agent and extensions work, see [Azure VM extensions and features for Windows](features-windows.md).
256
-
* To install the Windows Guest Agent, see [Azure Windows Virtual Machine Agent Overview](agent-windows.md).
257
-
* To install the Linux Agent, see [Azure Linux Virtual Machine Agent Overview](agent-linux.md).
230
+
- For more information about the machine configuration extension, see [Understand the machine configuration feature of Azure Automanage](/azure/governance/machine-configuration/overview).
231
+
- For more information about how the Linux Agent and extensions work, see [Virtual machine extensions and features for Linux](features-linux.md).
232
+
- For more information about how the Windows Guest Agent and extensions work, see [Virtual machine extensions and features for Windows](features-windows.md).
233
+
- To install the Windows Guest Agent, see [Azure Virtual Machine Agent overview](agent-windows.md).
234
+
- To install the Linux Agent, see [Understanding and using the Azure Linux Agent](agent-linux.md).
0 commit comments