Querying a Source Server
Function
After the Agent reports the source server information to SMS, SMS checks the migration feasibility. This API is used to query 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 source server registration and optional for source server updates. 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 server was registered. Minimum value: 0 Maximum value: 9223372036854775807 |
os_type |
String |
The OS type of the source server, which can be Windows or Linux. This parameter is mandatory for source server registration and optional for source server updates. Minimum length: 0 characters Maximum length: 255 characters |
os_version |
String |
The OS version. This parameter is mandatory for registration and optional for updates. 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 of the source server, which can be BIOS or UEFI. 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. This parameter is mandatory for Linux. 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 information about Btrfs file systems 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 information about NICs on 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 timestamp when the status of the source server last changed. The source server status is defined by state. 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 timestamp when the Agent connection status last changed. Minimum value: 0 Maximum value: 9223372036854775807 |
stage_action_time |
Long |
The 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 |
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 |
The 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 server 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 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 |
Parameter |
Type |
Description |
---|---|---|
vm_id |
String |
The ID of the cloned server. 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 message 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 style. 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 information about physical partitions on 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 paired target server disk in Linux. Minimum length: 0 characters Maximum length: 255 characters |
inode_size |
Integer |
The number of inodes. Minimum value: 0 Maximum value: 4294967296 |
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: 4294967296 |
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: 4294967296 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: 4294967296 |
device_use |
Integer |
The used space. Minimum value: 0 Maximum value: 4294967296 |
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 names of the Btrfs file system. 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 Btrfs node size. 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 |
subvolumn |
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 |
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 record 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 returned 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 |
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
OK
{ "id" : "1cce5dab-df33-4abe-b2ac-e94fa05dxxxx", "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" : "1dcbf9f2-9f2a-4df8-88dc-27e5614axxxx", "name" : "MigrationTask", "type" : "MIGRATE_BLOCK", "state" : "RUNNING", "speed_limit" : 0, "start_target_server" : true, "vm_template_id" : "38d53ae9-70e3-4587-89c9-6219d3d4xxxx", "region_id" : "region_id", "project_name" : "project_name", "project_id" : "b276e6fb38c74aa2ba4598f04974xxxx", "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 Codes
Status Code |
Description |
---|---|
200 |
OK |
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.