主机迁移服务 SMS主机迁移服务 SMS

更新时间:2021/09/14 GMT+08:00
分享

查询源端服务器列表

功能介绍

用户在源端安装并成功启动Agent后,Agent会将源端服务器信息注册在主机迁移服务中,调用该接口查询已注册的源端服务器列表信息。

调试

您可以在API Explorer中调试该接口。

URI

GET /v3/sources

表1 Query参数

参数

是否必选

参数类型

描述

state

String

源端服务器状态

枚举值:

  • unavailable:环境校验不通过
  • waiting:等待
  • initialize:初始化
  • replicate:复制
  • syncing:持续同步
  • stopping:暂停中
  • stopped:已暂停
  • deleting:删除中
  • error:错误
  • cloning:等待克隆完成
  • cutovering:启动目的端中
  • finished:启动目的端完成

name

String

源端服务器名称

最小长度:0

最大长度:255

id

String

源端服务器ID

最小长度:0

最大长度:255

ip

String

源端服务器IP地址

最小长度:0

最大长度:255

migproject

String

迁移项目id,填写该参数将查询迁移项目下的所有虚拟机

最小长度:0

最大长度:255

limit

Integer

每一页记录的源端服务器数量,0表示用默认值 200

最小值:0

最大值:200

缺省值:200

offset

Integer

偏移量,默认值0

最小值:0

最大值:65535

缺省值:0

migration_cycle

String

根据迁移周期查询

最小长度:0

最大长度:255

connected

Boolean

查询失去连接的源端

enterprise_project_id

String

需要查询的企业项目id

最小长度:0

最大长度:255

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。

通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

最小长度:1

最大长度:16384

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

count

Integer

符合查询条件的源端总数量,不受limit和offset影响

最小值:0

最大值:2147483647

source_servers

Array of SourceServersResponseBody objects

批量查询的源端服务器详列表

表4 SourceServersResponseBody

参数

参数类型

描述

id

String

源端服务器id

最小长度:0

最大长度:255

ip

String

源端服务器的ip地址

最小长度:0

最大长度:255

name

String

源端服务器名称

最小长度:0

最大长度:255

enterprise_project_id

String

企业项目id

最小长度:0

最大长度:255

add_date

Long

源端服务器的注册时间

最小值:0

最大值:9223372036854775807

os_type

String

操作系统类型,OS_TYPE (WINDOWS/LINUX)

最小长度:0

最大长度:255

枚举值:

  • WINDOWS
  • LINUX

os_version

String

系统详细版本号,如CENTOS7.6等

最小长度:0

最大长度:255

oem_system

Boolean

是否是OEM操作系统(Windows)

state

String

源端服务器状态

最小长度:0

最大长度:255

枚举值:

  • unavailable:环境校验不通过
  • waiting:等待
  • initialize:初始化
  • replicate:复制
  • syncing:持续同步
  • stopping:暂停中
  • stopped:已暂停
  • deleting:删除中
  • error:错误
  • cloning:等待克隆完成
  • testing:启动目的端中
  • finished:启动目的端完成

connected

Boolean

源端服务器与主机迁移服务端是否连接

cpu_quantity

Integer

源端CPU核心数

最小值:0

最大值:2147483647

memory

Long

源端物理内存大小(单位:字节)

最小值:0

最大值:9223372036854775807

current_task

TaskByServerSources object

源端列表中关联的任务

checks

Array of EnvironmentCheck objects

源端校验检查项列表

init_target_server

InitTargetServer object

推荐的目的端服务器配置

replicatesize

Long

已复制的大小(单位:字节)

最小值:0

最大值:9223372036854775807

stage_action_time

Long

迁移周期(migration_cycle)上一次变化的时间

最小值:0

最大值:9223372036854775807

totalsize

Long

需要迁移的数据量总大小(单位:字节)

最小值:0

最大值:9223372036854775807

last_visit_time

Long

Agent上一次连接状态发生变化的时间

最小值:0

最大值:9223372036854775807

migration_cycle

String

迁移周期

最小长度:0

最大长度:255

枚举值:

  • cutovering:启动目的端中
  • cutovered:迁移完成
  • checking:源端校验
  • setting:设置目的端
  • replicating:数据复制中
  • syncing:同步中

state_action_time

Long

源端状态(state)上次发生变化的时间

最小值:0

最大值:9223372036854775807

表5 TaskByServerSources

参数

参数类型

描述

id

String

任务id

最小长度:1

最大长度:255

name

String

任务名称

最小长度:0

最大长度:255

type

String

任务类型

最小长度:0

最大长度:255

state

String

任务状态

最小长度:0

最大长度:255

estimate_complete_time

Long

预估结束时间

最小值:0

最大值:9223372036854775807

start_date

Long

开始时间

最小值:0

最大值:9223372036854775807

speed_limit

Integer

限速

最小值:0

最大值:10000

migrate_speed

Double

迁移速率

最小值:0

最大值:10000

compress_rate

Double

压缩率

最小值:0

最大值:10000

start_target_server

Boolean

是否启动虚拟机

vm_template_id

String

虚拟机模板id

最小长度:0

最大长度:255

region_id

String

region_id

最小长度:0

最大长度:255

project_name

String

项目名称

最小长度:0

最大长度:255

project_id

String

项目id

最小长度:0

最大长度:255

target_server

TargetServerById object

目的端

log_collect_status

String

日志收集状态

最小长度:0

最大长度:255

exist_server

Boolean

是否使用已有虚拟机

use_public_ip

Boolean

是否使用公网ip

clone_server

CloneServer object

克隆服务器类

remain_seconds

Long

已迁移时长

最小值:0

最大值:9223372036854775807

表6 TargetServerById

参数

参数类型

描述

vm_id

String

目的端服务器ID

最小长度:0

最大长度:255

name

String

目的端服务器名称

最小长度:0

最大长度:255

表7 CloneServer

参数

参数类型

描述

vm_id

String

克隆服务器ID

最小长度:0

最大长度:255

name

String

克隆虚拟机的名称

最小长度:0

最大长度:255

clone_error

String

克隆错误信息

最小长度:0

最大长度:255

clone_state

String

克隆状态

最小长度:0

最大长度:255

error_msg

String

克隆错误信息描述

最小长度:0

最大长度:1024

表8 EnvironmentCheck

参数

参数类型

描述

id

Long

该检查项的ID

最小值:0

最大值:9223372036854775807

params

Array of strings

参数

name

String

检查项名称

最小长度:0

最大长度:255

result

String

检查结果

最小长度:0

最大长度:255

枚举值:

  • OK:检查通过
  • WARN:告警
  • ERROR:检查不通过

error_code

String

检查不通过的错误码

最小长度:0

最大长度:255

error_params

String

检查不通过的错误参数

最小长度:0

最大长度:255

表9 InitTargetServer

参数

参数类型

描述

disks

Array of DiskIntargetServer objects

推荐的目的端服务器的磁盘信息

表10 DiskIntargetServer

参数

参数类型

描述

name

String

磁盘名称

最小长度:0

最大长度:255

size

Long

磁盘大小,单位:字节

最小值:0

最大值:9223372036854775807

device_use

String

磁盘的作用

最小长度:0

最大长度:255

枚举值:

  • BOOT:启动盘
  • OS:系统盘
  • NORMAL:普通数据盘

状态码: 500

表11 响应Body参数

参数

参数类型

描述

error_code

String

错误码

最小长度:0

最大长度:255

error_msg

String

错误信息

最小长度:0

最大长度:1024

请求示例

查询源端列表信息,每页10个源端,查看第0页。

GET https://{endpoint}/v3/sources?limit=10&offset=0

响应示例

状态码: 200

查询源端服务器列表成功。

{
  "count" : 10,
  "source_servers" : [ {
    "id" : "7583895d-627b-4643-82bc-c2aec1576a75",
    "ip" : "192.168.0.1",
    "name" : "sms-test",
    "hostname" : "sms-test",
    "enterprise_project_id" : 0,
    "add_date" : 1598417717000,
    "os_type" : "WINDOWS",
    "os_version" : "WINDOWS2008_R2_64BIT",
    "oem_system" : false,
    "state" : "finished",
    "connected" : true,
    "cpu_quantity" : 1,
    "memory" : 2146557952,
    "current_task" : {
      "id" : "57ea3129-a808-488b-90c5-30861de60676",
      "name" : "MigrationTask",
      "type" : "MIGRATE_BLOCK",
      "state" : "MIGRATE_SUCCESS",
      "estimate_complete_time" : null,
      "start_date" : 1598417771000,
      "speed_limit" : 0,
      "migrate_speed" : 0.0,
      "start_target_server" : true,
      "vm_template_id" : "26885d76-0d65-4f4b-9e9b-19c7d69ccc13",
      "region_id" : "region_id",
      "project_name" : "project_name",
      "project_id" : "b276e6fb38c74aa2ba4598f049745ce9",
      "target_server" : {
        "vm_id" : "23d74c12-b78b-4163-ba33-a898f79b8260",
        "name" : "sms-test"
      },
      "log_collect_status" : "INIT",
      "exist_server" : false,
      "use_public_ip" : true,
      "clone_server" : null,
      "remain_seconds" : null
    },
    "checks" : [ {
      "id" : 524062,
      "params" : [ "" ],
      "name" : "OS_VERSION",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524063,
      "params" : [ "" ],
      "name" : "FIRMWARE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524064,
      "params" : [ "" ],
      "name" : "CPU",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524065,
      "params" : [ "" ],
      "name" : "MEMORY",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524066,
      "params" : [ "" ],
      "name" : "SYSTEM_ROOT",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524067,
      "params" : [ "" ],
      "name" : "PARTITION_STYLE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524068,
      "params" : [ "" ],
      "name" : "FILE_SYSTEM",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524069,
      "params" : [ "" ],
      "name" : "FREE_SPACE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524070,
      "params" : [ "" ],
      "name" : "OEM_SYSTEM",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524071,
      "params" : [ "" ],
      "name" : "DRIVER_FILE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524072,
      "params" : [ "" ],
      "name" : "SERVICE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524073,
      "params" : [ "" ],
      "name" : "ACCOUNT_RIGHTS",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    } ],
    "init_target_server" : {
      "disks" : [ {
        "name" : "Disk 0",
        "size" : 42949672960,
        "device_use" : "OS"
      } ]
    },
    "replicatesize" : 0,
    "stage_action_time" : 1598419352959,
    "totalsize" : 0,
    "last_visit_time" : 1598434312002,
    "migration_cycle" : "cutovered",
    "state_action_time" : 1598419352959
  }, {
    "id" : "4f63b0e6-9624-4472-b811-bedfbf52a9b6",
    "ip" : "192.168.0.154",
    "name" : "sms-win16",
    "hostname" : "sms-win16",
    "add_date" : 1598417612000,
    "os_type" : "WINDOWS",
    "os_version" : "WINDOWS2016_64BIT",
    "oem_system" : false,
    "state" : "finished",
    "connected" : true,
    "cpu_quantity" : 1,
    "memory" : 2146553856,
    "current_task" : {
      "id" : "5297077e-8b2a-487a-87b3-f3d11d5cf0be",
      "name" : "MigrationTask",
      "type" : "MIGRATE_BLOCK",
      "state" : "MIGRATE_SUCCESS",
      "estimate_complete_time" : null,
      "start_date" : 1598417627000,
      "speed_limit" : 0,
      "migrate_speed" : 0.0,
      "start_target_server" : true,
      "vm_template_id" : "d67d6f9b-fa72-46c3-8a90-15cab3190907",
      "region_id" : "region_id",
      "project_name" : "project_name",
      "project_id" : "b276e6fb38c74aa2ba4598f049745ce9",
      "target_server" : {
        "vm_id" : "0b1b1aa6-1364-4395-8556-e9cb5afe8538",
        "name" : "e2e-sms-win16"
      },
      "log_collect_status" : "INIT",
      "exist_server" : false,
      "use_public_ip" : true,
      "clone_server" : null,
      "remain_seconds" : null
    },
    "checks" : [ {
      "id" : 524050,
      "params" : [ "" ],
      "name" : "OS_VERSION",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524051,
      "params" : [ "" ],
      "name" : "FIRMWARE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524052,
      "params" : [ "" ],
      "name" : "CPU",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524053,
      "params" : [ "" ],
      "name" : "MEMORY",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524054,
      "params" : [ "" ],
      "name" : "SYSTEM_ROOT",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524055,
      "params" : [ "" ],
      "name" : "PARTITION_STYLE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524056,
      "params" : [ "" ],
      "name" : "FILE_SYSTEM",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524057,
      "params" : [ "" ],
      "name" : "FREE_SPACE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524058,
      "params" : [ "" ],
      "name" : "OEM_SYSTEM",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524059,
      "params" : [ "" ],
      "name" : "DRIVER_FILE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524060,
      "params" : [ "" ],
      "name" : "SERVICE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524061,
      "params" : [ "" ],
      "name" : "ACCOUNT_RIGHTS",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    } ],
    "init_target_server" : {
      "disks" : [ {
        "name" : "Disk 0",
        "size" : 42949672960,
        "device_use" : "OS"
      } ]
    },
    "replicatesize" : 0,
    "stage_action_time" : 1598419339661,
    "totalsize" : 0,
    "last_visit_time" : 1598434316810,
    "migration_cycle" : "cutovered",
    "state_action_time" : 1598419339661
  }, {
    "id" : "ebe80818-605e-430e-9d2e-bf71af50bbb6",
    "ip" : "192.168.77.77",
    "name" : "sms-centos",
    "hostname" : null,
    "add_date" : 1598417551000,
    "os_type" : "LINUX",
    "os_version" : "CENTOS_7_4_64BIT",
    "oem_system" : false,
    "state" : "error",
    "connected" : true,
    "cpu_quantity" : 1,
    "memory" : 1038716928,
    "current_task" : {
      "id" : "a42013ab-1ebb-4dd8-8284-1a678ef1ccac",
      "name" : "MigrationTask",
      "type" : "MIGRATE_BLOCK",
      "state" : "MIGRATE_FAIL",
      "estimate_complete_time" : null,
      "start_date" : 1598417588000,
      "speed_limit" : 0,
      "migrate_speed" : 0.0,
      "start_target_server" : true,
      "vm_template_id" : "f909c6ec-aafd-4e85-94bc-aad03a756bb5",
      "region_id" : "region_id",
      "project_name" : "project_name",
      "project_id" : "b276e6fb38c74aa2ba4598f049745ce9",
      "target_server" : {
        "vm_id" : "e9eeb550-ba71-4940-a75a-94931955179d",
        "name" : "e2e-sms-centos"
      },
      "log_collect_status" : "INIT",
      "exist_server" : false,
      "use_public_ip" : true,
      "clone_server" : null,
      "remain_seconds" : null
    },
    "checks" : [ {
      "id" : 524038,
      "params" : [ "" ],
      "name" : "OS_VERSION",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524039,
      "params" : [ "" ],
      "name" : "CPU",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524040,
      "params" : [ "" ],
      "name" : "MEMORY",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524041,
      "params" : [ "" ],
      "name" : "PARAVIRTUALIZATION",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524042,
      "params" : [ "" ],
      "name" : "FIRMWARE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524043,
      "params" : [ "" ],
      "name" : "BOOT_LOADER",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524044,
      "params" : [ "" ],
      "name" : "RSYNC",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524045,
      "params" : [ "" ],
      "name" : "RAW_DEVICES",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524046,
      "params" : [ "" ],
      "name" : "DISK_INFO",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524047,
      "params" : [ "" ],
      "name" : "PARTITION_STYLE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524048,
      "params" : [ "" ],
      "name" : "FILE_SYSTEM",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 524049,
      "params" : [ "" ],
      "name" : "LINUX_BLOCK_SUPPORT",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    } ],
    "init_target_server" : {
      "disks" : [ {
        "name" : "/dev/vda",
        "size" : 42949672960,
        "device_use" : "BOOT"
      } ]
    },
    "replicatesize" : 42949672960,
    "stage_action_time" : 1598428182454,
    "totalsize" : 42949672960,
    "last_visit_time" : 1598434308889,
    "migration_cycle" : "syncing",
    "state_action_time" : 1598428182454
  }, {
    "id" : "766b8952-61e3-444d-8b7f-bc76c4c0d3f6",
    "ip" : "192.168.0.235",
    "name" : "sms-ubuntu",
    "hostname" : null,
    "add_date" : 1598417522000,
    "os_type" : "LINUX",
    "os_version" : "UBUNTU_18_4_64BIT",
    "oem_system" : false,
    "state" : "unavailable",
    "connected" : false,
    "cpu_quantity" : 1,
    "memory" : 1032556544,
    "current_task" : null,
    "checks" : [ ],
    "init_target_server" : {
      "disks" : [ {
        "name" : "/dev/vda",
        "size" : 42949672960,
        "device_use" : "BOOT"
      }, {
        "name" : "/dev/vdb",
        "size" : 21474836480,
        "device_use" : "NORMAL"
      } ]
    },
    "replicatesize" : 0,
    "stage_action_time" : 1598417521797,
    "totalsize" : 0,
    "last_visit_time" : 1598417521795,
    "migration_cycle" : "checking",
    "state_action_time" : null
  }, {
    "id" : "5aaddbd6-6c47-472d-ab67-95c07d251d3c",
    "ip" : "192.168.178.214",
    "name" : "sms-sms2",
    "hostname" : "sms-sms2",
    "add_date" : 1598403465000,
    "os_type" : "WINDOWS",
    "os_version" : "WINDOWS2012_R2_64BIT",
    "oem_system" : false,
    "state" : "waiting",
    "connected" : false,
    "cpu_quantity" : 1,
    "memory" : 2146553856,
    "current_task" : null,
    "checks" : [ {
      "id" : 523970,
      "params" : [ "" ],
      "name" : "OS_VERSION",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523971,
      "params" : [ "" ],
      "name" : "FIRMWARE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523972,
      "params" : [ "" ],
      "name" : "CPU",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523973,
      "params" : [ "" ],
      "name" : "MEMORY",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523974,
      "params" : [ "" ],
      "name" : "SYSTEM_ROOT",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523975,
      "params" : [ "" ],
      "name" : "PARTITION_STYLE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523976,
      "params" : [ "" ],
      "name" : "FILE_SYSTEM",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523977,
      "params" : [ "" ],
      "name" : "FREE_SPACE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523978,
      "params" : [ "" ],
      "name" : "OEM_SYSTEM",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523979,
      "params" : [ "" ],
      "name" : "DRIVER_FILE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523980,
      "params" : [ "" ],
      "name" : "SERVICE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523981,
      "params" : [ "" ],
      "name" : "ACCOUNT_RIGHTS",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    } ],
    "init_target_server" : {
      "disks" : [ {
        "name" : "Disk 0",
        "size" : 42949672960,
        "device_use" : "OS"
      } ]
    },
    "replicatesize" : 0,
    "stage_action_time" : 1598403465315,
    "totalsize" : 0,
    "last_visit_time" : 1598403588140,
    "migration_cycle" : "checking",
    "state_action_time" : 1598403465414
  }, {
    "id" : "1a9aee6c-eadb-4269-89af-57b4b734a809",
    "ip" : "10.0.10.123",
    "name" : "linux sources",
    "hostname" : "sms-console",
    "add_date" : 1598369476000,
    "os_type" : "LINUX",
    "os_version" : "REDHAT_7_3_64BIT",
    "oem_system" : false,
    "state" : "unavailable",
    "connected" : false,
    "cpu_quantity" : 4,
    "memory" : 8581140480,
    "current_task" : null,
    "checks" : [ ],
    "init_target_server" : {
      "disks" : [ {
        "name" : "sda",
        "size" : 85899345920,
        "device_use" : "BOOT|OS"
      }, {
        "name" : "sdb",
        "size" : 214748364800,
        "device_use" : "NORMAL"
      } ]
    },
    "replicatesize" : 0,
    "stage_action_time" : 1598369475726,
    "totalsize" : 0,
    "last_visit_time" : 1598369475725,
    "migration_cycle" : "checking",
    "state_action_time" : null
  }, {
    "id" : "2d41ea08-eb93-4a0a-a0c3-fd7a92828347",
    "ip" : "10.0.10.123",
    "name" : "linux sources",
    "hostname" : "sms-console",
    "add_date" : 1598351694000,
    "os_type" : "LINUX",
    "os_version" : "REDHAT_7_3_64BIT",
    "oem_system" : false,
    "state" : "unavailable",
    "connected" : false,
    "cpu_quantity" : 4,
    "memory" : 8581140480,
    "current_task" : null,
    "checks" : [ ],
    "init_target_server" : {
      "disks" : [ {
        "name" : "sda",
        "size" : 85899345920,
        "device_use" : "BOOT|OS"
      }, {
        "name" : "sdb",
        "size" : 214748364800,
        "device_use" : "NORMAL"
      } ]
    },
    "replicatesize" : 0,
    "stage_action_time" : 1598351693858,
    "totalsize" : 0,
    "last_visit_time" : 1598351693857,
    "migration_cycle" : "checking",
    "state_action_time" : null
  }, {
    "id" : "d8ab16fe-4cdc-402e-a700-533dd8901bd5",
    "ip" : "10.0.10.123",
    "name" : "linux sources",
    "hostname" : "sms-console",
    "add_date" : 1598348080000,
    "os_type" : "LINUX",
    "os_version" : "REDHAT_7_3_64BIT",
    "oem_system" : false,
    "state" : "unavailable",
    "connected" : false,
    "cpu_quantity" : 4,
    "memory" : 8581140480,
    "current_task" : null,
    "checks" : [ ],
    "init_target_server" : {
      "disks" : [ {
        "name" : "sda",
        "size" : 85899345920,
        "device_use" : "BOOT|OS"
      }, {
        "name" : "sdb",
        "size" : 214748364800,
        "device_use" : "NORMAL"
      } ]
    },
    "replicatesize" : 0,
    "stage_action_time" : 1598348079782,
    "totalsize" : 0,
    "last_visit_time" : 1598348079781,
    "migration_cycle" : "checking",
    "state_action_time" : null
  }, {
    "id" : "02d6a461-b7a4-44ef-b37a-13abe57a715f",
    "ip" : "192.168.0.239",
    "name" : "sms-centos7",
    "hostname" : null,
    "add_date" : 1598326505000,
    "os_type" : "LINUX",
    "os_version" : "CENTOS_8_5_64BIT",
    "oem_system" : false,
    "state" : "unavailable",
    "connected" : false,
    "cpu_quantity" : 1,
    "memory" : 1926860800,
    "current_task" : null,
    "checks" : [ {
      "id" : 523794,
      "params" : [ "" ],
      "name" : "OS_VERSION",
      "result" : "ERROR",
      "error_code" : "SMS.6504",
      "error_or_warn" : {
        "error_code" : "SMS.6504",
        "link" : "xxxx"
      },
      "error_params" : ""
    }, {
      "id" : 523795,
      "params" : [ "" ],
      "name" : "CPU",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523796,
      "params" : [ "" ],
      "name" : "MEMORY",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523797,
      "params" : [ "" ],
      "name" : "PARAVIRTUALIZATION",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523798,
      "params" : [ "" ],
      "name" : "FIRMWARE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523799,
      "params" : [ "" ],
      "name" : "BOOT_LOADER",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523800,
      "params" : [ "" ],
      "name" : "RSYNC",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523801,
      "params" : [ "" ],
      "name" : "RAW_DEVICES",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523802,
      "params" : [ "" ],
      "name" : "DISK_INFO",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523803,
      "params" : [ "" ],
      "name" : "PARTITION_STYLE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523804,
      "params" : [ "" ],
      "name" : "FILE_SYSTEM",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523805,
      "params" : [ "" ],
      "name" : "LINUX_BLOCK_SUPPORT",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    } ],
    "init_target_server" : {
      "disks" : [ {
        "name" : "/dev/vda",
        "size" : 42949672960,
        "device_use" : "BOOT"
      }, {
        "name" : "/dev/vdb",
        "size" : 42949672960,
        "device_use" : "NORMAL"
      } ]
    },
    "replicatesize" : 0,
    "stage_action_time" : 1598326505378,
    "totalsize" : 0,
    "last_visit_time" : 1598423828868,
    "migration_cycle" : "checking",
    "state_action_time" : 1598326505459
  }, {
    "id" : "ee28ac0d-4f5d-479d-869c-e904aafbba70",
    "ip" : "192.168.0.65",
    "name" : "smsc-test",
    "hostname" : null,
    "add_date" : 1598238727000,
    "os_type" : "LINUX",
    "os_version" : "CENTOS_6_5_64BIT",
    "oem_system" : false,
    "state" : "finished",
    "connected" : true,
    "cpu_quantity" : 1,
    "memory" : 1043931136,
    "current_task" : {
      "id" : "c943d962-dc48-4d2c-80a1-b1102363bf9c",
      "name" : "MigrationTask",
      "type" : "MIGRATE_FILE",
      "state" : "MIGRATE_SUCCESS",
      "estimate_complete_time" : null,
      "start_date" : 1598239243000,
      "speed_limit" : 0,
      "migrate_speed" : 0.0,
      "start_target_server" : true,
      "vm_template_id" : "8751d34d-a79c-4f32-a3aa-24389db219a9",
      "region_id" : "region_id",
      "project_name" : "project_name",
      "project_id" : "06334e957c80d2642f39c0030856abdb",
      "target_server" : {
        "vm_id" : "705e6fd0-53d9-47e1-b58d-484730ba9ba9",
        "name" : "smsc-test"
      },
      "log_collect_status" : "INIT",
      "exist_server" : false,
      "use_public_ip" : true,
      "clone_server" : null,
      "remain_seconds" : null
    },
    "checks" : [ {
      "id" : 523686,
      "params" : [ "" ],
      "name" : "OS_VERSION",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523687,
      "params" : [ "" ],
      "name" : "CPU",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523688,
      "params" : [ "" ],
      "name" : "MEMORY",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523689,
      "params" : [ "" ],
      "name" : "PARAVIRTUALIZATION",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523690,
      "params" : [ "" ],
      "name" : "FIRMWARE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523691,
      "params" : [ "" ],
      "name" : "BOOT_LOADER",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523692,
      "params" : [ "" ],
      "name" : "RSYNC",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523693,
      "params" : [ "" ],
      "name" : "RAW_DEVICES",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523694,
      "params" : [ "" ],
      "name" : "DISK_INFO",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523695,
      "params" : [ "" ],
      "name" : "PARTITION_STYLE",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523696,
      "params" : [ "" ],
      "name" : "FILE_SYSTEM",
      "result" : "OK",
      "error_code" : null,
      "error_or_warn" : null,
      "error_params" : ""
    }, {
      "id" : 523697,
      "params" : [ "" ],
      "name" : "LINUX_BLOCK_SUPPORT",
      "result" : "WARN",
      "error_code" : "SMS.6617",
      "error_or_warn" : null,
      "error_params" : ""
    } ],
    "init_target_server" : {
      "disks" : [ {
        "name" : "/dev/vda",
        "size" : 42949672960,
        "device_use" : "BOOT"
      }, {
        "name" : "/dev/vdb",
        "size" : 10737418240,
        "device_use" : "NORMAL"
      } ]
    },
    "replicatesize" : 0,
    "stage_action_time" : 1598240178677,
    "totalsize" : 0,
    "last_visit_time" : 1598434314748,
    "migration_cycle" : "cutovered",
    "state_action_time" : 1598240178677
  } ]
}

状态码

状态码

描述

200

查询源端服务器列表成功。

500

Internal Server Error

错误码

请参见错误码

分享:

    相关文档

    相关产品