แชร์ผ่าน


az migrate

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

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage Azure Migrate resources and operations.

Commands to manage Azure Migrate projects, discover servers, and perform migrations to Azure and Azure Local/Stack HCI environments.

Commands

Name Description Type Status
az migrate get-discovered-server

Retrieve discovered servers from an Azure Migrate project.

Extension Preview
az migrate local

Manage Azure Local/Stack HCI migration operations.

Extension Preview
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 get-discovered-server

Preview

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

Retrieve discovered servers from an Azure Migrate project.

Get information about servers discovered by Azure Migrate appliances. You can list all discovered servers in a project, filter by display name or machine type, or get a specific server by name. This command supports both VMware and Hyper-V environments.

az migrate get-discovered-server --resource-group
                                 [--appliance-name]
                                 [--display-name]
                                 [--ids]
                                 [--name]
                                 [--project-name]
                                 [--source-machine-type {HyperV, VMware}]
                                 [--subscription]
                                 [--subscription-id]

Examples

List all discovered servers in a project

az migrate get-discovered-server \
    --project-name myMigrateProject \
    --resource-group myRG

Get a specific discovered server by name

az migrate get-discovered-server \
    --project-name myMigrateProject \
    --resource-group myRG \
    --name machine-12345

Filter discovered servers by display name

az migrate get-discovered-server \
    --project-name myMigrateProject \
    --resource-group myRG \
    --display-name "web-server"

List VMware servers discovered by a specific appliance

az migrate get-discovered-server \
    --project-name myMigrateProject \
    --resource-group myRG \
    --appliance-name myVMwareAppliance \
    --source-machine-type VMware

Get a specific server from a specific appliance

az migrate get-discovered-server \
    --project-name myMigrateProject \
    --resource-group myRG \
    --appliance-name myAppliance \
    --name machine-12345 \
    --source-machine-type HyperV

Required Parameters

--resource-group -g

Name of the resource group containing the Azure Migrate project.

Optional Parameters

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

--appliance-name

Name of the appliance (site) containing the machines.

Filter servers discovered by a specific Azure Migrate appliance.

--display-name

Display name of the source machine to filter by.

Filter discovered servers by their display name (partial match supported).

--ids

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
--name

Internal name of the specific source machine.

The internal machine name assigned by Azure Migrate (different from display name).

--project-name

Name of the Azure Migrate project.

The Azure Migrate project that contains the discovered servers.

Property Value
Parameter group: Resource Id Arguments
--source-machine-type

Type of the source machine.

Filter by source machine type. Valid values are 'VMware' or 'HyperV'.

Property Value
Accepted values: HyperV, VMware
--subscription

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
--subscription-id

Azure subscription ID.

The subscription containing the Azure Migrate project. Uses the default subscription if not specified.

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.

--verbose

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

Property Value
Default value: False