Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Listing Migration Tasks

Updated on 2025-02-13 GMT+08:00

Function

After the target server is configured for a source server, SMS automatically creates a migration task. This API is used to list all your migration tasks.

Calling Method

For details, see Calling APIs.

URI

GET /v3/tasks

Table 1 Query parameters

Parameter

Mandatory

Type

Description

state

No

String

The migration task status.

READY: The migration task is ready for execution.

RUNNING: The migration task is being executed.

SYNCING: The incremental data is being synchronized.

MIGRATE_SUCCESS: The migration succeeds.

MIGRATE_FAIL: The migration fails.

ABORTING: The migration task is being stopped.

ABORT: The migration task is stopped.

DELETING: The migration task is being deleted.

SYNC_F_ROLLBACKING: The synchronization fails and the task is being rolled back.

SYNC_F_ROLLBACK_SUCCESS: The synchronization fails and the rollback is successful.

The value can be:

  • READY

  • RUNNING

  • SYNCING

  • MIGRATE_SUCCESS

  • MIGRATE_FAIL

  • ABORTING

  • ABORT

  • DELETING

  • SYNC_F_ROLLBACKING

  • SYNC_F_ROLLBACK_SUCCESS

name

No

String

The task name.

Minimum length: 0 characters

Maximum length: 255 characters

id

No

String

The task ID.

Minimum length: 0 characters

Maximum length: 255 characters

source_server_id

No

String

The source server ID.

Minimum length: 0 characters

Maximum length: 255 characters

limit

No

Integer

The number of tasks recorded on each page.

Minimum value: 0

Maximum value: 200

Default value: 100

offset

No

Integer

The offset.

Minimum value: 0

Maximum value: 65535

Default value: 0

enterprise_project_id

No

String

The ID of the enterprise project to be queried.

Minimum length: 0 characters

Maximum length: 255 characters

Request

Table 2 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

The user token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Minimum length: 1 character

Maximum length: 16,384 characters

Response

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

count

Integer

The number of tasks that meet the search criteria, which is not affected by pagination.

Minimum value: 0

Maximum value: 2147483647

tasks

Array of TasksResponseBody objects

The information about the queried tasks.

Array length: 0 to 65,535

Table 4 TasksResponseBody field description

Parameter

Type

Description

id

String

The migration task ID.

Minimum length: 0 characters

Maximum length: 255 characters

name

String

The task name, which is defined by the user.

Minimum length: 0 characters

Maximum length: 255 characters

type

String

The task type. This parameter is mandatory for creating a task and optional for updating a task.

MIGRATE_FILE: file-level migration

MIGRATE_BLOCK: block-level migration

Minimum length: 0 characters

Maximum length: 255 characters

The value can be:

  • MIGRATE_FILE

  • MIGRATE_BLOCK

os_type

String

The OS type. This parameter is mandatory for creating a task and optional for updating a task.

Minimum length: 0 characters

Maximum length: 255 characters

The value can be:

  • WINDOWS

  • LINUX

state

String

The task status.

Minimum length: 0 characters

Maximum length: 255 characters

estimate_complete_time

Long

The estimated completion time.

Minimum value: 0

Maximum value: 9223372036854775807

create_date

Long

The task creation time.

Minimum value: 0

Maximum value: 9223372036854775807

priority

Integer

The migration process priority.

0: low

1: standard

2: high

Minimum value: 0

Maximum value: 2

The value can be:

  • 0

  • 1

  • 2

speed_limit

Integer

The migration rate limit.

Minimum value: 0

Maximum value: 65535

migrate_speed

Double

The migration rate, in MB/s.

Minimum value: 0

Maximum value: 10000

compress_rate

Double

The compression rate.

Minimum value: 0

Maximum value: 10000

start_target_server

Boolean

Indicates whether the target server is started after the migration is complete.

true: The target server is started after the migration is complete.

false: The target server is stopped after the migration is complete.

Default value: false

error_json

String

The error message.

Minimum length: 0 characters

Maximum length: 1,024 characters

total_time

Long

