แชร์ผ่าน


az migrate local

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 command. Learn more about extensions.

Command group 'migrate' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage Azure Local/Stack HCI migration operations.

Commands to manage server discovery and replication for migrations to Azure Local and Azure Stack HCI environments. These commands support VMware and Hyper-V source environments.

Commands

Name Description Type Status
az migrate local replication

Manage replication for Azure Local/Stack HCI migrations.

Extension Preview
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 start-migration

Start migration for a replicating server to Azure Local.

Extension Preview

az migrate local start-migration

Preview

Command group 'migrate local' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Start migration for a replicating server to Azure Local.

Initiates the migration (failover) process for a server that has been configured for replication to Azure Local or Azure Stack HCI. This command triggers the final migration step, which creates the virtual machine on the target Azure Local/Stack HCI environment.

The protected item must be in a healthy replication state before migration can be initiated. You can optionally specify whether to turn off the source server after migration completes.

Note: This command uses a preview API version and may experience breaking changes in future releases.

az migrate local start-migration --id --protected-item-id
                                 [--subscription-id]
                                 [--turn-off-source-server {false, true}]

Examples

Start migration for a protected item

az migrate local start-migration \
    --protected-item-id "/subscriptions/xxxx/resourceGroups/myRG/providers/Microsoft.DataReplication/replicationVaults/myVault/protectedItems/myItem"

Start migration and turn off source server

az migrate local start-migration \
    --protected-item-id "/subscriptions/xxxx/resourceGroups/myRG/providers/Microsoft.DataReplication/replicationVaults/myVault/protectedItems/myItem" \
    --turn-off-source-server

Start migration using short parameter names

az migrate local start-migration \
    --id "/subscriptions/xxxx/resourceGroups/myRG/providers/Microsoft.DataReplication/replicationVaults/myVault/protectedItems/myItem" \
    --turn-off-source-server

Start migration with specific subscription

az migrate local start-migration \
    --protected-item-id "/subscriptions/xxxx/resourceGroups/myRG/providers/Microsoft.DataReplication/replicationVaults/myVault/protectedItems/myItem" \
    --subscription-id "12345678-1234-1234-1234-123456789012"

Required Parameters

--id --protected-item-id

The full ARM resource ID of the protected item to migrate. This can be obtained from the list or get replication commands.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--subscription-id

Azure subscription ID.

The subscription containing the migration resources. Uses the current subscription if not specified.

--turn-off-source-server

Turn off the source server after migration.

Specifies whether the source server should be powered off after the migration completes successfully. Default is False. Use this option to automatically shut down the source server to prevent conflicts.

Property Value
Default value: False
Accepted values: false, true
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False