Querying a Migration Task by Task ID
Function
This API is used to query a migration task based on a specified ID.
Request
N/A
Response
Response parameters
For details about the response parameters, see Table 2.
| Parameter | Type | Description |
|---|---|---|
| id | String | Specifies the task ID. |
| name | String | Specifies the task name. |
| type | String | Specifies the task type.
|
| os_type | String |
|
| state | String | Specifies the task status. The value can be any of the following:
|
| connected | Boolean | Specifies the connection status.
|
| create_date | long | Specifies the task creation time. |
| start_date | long | Specifies the task start time. |
| finish_date | long | Specifies the task end time. |
| priority | int | Specifies the migration process priority.
|
| speed_limit | int | Specifies the migration rate limit (in MB). The default value is 0, indicating that the migration rate is not limited. |
| migrate_speed | float | Specifies the migration rate. |
| start_target_server | Boolean | Specifies the status of the target ECS after the migration is complete.
|
| error_json | String | Specifies the task failure cause. |
| total_time | long | Specifies the total task duration (in ms). |
| migration_ip | String | Specifies the target ECS IP address.
|
| region_name | String | Specifies the region name of the target ECS. |
| region_id | String | Specifies the region ID of the target ECS. |
| project_name | String | Specifies the name of the project to which the target ECS belongs. |
| project_id | String | Specifies the ID of the project to which the target ECS belongs. |
| sub_task_list | JSON array | Specifies the list of sub tasks. For details, see Table 3. |
| source_server | JSON | Specifies the source server information. For details, see Table 4. |
| target_server | JSON | Specifies the target ECS information. For details, see Table 5. |
| Parameter | Type | Description |
|---|---|---|
| id | long | Specifies the subtask ID. |
| name | String | Specifies the subtask name.
|
| progress | int | Specifies the sub task progress. |
| start_date | long | Specifies the sub task start time. |
| end_date | long | Specifies the sub task end time. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Specifies the ID of the source server in SMS. |
| ip | String | Specifies the IP address of the source server. |
| name | String | Specifies the name of the source server. You can change the name after adding it. The default value is the same as that of hostname. |
| os_type | String |
|
| os_version | String | Specifies the OS version. For example, the version can be WINDOWS2008_R2_64BIT. |
| oem_system | Boolean | Specifies whether the OS of the source server is an OEM OS. |
| state | String | Specifies the check status of the source server.
|
| Parameter | Type | Description |
|---|---|---|
| id | String | Specifies the ID of the source server in SMS. |
| vm_id | String | Specifies the ID of the target ECS. |
| name | String | Specifies the name of the target ECS. |
| ip | String | Specifies the private IP address of the target ECS server. |
| os_type | String | Specifies the OS type of the target ECS.
|
| os_version | String | Specifies the OS version of the target ECS. |
| system_dir | String | Specifies the system directory. For example, the directory can be C:\\Windows\\System32. |
| disks | JSON array | Specifies the disk information of the target ECS. |
| volume_groups | JSON array | Specifies the volume group information of the target ECS. |
| btrfs_list | JSON array | Specifies the Btrfs information of the target ECS. For details, see Table 6. |
| Parameter | Type | Description |
|---|---|---|
| name | String | Specifies the file system name, for example, /dev/vdb1. |
| label | String | Specifies the file system label. If no label exists, the value is an empty string. |
| uuid | String | Specifies the UUID of the file system. |
| device | String | Specifies the device name in the Btrfs. |
| default_subvolid | String | Specifies the default subvolume ID. |
| default_subvol_name | String | Specifies the default subvolume name. |
| default_subvol_mountpath | String | Specifies the mount path of the default subvolume. |
| subvolumn | JSON array | Specifies the subvolume information. For details, see Table 7. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| uuid | Yes | String | Specifies the parent volume UUID of the subvolume. |
| is_snapshot | Yes | String | Specifies whether the subvolume is snapshot. |
| subvol_id | Yes | String | Specifies the subvolume ID. |
| parent_id | Yes | String | Specifies the parent volume ID of the subvolume. |
| subvol_name | Yes | String | Specifies the subvolume name. |
| subvol_mount_path | Yes | String | Specifies the mount path of the subvolume. |
| Parameter | Type | Description |
|---|---|---|
| id | long | Specifies the ID of the disk in the SMS database. |
| name | String | Specifies the disk name. |
| relation_name | String | Specifies the name of the source disk corresponding to the destination disk. |
| disk_id | String | Specifies the EVS ID of the disk. |
| partition_style | String | Specifies the disk partition type.
|
| size | long | Specifies the disk size. |
| os_disk | String | Specifies whether the disk is the system disk. |
| used_size | String | Specifies the size of the used disk space. |
| physical_volumes | JSON array | Specifies the physical volume information of the disk. For details, see Table 9. |
| Parameter | Type | Description |
|---|---|---|
| id | long | Specifies the ID of the physical partition in the database. |
| uuid | String | Specifies the partition UUID. |
| index | long | Specifies the serial number of the partition. |
| relation_name | String | Specifies the name of the source partition corresponding to the destination partition. |
| name | String | Specifies the partition name, for example, C in the Windows OS and /dev/vda1 in a Linux OS. |
| device_use | String | Specifies the partition user.
|
| file_system | String | Specifies the file system type of the partition. For example, the value can be NTFS. |
| mount_point | String | Specifies the mount point of the partition. |
| size | long | Specifies the total partition size. |
| used_size | long | Specifies the used partition size. |
| free_size | long | Specifies the size of the available partition space. |
Example
- Example request
None
- Example response
{ "id": "65da430b-9538-4296-abd0-86a5aaf13c77", "name": "sms_task_smssource", "type": "MIGRATE_BLOCK", "os_type": "WINDOWS", "state": "READY", "connected": true, "estimate_complete_time": null, "create_date": 1528699579000, "start_date": null, "finish_date": null, "priority": 1, "speed_limit": 0, "migrate_speed": 0.0, "start_target_server": true, "error_json": "", "total_time": 0, "migration_ip": "192.168.1.175", "region_name":"north-china", "region_id":"cn-north-1", "project_name":"cn-north-1", "project_id": "962def8b6e984888b80501c851d534b2", "sub_tasks": [{ "id": 477, "name": "ATTACH_AGENT_IMAGE", "progress": 0, "start_date": null, "end_date": null, "totalTime": 0 }, { "id": 484, "name": "FORMAT_DISK_WINDOWS", "progress": 0, "start_date": null, "end_date": null, "totalTime": 0 }, { "id": 491, "name": "MIGRATE_WINDOWS_BLOCK", "progress": 0, "start_date": null, "end_date": null, "totalTime": 0 }, { "id": 498, "name": "CONFIGURE_WINDOWS", "progress": 0, "start_date": null, "end_date": null, "totalTime": 0 }, { "id": 505, "name": "DETTACH_AGENT_IMAGE", "progress": 0, "start_date": null, "end_date": null, "totalTime": 0 } ], "source_server": { "id": "a013ec5f-00d6-456b-8c1f-085599cb97e9", "ip": "192.168.1.57", "name": "smssource", "os_type": "WINDOWS", "os_version": "WINDOWS2008_R2_64BIT", "oem_system": false, "state": "AVAILABLE" }, "target_server": { "id": "ec5eca22-db21-49b0-ae53-56a74f0318ec", "vm_id": "7c804c50-e9eb-40af-86ec-c78da64f22e2", "name": "smssrc", "ip": null, "os_type": "WINDOWS", "os_version": "WINDOWS2008_R2_64BIT", "system_dir": "Y:\\Windows\\System32", "disks": [{ "id": 736, "name": "Disk 1", "disk_id": "e853bb2d-57e0-42b2-96c0-68794063fb0f", "partition_style": "MBR", "size": 53687091200, "used_size": 42964353024, "os_disk": true, "physical_volumes": [{ "id": 1135, "uuid": "\\?\Volume{f5a31ed9-cde8-11e6-9dd0-806e6f6e6963}\", "index": 1, "name": "Z:", "device_use": "BOOT", "file_system": "NTFS", "mount_point": null, "size": 113246208, "used_size": 25624064, "free_size": 87622144 }, { "id": 1142, "uuid": "\\?\Volume{f5a31eda-cde8-11e6-9dd0-806e6f6e6963}\", "index": 2, "name": "Y:", "device_use": "OS", "file_system": "NTFS", "mount_point": null, "size": 42851106816, "used_size": 26961067520, "free_size": 15890039296 } ] } ], "btrfs_list": [], "volume_groups": [] } }
Status Code
For details about the status code, see Status Code.
Error Code
For details, see Error Code.
Last Article: Querying the List of Migration Tasks
Next Article: Deleting a Migration Task by Task ID
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.