The task duration.

Minimum value: 0

Maximum value: 9223372036854775807

migration_ip

String

The IP address of the target server.

If you use a public network for migration, enter the EIP bound to the target server.

If you use a private line for migration, enter the private IP address of the target server.

Minimum length: 0 characters

Maximum length: 255 characters

sub_tasks

Array of SubTaskAssociatedWithTask objects

The information about subtasks associated with the migration task

Array length: 0 to 65,535

source_server

SourceServerAssociatedWithTask object

The information about the source server associated with the migration task.

enterprise_project_id

String

The migration project ID.

Minimum length: 0 characters

Maximum length: 255 characters

target_server

TargetServerAssociatedWithTask object

The information about the target server in the migration task.

log_collect_status

String

The log collection status.

INIT

TELL_AGENT_TO_COLLECT

WAIT_AGENT_COLLECT_ACK

AGENT_COLLECT_FAIL

AGENT_COLLECT_SUCCESS

WAIT_SERVER_COLLECT

SERVER_COLLECT_FAIL

SERVER_COLLECT_SUCCESS

TELL_AGENT_RESET_ACL

WAIT_AGENT_RESET_ACL_ACK

The value can be:

  • INIT

  • TELL_AGENT_TO_COLLECT

  • WAIT_AGENT_COLLECT_ACK

  • AGENT_COLLECT_FAIL

  • AGENT_COLLECT_SUCCESS

  • WAIT_SERVER_COLLECT

  • SERVER_COLLECT_FAIL

  • SERVER_COLLECT_SUCCESS

  • TELL_AGENT_RESET_ACL

  • WAIT_AGENT_RESET_ACL_ACK

clone_server

CloneServerBrief object

The information about the cloned server.

syncing

Boolean

Whether to enable synchronization.

network_check_info

NetworkCheckInfoRequestBody object

The network performance metrics and measurement results.

special_config

Array of ConfigBody objects

The configuration information of advanced migration options.

Array length: 0 to 1,000 elements

total_cpu_usage

Double

The CPU usage of the server, in percentage.

Minimum value: 0

Maximum value: 100

agent_cpu_usage

Double

The CPU usage of the Agent, in percentage.

Minimum value: 0

Maximum value: 100

total_mem_usage

Double

The memory usage of the server, in MB.

Minimum value: 0

Maximum value: 1048576.0

agent_mem_usage

Double

The memory usage of the Agent, in MB.

Minimum value: 0

Maximum value: 1048576.0

total_disk_io

Double

The disk I/O of the server, in MB/s.

Minimum value: 0

Maximum value: 10000.0

agent_disk_io

Double

The disk I/O of the Agent, in MB/s.

Minimum value: 0

Maximum value: 10000.0

Table 5 SubTaskAssociatedWithTask field description

Parameter

Type

Description

id

Long

The subtask ID.

Minimum value: 0

Maximum value: 9223372036854775807

name

String

The subtask name.

Minimum length: 0 characters

Maximum length: 255 characters

progress

Integer

The progress of the subtask. The value is an integer ranging from 0 to 100.

Minimum value: 0

Maximum value: 100

start_date

Long

The start time of the subtask.

Minimum value: 0

Maximum value: 9223372036854775807

end_date

Long

The end time of the subtask. If the subtask is not complete, this parameter is left blank.

Minimum value: 0

Maximum value: 9223372036854775807

process_trace

String

The detailed progress of the migration or synchronization.

Minimum length: 0 characters

Maximum length: 2,048 characters

Table 6 SourceServerAssociatedWithTask field description

Parameter

Type

Description

id

String

The ID of the source server in the SMS database.

Minimum length: 0 characters

Maximum length: 255 characters

ip

String

The IP address of the source server. This parameter is mandatory for registering the source server with SMS and optional for updating the information about the source server.

Minimum length: 0 characters

Maximum length: 255 characters

name

String

The name of the source server displayed on the SMS console.

Minimum length: 0 characters

Maximum length: 255 characters

os_type

String

The OS type of the source server. This parameter is mandatory for registering the source server with SMS and optional for updating the information about the source server.

Minimum length: 0 characters

Maximum length: 255 characters

The value can be:

  • WINDOWS

  • LINUX

os_version

String

The OS version. This parameter is mandatory for registration and optional for update.

Minimum length: 0 characters

Maximum length: 255 characters

oem_system

Boolean

Indicates whether the OS is an OEM OS (Windows).

state

String

The source server status.

unavailable: The source server fails the environment check.

waiting: The source server is waiting for migration.

initialize: The migration of the source server is being initialized.

replicate: The source server is being replicated.

syncing: The source server is being synchronized.

stopping: The migration of the source server is being stopped.

stopped: The migration of the source server is stopped.

deleting: The source server record is being deleted.

error: An error occurs during the migration of the source server.

cloning: The target server for the source server is being cloned.

testing: The test is in progress.

finished: The target server for the source server is launched.

The value can be:

  • unavailable

  • waiting

  • initialize

  • replicate

  • syncing

  • stopping

  • stopped

  • deleting

  • error

  • cloning

  • testing

  • finished

Table 7 TargetServerAssociatedWithTask field description

Parameter

Type

Description

id

String

The ID of the target server in the SMS database.

Minimum length: 0 characters

Maximum length: 255 characters

vm_id

String

The ID of the target server.

Minimum length: 0 characters

Maximum length: 255 characters

name

String

The name of the target server.

Minimum length: 0 characters

Maximum length: 255 characters

ip

String

The IP address of the target server.

Minimum length: 0 characters

Maximum length: 255 characters

os_type

String

The OS type of the target server.

WINDOWS: a Windows OS

LINUX: a Linux OS

Minimum length: 0 characters

Maximum length: 255 characters

The value can be:

  • WINDOWS

  • LINUX

os_version

String

The OS version.

Minimum length: 0 characters

Maximum length: 255 characters

Table 8 CloneServerBrief field description

Parameter

Type

Description

vm_id

String

The cloned server ID.

Minimum length: 0 characters

Maximum length: 255 characters

name

String

The name of the cloned server.

Minimum length: 0 characters

Maximum length: 255 characters

Table 9 NetworkCheckInfoRequestBody field description

Parameter

Type

Description

domain_connectivity

Boolean

The connectivity to domain names.

destination_connectivity

Boolean

The connectivity to the target server.

network_delay

Double

The network latency.

Minimum value: 0

Maximum value: 10000.0

network_jitter

Double

The network jitter.

Minimum value: 0

Maximum value: 10000

migration_speed

Double

The bandwidth.

Minimum value: 0

Maximum value: 10000

loss_percentage

Double

The packet loss rate.

Minimum value: 0

Maximum value: 100

cpu_usage

Double

The CPU usage.

Minimum value: 0

Maximum value: 100

mem_usage

Double

The memory usage.

Minimum value: 0

Maximum value: 100

evaluation_result

String

The network evaluation result.

Minimum length: 6 characters

Maximum length: 8 characters

Table 10 ConfigBody field description

Parameter

Type

Description

config_key

String

The advanced migration option. The value can be EXCLUDE_MIGRATE_PATH, SYNC_EXCLUDE_PATH, or ONLY_SYNC_PATH.

Minimum length: 0 characters

Maximum length: 255 characters

config_value

String

The value specified for the advanced migration option. It is stored in the database and parsed on the Agent.

Minimum length: 0 characters

Maximum length: 1,024 characters

config_status

String

The reserved field that describes the configuration status.

Minimum length: 0 characters

Maximum length: 255 characters

Status code: 403

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

The error code.

Minimum length: 0 characters

Maximum length: 255 characters

error_msg

String

The error message.

Minimum length: 0 characters

Maximum length: 255 characters

encoded_authorization_message

String

Encrypted authorization information.

Minimum length: 0 characters

Maximum length: 65,535 characters

error_param

Array of strings

Invalid parameter.

Minimum length: 0 characters

Maximum length: 65,535 characters

Array length: 1 to 20

details

Array of details objects

The error message.

Array length: 1 to 20

Table 12 details field description

Parameter

Type

Description

error_code

String

The SMS error code.

Minimum length: 0 characters

Maximum length: 65,535 characters

error_msg

String

The SMS error message.

Minimum length: 0 characters

Maximum length: 65,535 characters

Example Request

This example lists all migration tasks.

GET https://{endpoint}/v3/tasks

Example Response

Status code: 200

The list of migration tasks was obtained.

{
  "count" : 3,
  "tasks" : [ {
    "id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
    "name" : "sms_task_lxxxx11",
    "type" : "MIGRATE_FILE",
    "os_type" : "LINUX",
    "state" : "MIGRATE_SUCCESS",
    "estimate_complete_time" : null,
    "create_date" : 1585139506000,
    "priority" : 1,
    "speed_limit" : 0,
    "migrate_speed" : 0.0,
    "start_target_server" : true,
    "error_json" : "",
    "total_time" : 3878000,
    "migration_ip" : "",
    "source_server" : {
      "id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
      "ip" : "192.168.*.107",
      "name" : "xxx-linux-1",
      "os_type" : "LINUX",
      "os_version" : "CENTOS_7_6_64BIT",
      "oem_system" : false,
      "state" : "AVAILABLE"
    },
    "target_server" : {
      "id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
      "vm_id" : "",
      "name" : "",
      "ip" : null,
      "os_type" : "LINUX",
      "os_version" : null
    },
    "log_collect_status" : "INIT"
  }, {
    "id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
    "name" : "sms_task_xxx22",
    "type" : "MIGRATE_BLOCK",
    "os_type" : "WINDOWS",
    "state" : "MIGRATE_SUCCESS",
    "estimate_complete_time" : null,
    "create_date" : 1585138569000,
    "priority" : 1,
    "speed_limit" : 0,
    "migrate_speed" : 0.0,
    "start_target_server" : true,
    "error_json" : "",
    "total_time" : 10824000,
    "migration_ip" : "",
    "source_server" : {
      "id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
      "ip" : "192.168.*.245",
      "name" : "xxx-windows-2",
      "os_type" : "WINDOWS",
      "os_version" : "WINDOWS2012_R2_64BIT",
      "oem_system" : false,
      "state" : "AVAILABLE"
    },
    "target_server" : {
      "id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
      "vm_id" : "",
      "name" : "",
      "ip" : null,
      "os_type" : "WINDOWS",
      "os_version" : "WINDOWS2012_R2_64BIT"
    },
    "log_collect_status" : "INIT"
  }, {
    "id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
    "name" : "sms_task_leddesktop",
    "type" : "MIGRATE_BLOCK",
    "os_type" : "WINDOWS",
    "state" : "MIGRATE_SUCCESS",
    "estimate_complete_time" : null,
    "create_date" : 1566130392000,
    "priority" : 1,
    "speed_limit" : 200,
    "migrate_speed" : 0.0,
    "start_target_server" : true,
    "error_json" : "",
    "total_time" : 882000,
    "migration_ip" : "192.168.1.201",
    "source_server" : null,
    "target_server" : {
      "id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
      "vm_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
      "name" : "xxx-sms-target",
      "ip" : null,
      "os_type" : "WINDOWS",
      "os_version" : "WINDOWS2008_R2_64BIT"
    },
    "log_collect_status" : "INIT"
  } ]
}

Status code: 403

Authentication failed.

{
  "error_code" : "SMS.9004",
  "error_msg" : "The current account does not have the permission to execute policy You do not have permission to perform action XXX on resource XXX.",
  "encoded_authorization_message" : "XXXXXX",
  "error_param" : [ "You do not have permission to perform action XXX on resource XXX." ],
  "details" : [ {
    "error_code" : "SMS.9004",
    "error_msg" : "You do not have permission to perform action XXX on resource XXX."
  } ]
}

Status Codes

Status Code

Description

200

The list of migration tasks was obtained.

403

Authentication failed.

Error Codes

For details, see Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback