A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
Hello JoseMoreno-MSFT,
Thank you for reaching out to the Microsoft Q&A forum.
When investigated we see that below is the concise breakdown of what’s going wrong, why the install looks successful, and exactly what to fix.
If the location field is missing or empty, validation fails with:
validation failed for field 'location' with value '': location cannot be empty
then it means the extension requires both:
- Azure Migrate project ARM ID
- Azure Migrate project location
Even though the agent installs successfully, the post-install validation workflow fails, which is why:
- The extension ends in Failed
- It doesn’t show correctly in the portal
- Logs show “Service installed successfully” but status is Failed
The reason your current command fails
You’re passing only the project ID, But the Azure Migrate Collector does not infer the region from the project ID. You must explicitly pass the project’s Azure region (eastus, westeurope, etc.).
If you omit it, the extension validation layer treats it as an empty value.
/subscriptions/.../providers/Microsoft.Migrate/migrateprojects/<project_name>
Per the official extension reference, the settings must look like this:
{
"migrateProjects": [
{
"id": "/subscriptions/<sub-id>/resourceGroups/<rg>/providers/Microsoft.Migrate/migrateProjects/<project-name>",
"location": "eastus"
}
]
}
The important to note that is
- location must match the Azure Migrate project region, not the Arc machine region
- Case matters: migrateProjects and migrateProjects[].location must be exact
Correct Azure CLI example (Arc-enabled Windows VM)
az connectedmachine extension create \
--name AzureMigrateCollectorForWindows \
--machine-name <arc-machine-name> \
--resource-group <arc-rg> \
--publisher Microsoft.Azure.Migrate \
--type AzureMigrateCollectorForWindows \
--settings '{
"migrateProjects": [
{
"id": "/subscriptions/<sub-id>/resourceGroups/<migrate-rg>/providers/Microsoft.Migrate/migrateProjects/<project-name>",
"location": "eastus"
}
]
}'
This exact structure aligns with Microsoft Learn guidance and resolves the validation failure.
Below are additional checks which is important
1. Connected Machine Agent version
azcmagent version
Must be 1.46 or newer
2. Azure Migrate project type
- The project must be created for Arc resources.
- Legacy / classic migrate projects will not work.
3. Permissions
The identity deploying the extension must have:
- Hybrid Server Resource Administrator on the Arc machine (Contributor alone is not sufficient)
4.Network access
- Arc machine must reach: https://*.migration.windowsazure.com
- Port 443 outbound, no SSL inspection breaking it.
If validation fails, the portal often doesn’t list the extension and shows stale or partial state. in this case CLI is the authoritative deployment method for this preview feature.
__So the fix is to include the project location in the extension settings o__nce that’s done, the extension should move to Succeeded within a minute or two.
Reference Documents:
Azure Migrate Collector virtual machine extension reference - Azure Migrate | Microsoft Learn
Enable additional data collection for Arc-enabled servers - Azure Migrate | Microsoft Learn
Kindly check and let us know if any questions?