Querying Details About a Source Server
Function
After the migration Agent reports the source server information to SMS, SMS checks the migration feasibility. This API returns the basic information and check results of the source server.
Calling Method
For details, see Calling APIs.
URI
GET /v3/sources/{source_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
source_id |
Yes |
String |
The ID of the source server in SMS. Minimum length: 0 characters Maximum length: 255 characters |
Request
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
Parameter |
Type |
Description |
---|---|---|
id |
String |
The source server ID. Minimum length: 0 characters Maximum length: 255 characters |
ip |
String |
The IP address of the source server. Minimum length: 0 characters Maximum length: 255 characters |
name |
String |
The source server name in SMS. Minimum length: 0 characters Maximum length: 255 characters |
hostname |
String |
The hostname 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 |
enterprise_project_id |
String |
The enterprise project ID. Minimum length: 1 character Maximum length: 255 characters |
add_date |
Long |
The time when the source is registered. Minimum value: 0 Maximum value: 9223372036854775807 |
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 |
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 version (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: |
connected |
Boolean |
Indicate whether the Agent installed on the source server is connected to SMS. |
firmware |
String |
The boot mode. The value can be: |
init_target_server |
InitTargetServer object |
The recommended configuration for the target server. |
cpu_quantity |
Integer |
The number of CPUs on the source server. Minimum value: 0 Maximum value: 65535 |
memory |
Long |
The physical memory size (MB) of the source server. Minimum value: 0 Maximum value: 9223372036854775807 |
current_task |
TaskByServerSource object |
The migration task associated with the source server. |
disks |
Array of ServerDisk objects |
The disk information of the source server. Array length: 0 to 65,535 |
volume_groups |
Array of VolumeGroups objects |
The volume group information of the source server. If there are no volume groups, the value is an empty array []. Array length: 0 to 65,535 |
btrfs_list |
Array of BtrfsFileSystem objects |
The Btrfs information on the source server. This parameter is mandatory for Linux. If there are no Btrfs file systems on the source server, the value is an empty array []. Array length: 0 to 65,535 |
networks |
Array of NetWork objects |
The NIC information of the source server. Array length: 0 to 65,535 |
checks |
Array of EnvironmentCheck objects |
The environment check information for the source server. Array length: 0 to 65,535 |
migration_cycle |
String |
The current migration stage of the source server. cutovering: The target server for the source server is being launched. cutovered: The target server for the source server is launched. checking: The check is in progress. setting: The configuration is in progress. replicating: The data is being replicated. syncing: The incremental data is being synchronized. Minimum length: 0 characters Maximum length: 255 characters The value can be: |
state_action_time |
Long |
The time (in timestamp) when the status of the source server last changed. Minimum value: 0 Maximum value: 9223372036854775807 |
replicatesize |
Long |
The volume of data that has been migrated, in bytes. Minimum value: 0 Maximum value: 9223372036854775807 |
totalsize |
Long |
The volume of data to be migrated, in bytes. Minimum value: 0 Maximum value: 9223372036854775807 |
last_visit_time |
Long |
The time (in timestamp) when the Agent connection status last changed. Minimum value: 0 Maximum value: 9223372036854775807 |
stage_action_time |
Long |
The time (in timestamp) when the migration stage of the source server last changed. The migration stage is defined by migration_cycle. Minimum value: 0 Maximum value: 9223372036854775807 |
agent_version |
String |
The Agent version. Minimum length: 0 characters Maximum length: 255 characters |
has_tc |
Boolean |
Indicates whether TC is installed. This parameter is mandatory for Linux. |
Parameter |
Type |
Description |
---|---|---|
disks |
Array of DiskIntargetServer objects |
The information about the recommended target server disks. Array length: 0 to 65,535 |
volume_groups |
Array of VolumeGroups objects |
This parameter is mandatory for Linux. If there are no volume groups, the value is an empty array []. Array length: 0 to 65,535 |
Parameter |
Type |
Description |
---|---|---|
name |
String |
The disk name. Minimum length: 0 characters Maximum length: 255 characters |
size |
Long |
The disk size, in bytes. Minimum value: 0 Maximum value: 9223372036854775807 |
device_use |
String |
The disk function. BOOT: boot device OS: system device NORMAL: general device Minimum length: 0 characters Maximum length: 255 characters The value can be: |
used_size |
Long |
The used disk space, in bytes. Minimum value: 0 Maximum value: 9223372036854775807 |
physical_volumes |
Array of PhysicalVolumes objects |
The physical volume information. Array length: 0 to 65,535 |
Parameter |
Type |
Description |
---|---|---|
device_use |
String |
The partition function. The partition can be a general, boot or OS partition. Minimum length: 0 characters Maximum length: 255 characters |
file_system |
String |
The file system type. Minimum length: 0 characters Maximum length: 255 characters |
index |
Integer |
The serial number. Minimum value: 0 Maximum value: 2147483647 |
mount_point |
String |
The mount point. Minimum length: 0 characters Maximum length: 255 characters |
name |
String |
The volume name. In Windows, it indicates the drive letter, and in Linux, it indicates the device ID. Minimum length: 0 characters Maximum length: 255 characters |
size |
Long |
The size. Minimum value: 0 Maximum value: 9223372036854775807 |
inode_size |
Long |
The number of inodes. Minimum value: 0 Maximum value: 9223372036854775807 |
used_size |
Long |
The used space. Minimum value: 0 Maximum value: 9223372036854775807 |
uuid |
String |
The GUID, which can be obtained from the source server. Minimum length: 0 characters Maximum length: 255 characters |
Parameter |
Type |
Description |
---|---|---|
id |
String |
The task ID. Minimum length: 0 characters Maximum length: 255 characters |
name |
String |
The task name. Minimum length: 0 characters Maximum length: 255 characters |
type |
String |
The task type. Minimum length: 0 characters Maximum length: 255 characters |
state |
String |
The task status. Minimum length: 0 characters Maximum length: 255 characters |
start_date |
Long |
The start time. Minimum value: 0 Maximum value: 9223372036854775807 |
speed_limit |
Integer |
The migration rate limit. Minimum value: 0 Maximum value: 10000 |
migrate_speed |
Double |
The migration rate. Minimum value: 0 Maximum value: 10000 |
start_target_server |
Boolean |
Indicates whether the target server is started. |
vm_template_id |
String |
The server template ID. Minimum length: 0 characters Maximum length: 255 characters |
region_id |
String |
region_id Minimum length: 0 characters Maximum length: 255 characters |
project_name |
String |
The project name. Minimum length: 0 characters Maximum length: 255 characters |
project_id |
String |
The project ID. Minimum length: 0 characters Maximum length: 255 characters |
target_server |
TargetServerById object |
The information about the target server. |
log_collect_status |
String |
The log collection status. Minimum length: 0 characters Maximum length: 255 characters |
exist_server |
Boolean |
Indicates whether an existing ECS is used as the target server. |
use_public_ip |
Boolean |
Indicates whether a public IP address is used for migration. |
clone_server |
CloneServer object |
The information about the cloned server. |
Parameter |
Type |
Description |
---|---|---|
vm_id |
String |
The target server ID. Minimum length: 0 characters Maximum length: 255 characters |
name |
String |
The name of the target server. Minimum length: 0 characters Maximum length: 255 characters |
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 |
clone_error |
String |
The error returned for a clone failure. Minimum length: 0 characters Maximum length: 255 characters |
clone_state |
String |
The clone status. Minimum length: 0 characters Maximum length: 255 characters |
error_msg |
String |
The error returned for a clone failure. Minimum length: 0 characters Maximum length: 1,024 characters |
Parameter |
Type |
Description |
---|---|---|
name |
String |
The disk name. Minimum length: 0 characters Maximum length: 255 characters |
partition_style |
String |
The disk partition type. This parameter is mandatory for source server registration. MBR: Master Boot Record (MBR) GPT: GUID Partition Table (GPT) The value can be: |
device_use |
String |
The disk function. BOOT: boot device OS: system device The value can be: |
size |
Long |
The disk size, in bytes. Minimum value: 0 Maximum value: 9223372036854775807 |
used_size |
Long |
The used disk space, in bytes. Minimum value: 0 Maximum value: 9223372036854775807 |
physical_volumes |
Array of PhysicalVolume objects |
The physical partition information of the disk. Array length: 0 to 65,535 |
os_disk |
Boolean |
Indicates whether the disk is the system disk. |
relation_name |
String |
The name of the corresponding disk on the target server running Linux. Minimum length: 0 characters Maximum length: 255 characters |
inode_size |
Integer |
The number of inodes. Minimum value: 0 Maximum value: 2147483647 |
Parameter |
Type |
Description |
---|---|---|
device_use |
String |
The partition function. The partition can be a general, boot or OS partition. Minimum length: 0 characters Maximum length: 255 characters |
file_system |
String |
The file system type. Minimum length: 0 characters Maximum length: 255 characters |
index |
Integer |
The serial number. Minimum value: 0 Maximum value: 2147483647 |
mount_point |
String |
The mount point. Minimum length: 0 characters Maximum length: 255 characters |
name |
String |
The volume name. In Windows, it indicates the drive letter, and in Linux, it indicates the device ID. Minimum length: 0 characters Maximum length: 255 characters |
size |
Long |
The size. Minimum value: 0 Maximum value: 9223372036854775807 |
used_size |
Long |
The used space. Minimum value: 0 Maximum value: 9223372036854775807 |
inode_size |
Integer |
The number of inodes. Minimum value: 0 Maximum value: 2147483647 |
inode_nums |
Long |
The number of inodes. Minimum value: 0 Maximum value: 9223372036854775807 |
uuid |
String |
The GUID, which can be obtained from the source server. Minimum length: 0 characters Maximum length: 255 characters |
size_per_cluster |
Integer |
The size of each cluster. Minimum value: 0 Maximum value: 2147483647 |
Parameter |
Type |
Description |
---|---|---|
components |
String |
The physical volume information. Minimum length: 0 characters Maximum length: 255 characters |
free_size |
Long |
The available space. Minimum value: 0 Maximum value: 9223372036854775807 |
logical_volumes |
Array of LogicalVolumes objects |
The logical volume information. Array length: 0 to 255 |
name |
String |
The name. Minimum length: 0 characters Maximum length: 255 characters |
size |
Long |
The size. Minimum value: 0 Maximum value: 9223372036854775807 |
Parameter |
Type |
Description |
---|---|---|
block_count |
Integer |
The number of blocks. Minimum value: 0 Maximum value: 2147483647 Default value: 0 |
block_size |
Long |
The block size. Minimum value: 0 Maximum value: 1048576 Default value: 0 |
file_system |
String |
The file system. Minimum length: 0 characters Maximum length: 255 characters |
inode_size |
Integer |
The number of inodes. Minimum value: 0 Maximum value: 2147483647 |
inode_nums |
Long |
The number of inodes. Minimum value: 0 Maximum value: 9223372036854775807 |
device_use |
String |
The partition function. The partition can be a general, boot or OS partition. Minimum length: 0 characters Maximum length: 255 characters |
mount_point |
String |
The mount point. Minimum length: 0 characters Maximum length: 256 characters |
name |
String |
The name. Minimum length: 0 characters Maximum length: 1,024 characters |
size |
Long |
The size. Minimum value: 0 Maximum value: 9223372036854775807 |
used_size |
Long |
The used space. Minimum value: 0 Maximum value: 9223372036854775807 |
free_size |
Long |
The available space. Minimum value: 0 Maximum value: 9223372036854775807 |
Parameter |
Type |
Description |
---|---|---|
name |
String |
The file system name. Minimum length: 0 characters Maximum length: 255 characters |
label |
String |
The file system tag. If no tag exists, the value is an empty string. Minimum length: 0 characters Maximum length: 255 characters |
uuid |
String |
The UUID of the file system. Minimum length: 0 characters Maximum length: 255 characters |
device |
String |
The device name in the Btrfs. Minimum length: 0 characters Maximum length: 255 characters |
size |
Long |
The space occupied by the file system. Minimum value: 0 Maximum value: 9223372036854775807 |
nodesize |
Long |
The size of the Btrfs node. Minimum value: 0 Maximum value: 9223372036854775807 |
sectorsize |
Integer |
The sector size. Minimum value: 0 Maximum value: 2147483647 |
data_profile |
String |
The data profile (RAD). Minimum length: 0 characters Maximum length: 255 characters |
system_profile |
String |
The file system profile (RAD). Minimum length: 0 characters Maximum length: 255 characters |
metadata_profile |
String |
The metadata profile (RAD). Minimum length: 0 characters Maximum length: 255 characters |
global_reserve1 |
String |
The Btrfs file system information. Minimum length: 0 characters Maximum length: 255 characters |
g_vol_used_size |
Long |
The used space of the Btrfs volume. Minimum value: 0 Maximum value: 9223372036854775807 |
default_subvolid |
String |
The ID of the default subvolume. Minimum length: 0 characters Maximum length: 255 characters |
default_subvol_name |
String |
The name of the default subvolume. Minimum length: 0 characters Maximum length: 255 characters |
default_subvol_mountpath |
String |
The mount path of the default subvolume or Btrfs file system. Minimum length: 0 characters Maximum length: 255 characters |
subvolume |
Array of BtrfsSubvolumn objects |
The subvolume information. Array length: 0 to 65,535 |
Parameter |
Type |
Description |
---|---|---|
uuid |
String |
The UUID of the parent volume. Minimum length: 0 characters Maximum length: 255 characters |
is_snapshot |
String |
Indicates whether the subvolume is a snapshot. Minimum length: 0 characters Maximum length: 255 characters |
subvol_id |
String |
The subvolume ID. Minimum length: 0 characters Maximum length: 255 characters |
parent_id |
String |
The parent volume ID. Minimum length: 0 characters Maximum length: 255 characters |
subvol_name |
String |
The subvolume name. Minimum length: 0 characters Maximum length: 255 characters |
subvol_mount_path |
String |
The mount path of the subvolume. Minimum length: 0 characters Maximum length: 255 characters |
Parameter |
Type |
Description |
---|---|---|
name |
String |
The NIC name. Minimum length: 0 characters Maximum length: 255 characters |
ip |
String |
The IP address bound to the NIC. Minimum length: 0 characters Maximum length: 255 characters |
ipv6 |
String |
The IPv6 address. Minimum length: 0 characters Maximum length: 255 characters |
netmask |
String |
The subnet mask. Minimum length: 0 characters Maximum length: 255 characters |
gateway |
String |
The gateway. Minimum length: 0 characters Maximum length: 255 characters |
mtu |
Integer |
The NIC MTU. This parameter is mandatory for Linux. Minimum value: 0 Maximum value: 2147483647 |
mac |
String |
The MAC address. Minimum length: 0 characters Maximum length: 255 characters |
id |
String |
The database ID. Minimum length: 0 characters Maximum length: 255 characters |
Parameter |
Type |
Description |
---|---|---|
id |
Long |
The check item ID. Minimum value: 0 Maximum value: 9223372036854775807 |
params |
Array of strings |
The parameters. Minimum length: 0 characters Maximum length: 255 characters Array length: 0 to 65,535 |
name |
String |
The check item name. Minimum length: 0 characters Maximum length: 255 characters |
result |
String |
The check result. OK: The check is passed. WARN: A warning is generated. ERROR: The check fails. Minimum length: 0 characters Maximum length: 255 characters The value can be: |
error_code |
String |
The returned error code. Minimum length: 0 characters Maximum length: 255 characters |
error_or_warn |
String |
The error or warning. Minimum length: 0 characters Maximum length: 255 characters |
error_params |
String |
The parameters that failed the check. Minimum length: 0 characters Maximum length: 255 characters |
Status code: 403
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 |
Example Request
This example queries the information about the source server with ID 211d7878-d7ba-4cac-acf1-a02ccfb8xxxx.
GET https://{endpoint}/v3/sources/211d7878-d7ba-4cac-acf1-a02ccfb8xxxx
Example Response
Status code: 200
The details about a source server were obtained.
{ "id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001", "ip" : "192.168.0.154", "name" : "sms-win16", "hostname" : "sms-win16", "add_date" : 1598435769000, "os_type" : "WINDOWS", "os_version" : "WINDOWS2016_64BIT", "oem_system" : false, "state" : "initialize", "connected" : true, "firmware" : "BIOS", "cpu_quantity" : 1, "memory" : 2146553856, "current_task" : { "id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001", "name" : "MigrationTask", "type" : "MIGRATE_BLOCK", "state" : "RUNNING", "speed_limit" : 0, "start_target_server" : true, "vm_template_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001", "region_id" : "region_id", "project_name" : "project_name", "project_id" : "xxxxxxxxxxxxxxxxxxxxxxxx00000001", "target_server" : { "vm_id" : "", "name" : "" }, "log_collect_status" : "INIT", "exist_server" : false, "use_public_ip" : true, "clone_server" : null }, "disks" : [ { "name" : "Disk 0", "relation_name" : null, "partition_style" : "MBR", "size" : 42949672960, "used_size" : 42947575808, "device_use" : "BOOT", "os_disk" : false, "physical_volumes" : [ { "uuid" : "\\\\?\\Volume{586b7157-0000-0000-0000-100000000000}\\", "index" : 1, "name" : "(Reserved)", "device_use" : "BOOT", "file_system" : "NTFS", "mount_point" : null, "size" : 524288000, "used_size" : 410275840 }, { "uuid" : "\\\\?\\Volume{586b7157-0000-0000-0000-501f00000000}\\", "index" : 2, "name" : "C:\\", "device_use" : "OS", "file_system" : "NTFS", "mount_point" : null, "size" : 42423287808, "used_size" : 23170301952 } ] } ], "volume_groups" : [ ], "networks" : [ { "name" : null, "ip" : null, "netmask" : null, "gateway" : null, "mtu" : 0, "mac" : "dac20cd4f6318ca6458673b0046ddcc89e936df292d0806cb868ba63a817853c" } ], "checks" : [ { "id" : 524146, "params" : [ "" ], "name" : "OS_VERSION", "result" : "OK", "error_code" : null, "error_or_warn" : null, "error_params" : "" }, { "id" : 524147, "params" : [ "" ], "name" : "FIRMWARE", "result" : "OK", "error_code" : null, "error_or_warn" : null, "error_params" : "" }, { "id" : 524148, "params" : [ "" ], "name" : "CPU", "result" : "OK", "error_code" : null, "error_or_warn" : null, "error_params" : "" }, { "id" : 524149, "params" : [ "" ], "name" : "MEMORY", "result" : "OK", "error_code" : null, "error_or_warn" : null, "error_params" : "" }, { "id" : 524150, "params" : [ "" ], "name" : "SYSTEM_ROOT", "result" : "OK", "error_code" : null, "error_or_warn" : null, "error_params" : "" }, { "id" : 524151, "params" : [ "" ], "name" : "PARTITION_STYLE", "result" : "OK", "error_code" : null, "error_or_warn" : null, "error_params" : "" }, { "id" : 524152, "params" : [ "" ], "name" : "FILE_SYSTEM", "result" : "OK", "error_code" : null, "error_or_warn" : null, "error_params" : "" }, { "id" : 524153, "params" : [ "" ], "name" : "FREE_SPACE", "result" : "OK", "error_code" : null, "error_or_warn" : null, "error_params" : "" }, { "id" : 524154, "params" : [ "" ], "name" : "OEM_SYSTEM", "result" : "OK", "error_code" : null, "error_or_warn" : null, "error_params" : "" }, { "id" : 524155, "params" : [ "" ], "name" : "DRIVER_FILE", "result" : "OK", "error_code" : null, "error_or_warn" : null, "error_params" : "" }, { "id" : 524156, "params" : [ "" ], "name" : "SERVICE", "result" : "OK", "error_code" : null, "error_or_warn" : null, "error_params" : "" }, { "id" : 524157, "params" : [ "" ], "name" : "ACCOUNT_RIGHTS", "result" : "OK", "error_code" : null, "error_or_warn" : null, "error_params" : "" } ], "init_target_server" : { "disks" : [ { "name" : "Disk 0", "size" : 42949672960, "used_size" : 42947575808, "device_use" : "OS", "physical_volumes" : [ { "uuid" : "\\\\?\\Volume{586b7157-0000-0000-0000-100000000000}\\", "index" : 1, "name" : "(Reserved)", "device_use" : "BOOT", "file_system" : "NTFS", "mount_point" : null, "size" : 524288000, "used_size" : 410275840 }, { "uuid" : "\\\\?\\Volume{586b7157-0000-0000-0000-501f00000000}\\", "index" : 2, "name" : "C:\\", "device_use" : "OS", "file_system" : "NTFS", "mount_point" : null, "size" : 42423287808, "used_size" : 23170301952 } ] } ], "volume_groups" : [ ] }, "replicatesize" : 0, "stage_action_time" : 1598435768945, "totalsize" : 0, "last_visit_time" : 1598435801422, "agent_version" : "6.1.8", "migration_cycle" : "replicating", "state_action_time" : 1598435783569 }
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 details about a source server were obtained. |
403 |
Authentication failed. |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot