Skip to content

Commit b3058c6

Browse files
authored
Merge pull request #292548 from SnehaSudhirG/02Jan-CTMigration
edited as per the new info
2 parents e0f49b9 + 752fa36 commit b3058c6

File tree

1 file changed

+51
-65
lines changed

1 file changed

+51
-65
lines changed

articles/automation/change-tracking/guidance-migration-log-analytics-monitoring-agent.md

Lines changed: 51 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: snehasudhirG
55
services: automation
66
ms.subservice: change-inventory-management
77
ms.topic: how-to
8-
ms.date: 10/10/2024
8+
ms.date: 01/03/2025
99
ms.author: sudhirsneha
1010
ms.custom:
1111
ms.service: azure-automation
@@ -19,8 +19,16 @@ This article provides guidance to move from Change Tracking and Inventory using
1919

2020
Using the Azure portal, you can migrate from Change Tracking & Inventory with LA agent to Change Tracking & Inventory with AMA and there are two ways to do this migration:
2121

22-
- Migrate single/multiple VMs from the Virtual Machines page.
23-
- Migrate multiples VMs on LA version solution within a particular Automation Account.
22+
- Migrate single/multiple machines from the Azure Virtual Machines page or Machines-Azure Arc page.
23+
- Migrate multiple Virtual Machines on LA version solution within a particular Automation Account.
24+
25+
Additionally, you can use a script to migrate all Virtual Machines and Arc-enabled non-Azure machines at a Log Analytics workspace level from LA version solution to Change Tracking and Inventory with AMA. This isn't possible using the Azure portal experience mentioned above.
26+
27+
The script allows you to also migrate to the same workspace. If you are migrating to the same workspace then, the script will remove the LA(MMA/OMS) Agent from your machines. This may cause the other solutions to stop working. We therefore, recommend that you plan the migration accordingly. For example, first migrate other solution and then proceed with Change Tracking migration.
28+
29+
> [!NOTE]
30+
> The removal doesn't work on MMA agents that were installed using the MSI installer. It only works on VM/Arc VM extensions.
31+
2432

2533
> [!NOTE]
2634
> File Integrity Monitoring (FIM) using [Microsoft Defender for Endpoint (MDE)](/azure/defender-for-cloud/file-integrity-monitoring-enable-defender-endpoint) is now currently available. Follow the guidance to migrate from:
@@ -74,79 +82,61 @@ To onboard through Azure portal, follow these steps:
7482

7583
1. Select the specific Arc machine with Change Tracking V1 enabled that needs to be migrated to Change Tracking V2.
7684

77-
1. Select **Migrate to Change Tracking with AMA** and in the **Configure with Azure monitor agent**, provide the resource id in the **Log analytics workspace** and select **Migrate** to initiate the deployment.
85+
1. Select **Migrate to Change Tracking with AMA** and in the **Configure with Azure monitor agent**, provide the resource ID in the **Log analytics workspace** and select **Migrate** to initiate the deployment.
7886

7987
:::image type="content" source="media/guidance-migration-log-analytics-monitoring-agent/onboarding-single-arc-vm.png" alt-text="Screenshot of onboarding a single Arc VM to Change tracking and inventory using Azure monitoring agent." lightbox="media/guidance-migration-log-analytics-monitoring-agent/onboarding-single-arc-vm.png":::
8088

8189
1. Select **Manage Activity log connection** to evaluate the incoming events and logs across LA agent and AMA version.
8290

83-
### [Arc-enabled VMs - PowerShell script](#tab/ps-policy)
84-
85-
To onboard Arc-enabled VMs, follow the steps:
91+
### [Log Analytics Workspace - PowerShell Script ](#tab/ps-policy)
8692

8793
#### Prerequisites
8894

89-
- Ensure you have PowerShell installed. The latest version of PowerShell 7 or higher is recommended. Follow the steps to [Install PowerShell on Windows, Linux, and macOS](/powershell/scripting/install/installing-powershell).
90-
- Obtain Read access for the specified workspace resources.
95+
- Ensure you have PowerShell installed on the machine where you are planning to execute the script.
96+
- The script cannot be executed on Azure Cloud Shell.
97+
- The latest version of PowerShell 7 or higher is recommended. Follow the steps to [Install PowerShell on Windows, Linux, and macOS](/powershell/scripting/install/installing-powershell).
98+
- Obtain Write access for the specified workspace and machine resources.
9199
- [Install the latest version of the Az PowerShell module](/powershell/azure/install-azure-powershell). The **Az.Accounts** and **Az.OperationalInsights** modules are required to pull workspace agent configuration information.
92100
- Ensure you have Azure credentials to run `Connect-AzAccount` and `Select-AzContext` which set the script's context.
93-
Follow these steps to migrate using scripts.
101+
102+
Follow these steps to migrate using scripts:
94103

95104
#### Migration guidance
96105

97-
1. Install the [script](https://github.com/mayguptMSFT/AzureMonitorCommunity/blob/master/Azure%20Services/Azure%20Monitor/Agents/Migration%20Tools/DCR%20Config%20Generator/CTDcrGenerator/CTWorkSpaceSettingstoDCR.ps1) and run it to conduct migrations. The script does the following:
106+
- The [script](https://github.com/Azure/ChangeTrackingAndInventory/blob/main/MigrateToChangeTrackingAndInventoryUsingAMA/CTAndIMigrationFromMMAToAMA.ps1) will migrate all Azure Machines and Arc enabled Non-Azure Machines onboarded to LA Agent Change Tracking solution for the Input Log Analytics Workspace to the Change Tracking using AMA agent for the Output Log Analytics Workspace.
98107

99-
1. It ensures the new workspace resource ID is different from the one associated with the Change Tracking and Inventory using the LA version.
108+
- The script provides the ability to migrate using the same workspace, that is Input and Output Log Analytics Workspaces are the same. However, it will then remove the LA (MMA/OMS) agents from the machines.
100109

101-
1. It migrates the settings for the following data types:
102-
- Windows Services
103-
- Linux Files
104-
- Windows Files
105-
- Windows Registry
106-
- Linux Daemons
110+
- The script migrates the settings for the following data types:
111+
- Windows services
112+
- Linux files
113+
- Windows files
114+
- Windows registry
115+
- Linux Daemons
107116

108-
1. The script consists of the following **Parameters** that require an input from you.
109-
110-
**Parameter** | **Required** | **Description** |
111-
--- | --- | --- |
112-
`InputWorkspaceResourceId`| Yes | Resource ID of the workspace associated with Change Tracking & Inventory with Log Analytics. |
113-
`OutputWorkspaceResourceId`| Yes | Resource ID of the workspace associated with Change Tracking & Inventory with Azure Monitoring Agent. |
114-
`OutputDCRName`| Yes | Custom name of the new DCR created. |
115-
`OutputDCRLocation`| Yes | Azure location of the output workspace ID. |
116-
`OutputDCRTemplateFolderPath`| Yes | Folder path where DCR templates are created. |
117-
118-
1. A DCR template is generated when you run the above script and the template is available in `OutputDCRTemplateFolderPath`. You have to associate the new DCR to transfer the settings to the Change Tracking and Inventory using AMA.
119-
120-
1. Sign in to [Azure portal](https://portal.azure.com) and go to **Monitor** and under **Settings**, select **Data Collection Rules**.
121-
1. Select the data collection rule that you have created in Step 1 from the listing page.
122-
1. In the data collection rule page, under **Configurations**, select **Resources** and then select **Add**.
123-
1. In the Select a scope, from Resource types, select Machines-Azure Arc that is connected to the subscription and then select Apply to associate the ctdcr created in Step 1 to the Arc-enabled machine and it will also install the Azure Monitoring Agent extension. For more information, see [Enable Change Tracking and Inventory - for Arc-enabled VMs - using portal/CLI](enable-vms-monitoring-agent.md#enable-change-tracking-and-inventory).
124-
125-
Install the Change Tracking extension as per the OS type for the Arc-enabled VM.
126-
127-
**Linux**
128-
129-
```azurecli
130-
az connectedmachine extension create --name ChangeTracking-Linux --publisher Microsoft.Azure.ChangeTrackingAndInventory --type-handler-version 2.20 --type ChangeTracking-Linux --machine-name XYZ --resource-group XYZ-RG --location X --enable-auto-upgrade
131-
```
132-
133-
**Windows**
134-
135-
```azurecli
136-
az connectedmachine extension create --name ChangeTracking-Windows --publisher Microsoft.Azure.ChangeTrackingAndInventory --type-handler-version 2.20 --type ChangeTracking-Windows --machine-name XYZ --resource-group XYZ-RG --location X --enable-auto-upgrade
137-
```
138-
139-
If the CT logs table schema does not exist, the script mentioned in Step 1 will fail. To troubleshoot, run the following script -
140-
141-
```azurepowershell-interactive
142-
143-
$psWorkspace = Get-AzOperationalInsightsWorkspace -ResourceGroupName $resourceGroup -Name $laws
144-
# Enabling CT solution on LA ws
145-
New-AzMonitorLogAnalyticsSolution -Type ChangeTracking -ResourceGroupName $resourceGroup -Location $psWorkspace.Location -WorkspaceResourceId $psWorkspace.ResourceId
146-
```
117+
- The script consists of the following **Parameters** that require an input from you.
118+
119+
**Parameter** | **Required** | **Description** |
120+
--- | --- | --- |
121+
`InputLogAnalyticsWorkspaceResourceId`| Yes | Resource ID of the workspace associated with Change Tracking & Inventory with Log Analytics. |
122+
`OutputLogAnalyticsWorkspaceResourceId`| Yes | Resource ID of the workspace associated with Change Tracking & Inventory with Azure Monitoring Agent. |
123+
`OutputDCRName`| Yes | Custom name of the new DCR to be created. |
124+
`OutputVerbose`| No | Optional. Input $true for verbose logs. |
125+
`AzureEnvironment`| Yes | Folder path where DCR templates are created. |
126+
127+
- In Details, the script does the following:
128+
129+
1. Get list of all Azure and Arc Onboarded Non-Azure machines onboarded to Input Log Analytics Workspace for Change Tracking solution using MMA Agent.
130+
1. Create the Data Collection Rule (DCR) ARM template by fetching the files, services, tracking & registry settings configured in the legacy solution and translating them to equivalent settings for the latest solution using AMA Agent and Change Tracking Extensions for the Output Log Analytics Workspace.
131+
1. Deploy Change Tracking solution ARM template to Output Log Analytics Workspace. This is done only if migration to the same workspace is not done. The output workspace requires the legacy solution to create the log analytics tables for Change Tracking like ConfigurationChange & ConfigurationData. The deployment name will be DeployCTSolution_CTMig_{GUID} and it will be in same resource group as Output Log Analytics Workspace.
132+
1. Deploy the DCR ARM template created in Step 2. The deployment name will be OutputDCRName_CTMig_{GUID} and it will be in same resource group as Output Log Analytics Workspace. The DCR will be created in the same location as the Output Log Analytics Workspace.
133+
1. Removes MMA Agent from machines list populated in Step 1. This is done only if migration to the same workspace is carried out. Machines which have the MMA agent installed via the MSI, will not have the MMA agent removed. It will be removed only if the MMA Agent was installed as an extension.
134+
1. Assign DCR to machines and install AMA Agent and CT Extensions. The deployment name of it will be MachineName_CTMig and it will be in same resource group as the machine.
135+
- Assign the DCR deployed in Step 4 to all machines populated in Step 1.
136+
- Install the AMA Agent to all machines populated in Step 1.
137+
- Install the CT Agent to all machines populated in Step 1.
147138
---
148139

149-
150140
### Compare data across Log analytics Agent and Azure Monitoring Agent version
151141

152142
After you complete the onboarding to Change tracking with AMA version, select **Switch to CT with AMA** on the landing page to switch across the two versions and compare the following events.
@@ -175,17 +165,13 @@ To obtain the Log Analytics Workspace resource ID, follow these steps:
175165

176166
**For single VM and Automation Account**
177167

178-
1. 100 VMs per Automation Account can be migrated in one instance.
179-
1. Any VM with > 100 file/registry settings for migration via portal isn't supported now.
180-
1. Arc VM migration isn't supported with portal, we recommend that you use PowerShell script migration.
181168
1. For File Content changes-based settings, you have to migrate manually from LA version to AMA version of Change Tracking & Inventory. Follow the guidance listed in [Track file contents](manage-change-tracking-monitoring-agent.md#configure-file-content-changes).
182-
1. Alerts that you configure using the Log Analytics Workspace must be [manually configured](configure-alerts.md).
169+
1. If migration to different workspace is carried out, then alerts configured using the Log Analytics Workspace must be [manually configured](configure-alerts.md).
183170

184171
### [Using PowerShell script](#tab/limit-policy)
185172

186-
1. For File Content changes-based settings, you must migrate manually from LA version to AMA version of Change Tracking & Inventory. Follow the guidance listed in [Track file contents](manage-change-tracking.md#track-file-contents).
187-
1. Any VM with > 100 file/registry settings for migration via Azure portal isn't supported.
188-
1. Alerts that you configure using the Log Analytics Workspace must be [manually configured](configure-alerts.md).
173+
1. For File Content changes-based settings, you have to migrate manually from LA version to AMA version of Change Tracking & Inventory. Follow the guidance listed in [Track file contents](manage-change-tracking-monitoring-agent.md#configure-file-content-changes).
174+
1. If migration to different workspace is carried out, then alerts configured using the Log Analytics Workspace must be [manually configured](configure-alerts.md).
189175

190176
---
191177

0 commit comments

Comments
 (0)