跳转到主要内容
平台运维/灾备管理/持续数据保护(CDP)/持续数据保护(CDP)相关接口
PUTCDP Operations起始版本 4.5.0同步需要认证

从CDP恢复点创建虚拟机

从CDP恢复点创建虚拟机

调试可用性

在线调试

使用当前认证信息和示例参数提交 Mock 请求。

请求参数

请求体字段

  • paramsObject必填

    请求体参数结构

    • nameString必填

      资源名称

    • groupIdlong必填

      恢复点ID

    • cdpTaskUuidString必填

      CDP任务UUID

    • instanceOfferingUuidString必填

      计算规格UUID

    • defaultL3NetworkUuidString

      默认的三层网络UUID

    • l3NetworkUuidsList必填

      三层网络UUID列表

    • typeString

      虚拟机类型

    • zoneUuidString

      区域UUID

    • clusterUuidString

      集群UUID

    • hostUuidString

      物理机UUID

    • primaryStorageUuidForRootVolumeString

      根盘对应的主存储UUID

    • primaryStorageUuidForDataVolumeString

      数据盘对应的主存储UUID

    • recoverBandwidthlong

      恢复带宽

    • descriptionString

      资源的详细描述

    • rootVolumeSystemTagsList

      系统盘的系统标签

    • dataVolumeSystemTagsList

      数据盘的系统标签

    • resourceUuidString

      资源UUID

    • tagUuidsList

      标签UUID列表

  • systemTagsList

    虚拟机系统标签

  • userTagsList

    虚拟机用户标签

响应状态

200 OK

该 API 成功时返回以下响应结构。

  • successboolean必填

    操作是否成功。

  • errorErrorCode必填

    错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error

    • codeString必填

      错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001

    • descriptionString必填

      错误的概要描述

    • detailsString必填

      错误的详细信息

    • elaborationString必填

      保留字段,默认为null

    • opaqueLinkedHashMap必填

      保留字段,默认为null

    • causeErrorCode必填

      根错误,引发当前错误的源错误,若无原错误,该字段为null

  • inventoryVmInstanceInventory必填

    详情参考inventory

    • uuidString必填

      资源的UUID,唯一标示该资源

    • nameString必填

      资源名称

    • descriptionString

      资源的详细描述

    • zoneUuidString必填

      区域UUID

    • clusterUuidString必填

      集群UUID

    • imageUuidString必填

      镜像UUID

    • hostUuidString必填

      物理机UUID

    • lastHostUuidString必填

      最近一次主机UUID。

    • instanceOfferingUuidString必填

      计算规格UUID

    • rootVolumeUuidString必填

      根云盘UUID

    • platformString必填

      平台。

    • architectureString必填

      暂无描述。

    • defaultL3NetworkUuidString必填

      暂无描述。

    • typeString必填

      类型。

    • hypervisorTypeString必填

      暂无描述。

    • memorySizeLong必填

      内存大小。

    • cpuNumInteger必填

      暂无描述。

    • cpuSpeedLong必填

      暂无描述。

    • allocatorStrategyString必填

      暂无描述。

    • createDateTimestamp必填

      创建时间

    • lastOpDateTimestamp必填

      最后一次修改时间

    • stateString必填

      当前状态。

    • guestOsTypeString必填

      暂无描述。

    • vmNicsList必填

      详情参考vmNics

      • uuidString必填

        资源的UUID,唯一标示该资源

      • vmInstanceUuidString必填

        云主机UUID

      • l3NetworkUuidString必填

        三层网络UUID

      • ipString必填

        来源IP地址。

      • macString必填

        暂无描述。

      • hypervisorTypeString必填

        暂无描述。

      • netmaskString必填

        暂无描述。

      • gatewayString必填

        暂无描述。

      • metaDataString必填

        元数据。

      • ipVersionInteger必填

        IP版本。

      • driverTypeString必填

        暂无描述。

      • internalNameString必填

        内部名称。

      • deviceIdInteger必填

        设备ID。

      • typeString必填

        类型。

      • createDateTimestamp必填

        创建时间

      • lastOpDateTimestamp必填

        最后一次修改时间

      • usedIpsList必填

        详情参考usedIps

        • uuidString必填

          资源的UUID,唯一标示该资源

        • ipRangeUuidString必填

          IP段UUID

        • l3NetworkUuidString必填

          三层网络UUID

        • ipVersionInteger必填

          IP版本。

        • ipString必填

          来源IP地址。

        • netmaskString必填

          暂无描述。

        • gatewayString必填

          暂无描述。

        • usedForString必填

          已使用用于。

        • ipInLonglong必填

          暂无描述。

        • vmNicUuidString必填

          云主机网卡UUID

        • createDateTimestamp必填

          创建时间

        • lastOpDateTimestamp必填

          最后一次修改时间

    • allVolumesList必填

      详情参考allVolumes

      • uuidString必填

        资源的UUID,唯一标示该资源

      • nameString必填

        资源名称

      • descriptionString

        资源的详细描述

      • primaryStorageUuidString必填

        主存储UUID

      • vmInstanceUuidString必填

        云主机UUID

      • diskOfferingUuidString必填

        云盘规格UUID

      • rootImageUuidString必填

        根镜像UUID。

      • installPathString必填

        安装路径。

      • typeString必填

        类型。

      • formatString必填

        数据格式或导出格式。

      • sizeLong必填

        返回记录数。

      • actualSizeLong必填

        实际大小。

      • deviceIdInteger必填

        设备ID。

      • stateString必填

        当前状态。

      • statusString必填

        状态信息。

      • createDateTimestamp必填

        创建时间

      • lastOpDateTimestamp必填

        最后一次修改时间

      • isShareableBoolean必填

        是否可分享。

      • volumeQosString必填

        暂无描述。

      • lastDetachDateTimestamp必填

        最近一次detach时间。

      • lastVmInstanceUuidString必填

        最近一次云主机实例UUID。

    • vmCdRomsList必填

      详情参考vmCdRoms

      • uuidString必填

        资源的UUID,唯一标示该资源

      • vmInstanceUuidString必填

        云主机UUID

      • deviceIdInteger必填

        设备ID。

      • isoUuidString必填

        暂无描述。

      • isoInstallPathString必填

        iso安装路径。

      • nameString必填

        资源名称

      • descriptionString

        资源的详细描述

      • createDateTimestamp必填

        创建时间

      • lastOpDateTimestamp必填

        最后一次修改时间

请求地址

PUT/zstack/v1/cdp-backups/actions

/zstack/v1/cdp-backups/actions

操作 ID

CreateVmFromCdpBackup

永久链接

请求示例

curl -X PUT 'http://{host}/zstack/v1/cdp-backups/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"name":"<name>","groupId":1,"cdpTaskUuid":"<cdpTaskUuid>","instanceOfferingUuid":"<instanceOfferingUuid>","defaultL3NetworkUuid":"<defaultL3NetworkUuid>","l3NetworkUuids":["<l3NetworkUuids>"],"type":"<type>","zoneUuid":"<zoneUuid>","clusterUuid":"<clusterUuid>","hostUuid":"<hostUuid>","primaryStorageUuidForRootVolume":"<primaryStorageUuidForRootVolume>","primaryStorageUuidForDataVolume":"<primaryStorageUuidForDataVolume>","recoverBandwidth":1,"description":"<description>","rootVolumeSystemTags":["<rootVolumeSystemTags>"],"dataVolumeSystemTags":["<dataVolumeSystemTags>"],"resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

响应示例

200
{ "inventory": { "uuid": "ecadf3712d373abebb48671015a49e2c", "name": "Test-VM", "description": "web server VM", "zoneUuid": "5274961ea09834f6bdc757ec9b1d205f", "clusterUuid": "6c00cd0c676e3b5397f9e635a1357336", "imageUuid": "e9316bbaf94a37dea9a41b8a42e30b3d", "hostUuid": "7f2a8fe14f863e43b95b4e204d2b6073", "lastHostUuid": "804827a4304e309a85efb214e32edd80", "instanceOfferingUuid": "7f8ece5779ef31bab691585ffc693b91", "rootVolumeUuid": "a2b37cf28a9834da826e14e5fd7a97c6", "platform": "Linux", "defaultL3NetworkUuid": "68bca6897c4f300881985f028e61ca92", "type": "UserVm", "hypervisorType": "KVM", "memorySize": 8.589934592E9, "cpuNum": 1.0, "allocatorStrategy": "LastHostPreferredAllocatorStrategy", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM", "state": "Running", "vmNics": [ { "uuid": "645496bd84373644a52a1e62229cbb07", "vmInstanceUuid": "ecadf3712d373abebb48671015a49e2c", "usedIpUuid": "b89e21d52dbb3037a3ee585b253396f2", "l3NetworkUuid": "68bca6897c4f300881985f028e61ca92", "ip": "192.168.1.10", "mac": "00:0c:29:bd:99:fc", "netmask": "255.255.255.0", "gateway": "192.168.1.1", "deviceId": 0.0, "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM" } ], "allVolumes": [ { "uuid": "a2b37cf28a9834da826e14e5fd7a97c6", "name": "Root-Volume-For-VM-ecadf3712d373abebb48671015a49e2c", "primaryStorageUuid": "3626202657933f2cb13df025773d9aa9", "vmInstanceUuid": "ecadf3712d373abebb48671015a49e2c", "rootImageUuid": "e9316bbaf94a37dea9a41b8a42e30b3d", "installPath": "/zstack_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-a2b37cf28a9834da826e14e5fd7a97c6/a2b37cf28a9834da826e14e5fd7a97c6.qcow2", "type": "Root", "format": "qcow2", "size": 1.073741824E11, "actualSize": 2.147483648E10, "deviceId": 0.0, "state": "Enabled", "status": "Ready", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM" } ] } }

变更历史

此 API 暂无变更历史记录。

查看全部变更历史