az migrate local replication
Note
This reference is part of the migrate extension for the Azure CLI (version 2.75.0 or higher). The extension will automatically install the first time you run an az migrate local replication command. Learn more about extensions.
Command group 'migrate local' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage replication for Azure Local/Stack HCI migrations.
Commands to initialize replication infrastructure and create new server replications for migrations to Azure Local and Azure Stack HCI environments.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az migrate local replication get |
Get detailed information about a specific replicating server. |
Extension | Preview |
| az migrate local replication get-job |
Retrieve the status of an Azure Migrate job. |
Extension | Preview |
| az migrate local replication init |
Initialize Azure Migrate local replication infrastructure. |
Extension | Preview |
| az migrate local replication list |
List all protected items (replicating servers) in a project. |
Extension | Preview |
| az migrate local replication new |
Create a new replication for an Azure Local server. |
Extension | Preview |
| az migrate local replication remove |
Stop replication for a migrated server. |
Extension | Preview |
az migrate local replication get
Command group 'migrate local replication' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Get detailed information about a specific replicating server.
Retrieves comprehensive details about a specific protected item (replicating server) including its protection state, replication health, configuration settings, and historical information about failover operations.
You can retrieve the protected item either by:
- Full ARM resource ID (--protected-item-id or --id)
- Name with project context (--protected-item-name with --resource-group and --project-name)
The command returns detailed information including:
- Basic information (name, resource ID, correlation ID)
- Protection status (state, health, resync requirements)
- Configuration (policy, replication extension)
- Failover history (test, planned, unplanned)
- Allowed operations
- Machine details (source and target information)
- Health errors with recommended actions (if any)
Note: This command uses a preview API version and may experience breaking changes in future releases.
az migrate local replication get [--id --protected-item-id]
[--ids]
[--name --protected-item-name]
[--project-name]
[--resource-group]
[--subscription]
[--subscription-id]
Examples
Get a protected item by its full ARM resource ID
az migrate local replication get \
--protected-item-id "/subscriptions/xxxx/resourceGroups/myRG/providers/Microsoft.DataReplication/replicationVaults/myVault/protectedItems/myItem"
Get a protected item by name using project context
az migrate local replication get \
--protected-item-name myProtectedItem \
--resource-group myRG \
--project-name myMigrateProject
Get a protected item with specific subscription
az migrate local replication get \
--name myProtectedItem \
--resource-group myRG \
--project-name myMigrateProject \
--subscription-id 00000000-0000-0000-0000-000000000000
Get a protected item using short parameter names
az migrate local replication get \
--id "/subscriptions/xxxx/resourceGroups/myRG/providers/Microsoft.DataReplication/replicationVaults/myVault/protectedItems/myItem"
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The full ARM resource ID of the protected item. If provided, --resource-group and --project-name are not required.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The name of the protected item (replicating server).
Name of the Azure Migrate project.
The Azure Migrate project that contains the replicating server. Required when using --protected-item-name.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Resource group containing the Azure Migrate project.
The name of the resource group where the Azure Migrate project is located. Required when using --protected-item-name.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure subscription ID.
The subscription containing the Azure Migrate project. Uses the default subscription if not specified.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az migrate local replication get-job
Command group 'migrate local replication' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Retrieve the status of an Azure Migrate job.
Get the status and details of an Azure Migrate replication job. You can retrieve a specific job by its ARM ID or name, or list all jobs in a migrate project.
Note: This command uses a preview API version and may experience breaking changes in future releases.
az migrate local replication get-job [--id --job-id]
[--ids]
[--job-name --name]
[--project-name]
[--resource-group]
[--subscription]
[--subscription-id]
Examples
Get a specific job by ARM ID
az migrate local replication get-job \
--job-id "/subscriptions/{sub-id}/resourceGroups/{rg}/providers/Microsoft.DataReplication/replicationVaults/{vault}/jobs/{job-name}"
Get a specific job by name
az migrate local replication get-job \
--resource-group myRG \
--project-name myMigrateProject \
--job-name myJobName
List all jobs in a project
az migrate local replication get-job \
--resource-group myRG \
--project-name myMigrateProject
Get job using short parameter names
az migrate local replication get-job \
--id "/subscriptions/{sub-id}/resourceGroups/{rg}/providers/Microsoft.DataReplication/replicationVaults/{vault}/jobs/{job-name}"
Get job with specific subscription
az migrate local replication get-job \
-g myRG \
--project-name myMigrateProject \
--name myJobName \
--subscription-id "12345678-1234-1234-1234-123456789012"
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Specifies the job ARM ID for which the details need to be retrieved.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Job identifier.
Name of the migrate project.
The name of the Azure Migrate project. Required when using --resource-group.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Resource group name where the vault is present.
The name of the resource group containing the recovery services vault. Required when using --project-name.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure subscription ID.
The subscription containing the migrate project. Uses the current subscription if not specified.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az migrate local replication init
Command group 'migrate local replication' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Initialize Azure Migrate local replication infrastructure.
Initialize the replication infrastructure required for migrating servers to Azure Local or Azure Stack HCI. This command sets up the necessary fabrics, policies, and mappings between source and target appliances. This is a prerequisite before creating any server replications.
Note: This command uses a preview API version and may experience breaking changes in future releases.
az migrate local replication init --resource-group
--source-appliance-name
--target-appliance-name
[--cache-storage-account-id --cache-storage-id]
[--ids]
[--pass-thru {false, true}]
[--project-name]
[--subscription]
[--subscription-id]
Examples
Initialize replication infrastructure
az migrate local replication init \
--resource-group myRG \
--project-name myMigrateProject \
--source-appliance-name myVMwareAppliance \
--target-appliance-name myAzStackHCIAppliance
Initialize and return success status
az migrate local replication init \
--resource-group myRG \
--project-name myMigrateProject \
--source-appliance-name mySourceAppliance \
--target-appliance-name myTargetAppliance \
--pass-thru
Required Parameters
Specifies the Resource Group of the Azure Migrate Project.
Source appliance name.
Name of the Azure Migrate appliance that discovered the source servers.
Target appliance name.
Name of the Azure Local appliance that will host the migrated servers.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Specifies the Storage Account ARM Id to be used for private endpoint scenario.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Return true when the command succeeds.
When enabled, returns a boolean value indicating successful completion.
| Property | Value |
|---|---|
| Default value: | False |
| Accepted values: | false, true |
Name of the Azure Migrate project.
The Azure Migrate project to be used for server migration.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure subscription ID.
The subscription containing the Azure Migrate project. Uses the current subscription if not specified.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az migrate local replication list
Command group 'migrate local replication' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List all protected items (replicating servers) in a project.
Lists all servers that have replication enabled in an Azure Migrate project. This command shows the replication status, health, and configuration details for each protected server.
The command returns information including:
- Protection state (e.g., Protected, ProtectedReplicating, EnablingFailed)
- Replication health (Normal, Warning, Critical)
- Source machine name and target VM name
- Replication policy name
- Resource IDs (used for remove command)
- Health errors if any
Note: This command uses a preview API version and may experience breaking changes in future releases.
az migrate local replication list --project-name
--resource-group
[--subscription-id]
Examples
List all replicating servers in a project
az migrate local replication list \
--resource-group myRG \
--project-name myMigrateProject
List replicating servers with a specific subscription
az migrate local replication list \
--resource-group myRG \
--project-name myMigrateProject \
--subscription-id 00000000-0000-0000-0000-000000000000
Required Parameters
Name of the Azure Migrate project.
The Azure Migrate project that contains the replicating servers.
Resource group containing the Azure Migrate project.
The name of the resource group where the Azure Migrate project is located.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Azure subscription ID.
The subscription containing the Azure Migrate project. Uses the default subscription if not specified.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az migrate local replication new
Command group 'migrate local replication' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create a new replication for an Azure Local server.
Create a new replication to migrate a discovered server to Azure Local. You can specify the source machine either by its ARM resource ID or by selecting it from a numbered list of discovered servers.
The command supports two modes:
- Default User Mode: Specify os-disk-id and target-virtual-switch-id
- Power User Mode: Specify disk-to-include and nic-to-include
Note: This command uses a preview API version and may experience breaking changes in future releases.
az migrate local replication new --source-appliance-name
--target-appliance-name
--target-resource-group-id --target-rg-id
--target-storage-path-id
--target-vm-name
[--disk-to-include]
[--dynamic-memory --is-dynamic-memory-enabled {false, true}]
[--ids]
[--machine-id]
[--machine-index]
[--network-id --target-virtual-switch-id]
[--nic-to-include]
[--os-disk-id]
[--project-name]
[--resource-group]
[--subscription]
[--subscription-id]
[--target-test-virtual-switch-id --test-network-id]
[--target-vm-cpu-core]
[--target-vm-ram]
Examples
Create replication using machine ARM ID (default user mode)
az migrate local replication new \
--machine-id "XXXX" \
--target-storage-path-id "YYYY" \
--target-resource-group-id "ZZZZ" \
--target-vm-name migratedVM01 \
--source-appliance-name myVMwareAppliance \
--target-appliance-name myAzStackHCIAppliance \
--target-virtual-switch-id "XYXY" \
--os-disk-id "disk-0"
Create replication using machine index (power user mode)
az migrate local replication new \
--machine-index 1 \
--project-name myMigrateProject \
--resource-group myRG \
--target-storage-path-id "XZXZ" \
--target-resource-group-id "YZYZ" \
--target-vm-name migratedVM01 \
--source-appliance-name mySourceAppliance \
--target-appliance-name myTargetAppliance \
--disk-to-include "disk-0" "disk-1" \
--nic-to-include "nic-0"
Create replication with custom CPU and RAM settings
az migrate local replication new \
--machine-id "XXXX" \
--target-storage-path-id "YYYY" \
--target-resource-group-id "ZZZZ" \
--target-vm-name migratedVM01 \
--source-appliance-name mySourceAppliance \
--target-appliance-name myTargetAppliance \
--target-virtual-switch-id "XYXY" \
--os-disk-id "disk-0" \
--target-vm-cpu-core 4 \
--target-vm-ram 8192 \
--is-dynamic-memory-enabled false
Create replication with test virtual switch
az migrate local replication new \
--machine-id "XXXX" \
--target-storage-path-id "YYYY" \
--target-resource-group-id "ZZZZ" \
--target-vm-name migratedVM01 \
--source-appliance-name mySourceAppliance \
--target-appliance-name myTargetAppliance \
--target-virtual-switch-id "XYXY" \
--target-test-virtual-switch-id "XYXY" \
--os-disk-id "disk-0"
Required Parameters
Source appliance name.
Name of the Azure Migrate appliance that discovered the source server.
Target appliance name.
Name of the Azure Local appliance that will host the migrated server.
Specifies the target resource group ARM ID where the migrated VM resources will reside.
Storage path ARM ID where VMs will be stored.
Full ARM resource ID of the storage path on the target Azure Local cluster.
Name of the VM to be created.
The name for the virtual machine that will be created on the target environment.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Disks to include for replication (power user mode).
Space-separated list of disk IDs to replicate from the source server. Use this for power user mode.
Specifies if RAM is dynamic or not.
| Property | Value |
|---|---|
| Accepted values: | false, true |
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
ARM resource ID of the discovered server to migrate.
Full ARM resource ID of the discovered machine. Required if --machine-index is not provided.
Index of the discovered server from the list.
Select a server by its position in the discovered servers list. Required if --machine-id is not provided.
Specifies the logical network ARM ID that the VMs will use.
NICs to include for replication (power user mode).
Space-separated list of NIC IDs to replicate from the source server. Use this for power user mode.
Operating system disk ID.
ID of the operating system disk for the source server. Required for default user mode.
Name of the Azure Migrate project.
Required when using --machine-index to identify which project to query.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of the resource group containing the Azure Migrate project. Required when using --machine-index.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure subscription ID.
The subscription to use. Uses the current subscription if not specified.
Specifies the test logical network ARM ID that the VMs will use.
Number of CPU cores for the target VM.
Specify the number of CPU cores to allocate to the migrated VM.
Target RAM size in MB.
Specify the amount of RAM to allocate to the target VM in megabytes.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az migrate local replication remove
Command group 'migrate local replication' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Stop replication for a migrated server.
Stops the replication for a migrated server and removes the replication configuration. This command disables protection for the specified server.
Note: This command uses a preview API version and may experience breaking changes in future releases.
az migrate local replication remove --id --target-object-id
[--force --force-remove {false, true}]
[--subscription-id]
Examples
Stop replication for a migrated server
az migrate local replication remove \
--target-object-id "XXXX"
Force remove replication for a server
az migrate local replication remove \
--target-object-id "XXXX" \
--force-remove true
Stop replication using short parameter names
az migrate local replication remove \
--id "XXXX" \
--force
Required Parameters
Specifies the replicating server ARM ID for which replication needs to be disabled. The ID should be retrieved using the get command.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Specifies whether the replication needs to be force removed. Default is false.
| Property | Value |
|---|---|
| Default value: | False |
| Accepted values: | false, true |
Azure subscription ID.
The subscription containing the replication resources. Uses the current subscription if not specified.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |