Skip to content

Commit f1a3a44

Browse files
Merge pull request #221980 from guywi-ms/vmi-policy-flow
Update to VM insights flow using Policy
2 parents f670bed + e72091b commit f1a3a44

File tree

4 files changed

+34
-28
lines changed

4 files changed

+34
-28
lines changed
-518 Bytes
Loading
-1.56 KB
Loading
57.1 KB
Loading

articles/azure-monitor/vm/vminsights-enable-policy.md

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,47 +33,50 @@ The initiatives apply to new machines you create and machines you modify, but no
3333

3434
To assign a VM insights policy initiative to a subscription or management group from the Azure portal:
3535

36-
1. Select **Azure Monitor** > **Virtual machines**.
37-
1. Select **Overview** > **Other onboarding options** and then **Enable** under **Enable using policy**.
36+
1. Search for and open **Policy**.
37+
1. Select **Assignments** > **Assign initiative**.
3838

39-
The **Azure Monitor for VMs Policy Coverage** lists the tenant root group, which consists of the top-level management groups and subscriptions in your tenant. To assign an initiative to a lower-level management group or subscription, select one of the management groups to drill down in your [hierarchy of management groups](../../governance/management-groups/overview.md#hierarchy-of-management-groups-and-subscriptions).
39+
:::image type="content" source="media/vminsights-enable-policy/vm-insights-assign-initiative.png" lightbox="media/vminsights-enable-policy/vm-insights-assign-initiative.png" alt-text="Screenshot that shows the Policy Assignments screen with the Assign initiative button highlighted.":::
4040

41-
:::image type="content" source="media/vminsights-enable-policy/other-onboarding-options.png" lightbox="media/vminsights-enable-policy/other-onboarding-options.png" alt-text="Screenshot showing other onboarding options page of VM insights with the Enable using policy option.":::
42-
43-
1. Select **Assign Policy** to assign a policy to a subscription or management group.
44-
45-
[![Create assignment](media/vminsights-enable-policy/create-assignment.png)](media/vminsights-enable-policy/create-assignment.png#lightbox)
46-
47-
1. (Optional) Change the **Assignment name** and add a **Description**.
48-
1. Select **Exclusions** to exclude specific resources from the policy assignment. For example, if your scope is a management group, you might specify a subscription in that management group to be excluded from the assignment.
41+
This opens the **Assign initiative** screen.
4942

5043
[![Assign initiative](media/vminsights-enable-policy/assign-initiative.png)](media/vminsights-enable-policy/assign-initiative.png#lightbox)
5144

52-
1. On the **Parameters** tab, select a **Log Analytics workspace** to which all virtual machines in the assignment will send data. For virtual machines to send data to different workspaces, create multiple assignments, each with their own scope.
45+
1. Configure the initiative assignment:
5346

54-
If you're assigning a legacy initiative, the workspace must have the *VMInsights* solution installed, as described in [Configure Log Analytics workspace for VM insights](vminsights-configure-workspace.md).
55-
56-
[![Workspace](media/vminsights-enable-policy/assignment-workspace.png)](media/vminsights-enable-policy/assignment-workspace.png#lightbox)
57-
58-
> [!NOTE]
59-
> If you select a workspace that's not within the scope of the assignment, grant *Log Analytics Contributor* permissions to the policy assignment's Principal ID. Otherwise, you might get a deployment failure like `The client '343de0fe-e724-46b8-b1fb-97090f7054ed' with object id '343de0fe-e724-46b8-b1fb-97090f7054ed' does not have authorization to perform action 'microsoft.operationalinsights/workspaces/read' over scope ...`
47+
1. In the **Scope** field, select the management group or subscription to which you'll assign the initiative.
48+
1. (Optional) Select **Exclusions** to exclude specific resources from the initiative assignment. For example, if your scope is a management group, you might specify a subscription in that management group to be excluded from the assignment.
49+
1. Select the ellipsis (...) next to **Initiative assignment** to launch the policy definition picker, and select one of the VM insights initiatives.
50+
1. (Optional) Change the **Assignment name** and add a **Description**.
51+
1. On the **Parameters** tab, select a **Log Analytics workspace** to which all virtual machines in the assignment will send data. For virtual machines to send data to different workspaces, create multiple assignments, each with their own scope.
52+
53+
If you're assigning a legacy initiative, the workspace must have the *VMInsights* solution installed, as described in [Configure Log Analytics workspace for VM insights](vminsights-configure-workspace.md).
54+
55+
[![Workspace](media/vminsights-enable-policy/assignment-workspace.png)](media/vminsights-enable-policy/assignment-workspace.png#lightbox)
56+
57+
> [!NOTE]
58+
> If you select a workspace that's not within the scope of the assignment, grant *Log Analytics Contributor* permissions to the policy assignment's Principal ID. Otherwise, you might get a deployment failure like `The client '343de0fe-e724-46b8-b1fb-97090f7054ed' with object id '343de0fe-e724-46b8-b1fb-97090f7054ed' does not have authorization to perform action 'microsoft.operationalinsights/workspaces/read' over scope ...`
6059
6160
1. Select **Review + Create** to review the initiative assignment details and select **Create** to create the assignment.
6261

63-
Don't create a remediation task at this point because you'll probably need multiple remediation tasks to enable existing virtual machines. For more information about creating remediation tasks, see [Remediate compliance results](#create-a-remediate-task).
62+
Don't create a remediation task at this point because you'll probably need multiple remediation tasks to enable existing virtual machines. For more information about creating remediation tasks, see [Remediate compliance results](#create-a-remediation-task).
6463

6564
## Review compliance for a VM insights policy initiative
6665

6766
After you assign an initiative, you can review and manage compliance for the initiative across your management groups and subscriptions.
6867

6968
To see how many virtual machines exist in each of the management groups or subscriptions and their compliance status:
7069

71-
1. Select **Azure Monitor** > **Virtual machines**.
72-
1. Select **Overview** > **Other onboarding options** and then **Enable** under **Enable using policy**.
70+
1. Search for and open **Azure Monitor**.
71+
1. Select **Virtual machines** > **Overview** > **Other onboarding options** and then **Enable** under **Enable using policy**.
72+
73+
:::image type="content" source="media/vminsights-enable-policy/other-onboarding-options.png" lightbox="media/vminsights-enable-policy/other-onboarding-options.png" alt-text="Screenshot showing other onboarding options page of VM insights with the Enable using policy option.":::
74+
75+
This opens the **Azure Monitor for VMs Policy Coverage** page.
7376

7477
[![VM insights Manage Policy page](media/vminsights-enable-policy/manage-policy-page-01.png)](media/vminsights-enable-policy/manage-policy-page-01.png#lightbox)
7578

76-
This table describes the compliance information provided on the **Azure Monitor for VMs Policy Coverage** page.
79+
The following table describes the compliance information presented on the **Azure Monitor for VMs Policy Coverage** page.
7780

7881
| Function | Description |
7982
|----------|-------------|
@@ -106,11 +109,10 @@ To see how many virtual machines exist in each of the management groups or subsc
106109

107110
1. Select a policy definition to open the **Policy compliance** page.
108111

109-
## Create a remediate task
112+
## Create a remediation task
110113

111114
If your assignment doesn't show 100% compliance, create remediation tasks to evaluate and enable existing VMs. You'll most likely need to create multiple remediation tasks, one for each policy definition. You can't create a remediation task for an initiative.
112115

113-
114116
To create a remediation task:
115117

116118
1. From the **Initiative compliance** page, select **Create Remediation Task**.
@@ -121,12 +123,16 @@ To create a remediation task:
121123

122124
[![New remediation task](media/vminsights-enable-policy/new-remediation-task.png)](media/vminsights-enable-policy/new-remediation-task.png#lightbox)
123125

124-
1. Review **Remediation settings** and **Resources to remediate** and modify as necessary.
125-
1. To track the progress of remediation tasks, select **Remediate** from the **Policy** menu and select the **Remediation tasks** tab.
126+
1. Review **Remediation settings** and **Resources to remediate** and modify as necessary, then select **Remediate** to create the task.
126127

127-
[![Screenshot shows the Policy Remediation pane for Monitor | Virtual Machines.](media/vminsights-enable-policy/remediation.png)](media/vminsights-enable-policy/remediation.png#lightbox)
128-
129128
Once the remediation tasks are complete, your VMs should be compliant with agents installed and enabled for VM insights.
129+
130+
## Track remediation tasks
131+
132+
To track the progress of remediation tasks, select **Remediate** from the **Policy** menu and select the **Remediation tasks** tab.
133+
134+
[![Screenshot shows the Policy Remediation pane for Monitor | Virtual Machines.](media/vminsights-enable-policy/remediation.png)](media/vminsights-enable-policy/remediation.png#lightbox)
135+
130136

131137
## Next steps
132138

0 commit comments

Comments
 (0)