All Products
Search
Document Center

Server Migration Center:DescribeSourceServers

Last Updated:Oct 29, 2024

Queries the information about migration sources.

Operation description

Usage notes

You can specify multiple request parameters to be queried. Specified parameters are evaluated by using the AND operator. Only the specified parameters are used as filter conditions.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
smc:DescribeSourceServersget
  • SourceServer
    acs:smc:{#regionId}:{#accountId}:sourceserver/{#SourceServerId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
JobIdstringNo

The migration job ID.

j-bp19vlwm0tyigbmj****
StatestringNo

The state of the migration source. Valid Values:

  • Unavailable: The migration source is inactive, or an error occurs in the migration source.
  • Available: The migration source is active.
  • InUse: The migration source is being migrated.
  • Deleting: The migration source is being deleted from Server Migration Center (SMC).
Available
NamestringNo

The name of the migration source. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain digits, colons (:), underscores (_), and hyphens (-).

Default value: null.

testSourceServerName
PageNumberintegerNo

The page number. Pages start from page 1.

Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Valid values: 1 to 50.

Default value: 10

10
SourceIdarrayNo

The migration source IDs. You can specify multiple IDs.

stringNo

The migration source ID. You can specify multiple IDs.

s-bp1e2fsl57knvuug****
ResourceGroupIdstringNo

The ID of the resource group.

rg-acfmw3ty5y7****
Tagarray<object>No

The tag.

objectNo

The tag list.

KeystringNo

The key of tag N that is added to the SMC resource. Valid values of N: 1 to 20.

The tag key cannot be an empty string. It can be up to 64 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

TestKey
ValuestringNo

The value of tag N that is added to the SMC resource. Valid values of N: 1 to 20.

The tag value can be an empty string. It can be up to 64 characters in length and cannot contain http:// or https://.

TestValue
RelatedJobTypearrayNo

The types of migration jobs that are associated with migration sources.

stringNo

The type of migration job that is associated with the migration source. Valid values:

  • Not_Related: No migration job is associated with the migration source.
  • Server: server migration job.
  • Os: operating system migration job.
  • Cross_Zone: cross-zone migration job.
  • VMWare: job to migrate VMware VMs without agents.
  • Desktop: desktop migration job.
Server

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

SourceServersarray<object>

The information about migration sources.

SourceServerobject

The information about the migration source.

CreationTimestring

The time when the migration source was created.

2019-06-27T02:58:09Z
HeartbeatRateinteger

The interval at which heartbeats are sent from the SMC client. Unit: seconds.

30
Statestring

The state of the migration source.

InUse
DataDisksarray<object>

The data disk on the migration source.

DataDiskobject

The data disks on the migration source.

Indexinteger

The index number of the data disk.

1
Sizeinteger

The size of the data disk. Unit: GiB.

20
Partsarray<object>

The information about the data disk partition.

Partobject

The information about data disk partitions.

CanBlockboolean

Indicates whether block replication is enabled for the data disk partition.

false
SizeByteslong

The size of the data disk partition. Unit: byte.

21474836480
Needboolean

Indicates whether the data disk partition must be selected.

false
Devicestring

The device ID of the data disk partition.

1_0
Pathstring

The path of the data disk partition.

/home/data
Pathstring

The path of the data disk.

/home/data
SystemDiskPartsarray<object>

The information about the system disk partition.

SystemDiskPartobject

The information about system disk partitions.

CanBlockboolean

Indicates whether block replication is enabled for the system disk partition.

true
SizeByteslong

The size of the system disk partition. Unit: byte.

254803968
Needboolean

Indicates whether the system disk partition must be selected.

true
Devicestring

The device ID of the system disk partition.

0_0
Pathstring

The path of the system disk partition.

/boot
KernelLevelinteger

The kernel level of the migration source.

1
SourceIdstring

The ID of the migration source.

s-bp1e2fsl57knvuug****
AgentVersionstring

The version number of the SMC client.

1.5.2.3
StatusInfostring

The status information of the migration source. This parameter is returned if the migration source is in the Unavailable state. The value of this parameter consists of key-value pairs in the JSON format. Sample keys:

error_code: the error code.error_msg: the error message.
{"error_code": "S1", "error_msg": "Rsync not found. Please install rsync."}
SystemDiskSizeinteger

The system disk size of the migration source. Unit: GiB.

40
Descriptionstring

The description of the migration source.

Server Source Imported By GotoAliyun.
ErrorCodestring

The error code of the migration source.

SourceServer.Offline
JobIdstring

The ID of the last migration job.

j-bp19vlwm0tyigbmj****
Platformstring

The operating system of the migration source.

OpenSUSE
ReplicationDriverstring

The replication driver used for migration. Default value: SMT.

SMT
Namestring

The name of the migration source.

SourceServerName
SystemInfostring

The system information of the migration source. The value of this parameter consists of key-value pairs in the JSON format. The key-value pairs are extensible and have fixed keys. The JSON string does not exceed 1 KB in size. Sample keys:

agent_mode: The migration mode.
agent_type: The migration type.
client_type: The client type.
hostname: The host name.
ipv4: The IPv4 address.
ipv6: The IPv6 address.
.cores: The number of CPU cores.
cpu_usage: The CPU utilization.
memory: The memory size.
memory_usage: The memory usage.
{\"agent_mode\":\"daemon\",\"agent_type\":\"aliyun\",\"client_type\":\"\",\"cores\":\"2\",\"cpu_usage\":\"0.00\",\"hostname\":\"ixxxxxxxxxx\",\"ipv4\":\"10.0.0.1\",\"memory\":\"8.00\",\"memory_usage\":\"3.61\"}
Architecturestring

The system architecture of the migration source.

x86_64
ResourceGroupIdstring

The resource group ID.

rg-acfmw3ty5y7****
Tagsarray<object>

The information about the tags.

Tagobject

The list of tags.

Keystring

The key of tag N that is added to the SMC resource. Valid values of N: 1 to 20

You cannot specify empty strings as tag keys. It can be up to 64 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

TestKey
Valuestring

The value of tag N that is added to the SMC resource. Valid values of N: 1 to 20

The tag key can be an empty string. It can be up to 64 characters in length and cannot contain http:// or https://.

TestValue
TotalCountinteger

The total number of migration sources returned.

1
PageSizeinteger

The number of entries returned per page.

10
RequestIdstring

The request ID.

410E6073-66D0-45D3-AB3E-4DC3F5E4****
PageNumberinteger

The page number.

1

Examples

Sample success responses

JSONformat

{
  "SourceServers": {
    "SourceServer": [
      {
        "CreationTime": "2019-06-27T02:58:09Z",
        "HeartbeatRate": 30,
        "State": "InUse",
        "DataDisks": {
          "DataDisk": [
            {
              "Index": 1,
              "Size": 20,
              "Parts": {
                "Part": [
                  {
                    "CanBlock": false,
                    "SizeBytes": 21474836480,
                    "Need": false,
                    "Device": "1_0",
                    "Path": "/home/data"
                  }
                ]
              },
              "Path": "/home/data"
            }
          ]
        },
        "SystemDiskParts": {
          "SystemDiskPart": [
            {
              "CanBlock": true,
              "SizeBytes": 254803968,
              "Need": true,
              "Device": "0_0",
              "Path": "/boot"
            }
          ]
        },
        "KernelLevel": 1,
        "SourceId": "s-bp1e2fsl57knvuug****",
        "AgentVersion": "1.5.2.3",
        "StatusInfo": "{\"error_code\": \"S1\", \"error_msg\": \"Rsync not found. Please install rsync.\"}",
        "SystemDiskSize": 40,
        "Description": "Server Source Imported By GotoAliyun.",
        "ErrorCode": "SourceServer.Offline",
        "JobId": "j-bp19vlwm0tyigbmj****",
        "Platform": "OpenSUSE",
        "ReplicationDriver": "SMT",
        "Name": "SourceServerName",
        "SystemInfo": "{\\\"agent_mode\\\":\\\"daemon\\\",\\\"agent_type\\\":\\\"aliyun\\\",\\\"client_type\\\":\\\"\\\",\\\"cores\\\":\\\"2\\\",\\\"cpu_usage\\\":\\\"0.00\\\",\\\"hostname\\\":\\\"ixxxxxxxxxx\\\",\\\"ipv4\\\":\\\"10.0.0.1\\\",\\\"memory\\\":\\\"8.00\\\",\\\"memory_usage\\\":\\\"3.61\\\"}",
        "Architecture": "x86_64",
        "ResourceGroupId": "rg-acfmw3ty5y7****",
        "Tags": {
          "Tag": [
            {
              "Key": "TestKey",
              "Value": "TestValue"
            }
          ]
        },
        "Disks": {
          "System": {
            "Size": 100,
            "Offset": 1024,
            "Parts": {
              "Part": [
                {
                  "CanBlock": false,
                  "SizeBytes": 21474836480,
                  "Path": "/home/data",
                  "Type": "Normal"
                }
              ]
            }
          },
          "Data": {
            "Data": [
              {
                "Size": 80,
                "Offset": 1024,
                "Parts": {
                  "Part": [
                    {
                      "CanBlock": false,
                      "SizeBytes": 21474836480,
                      "Path": "/home/data",
                      "Type": "Normal"
                    }
                  ]
                }
              }
            ]
          }
        },
        "WorkgroupId": "w-bp1ja22kdqphehlj****"
      }
    ]
  },
  "TotalCount": 1,
  "PageSize": 10,
  "RequestId": "410E6073-66D0-45D3-AB3E-4DC3F5E4****",
  "PageNumber": 1
}

Error codes

HTTP status codeError codeError messageDescription
403Forbidden.UnauthorizedA required authorization for the specified action is not supplied.-
500InternalErrorAn error occurred while processing your request. Please try again. If the problem still exists, please submit a ticket.An error occurred while processing your request. Please try again. If the problem still exists, please submit a ticket.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-09-27The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details
2024-05-30The Error code has changed. The request parameters of the API has changedView Change Details
2023-07-28The Error code has changedView Change Details