Skip to main content
Platform O&M/Backup Management/Continuous Data Protection (CDP)/CDP Operations
PUTCDP OperationsSince 4.5.0SynchronousAuth Required

CreateVmFromCdpBackup

CreateVmFromCdpBackup

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • paramsObjectRequired

    Request body parameter object.

    • nameStringRequired

      The name of the resource.

    • groupIdlongRequired

      The ID of the recovery points.

    • cdpTaskUuidStringRequired

      The UUID of the CDP task.

    • instanceOfferingUuidStringRequired

      The UUID of the instance offering.

    • defaultL3NetworkUuidString

      Optional. The UUID of the default L3 network.

    • l3NetworkUuidsListRequired

      The UUID list of L3 network.

    • typeString

      Optional. The type of the VM.

    • zoneUuidString

      Optional. The UUID of the zone.

    • clusterUuidString

      Optional. The UUID of the cluster.

    • hostUuidString

      Optional. The UUID of the host.

    • primaryStorageUuidForRootVolumeString

      Optional. The UUID of the primary storage for root volume.

    • primaryStorageUuidForDataVolumeString

      Optional. The UUID of the primary storage for data volume.

    • recoverBandwidthlong

      Optional. The recover bandwidth.

    • descriptionString

      Optional. Optional. The detailed description of the resource.

    • rootVolumeSystemTagsList

      Optional. The system tags of the root volume.

    • dataVolumeSystemTagsList

      Optional. The system tags of the data volume.

    • resourceUuidString

      Optional. The UUID of the resource.

    • tagUuidsList

      Optional. The UUID list of the tags.

  • systemTagsList

    Optional. The system tags of the VM.

  • userTagsList

    Optional. The user tags of the VM.

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    操作是否成功。

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventoryVmInstanceInventoryRequired

    See inventory.

    • uuidStringRequired

      The UUID of the resource.

    • nameStringRequired

      The name of the resource.

    • descriptionString

      Optional. The detailed description of the resource.

    • zoneUuidStringRequired

      The UUID of the zone.

    • clusterUuidStringRequired

      The UUID of the cluster.

    • imageUuidStringRequired

      The UUID of the image.

    • hostUuidStringRequired

      The UUID of the host.

    • lastHostUuidStringRequired

      最近一次主机UUID。

    • instanceOfferingUuidStringRequired

      The UUID of the instance offering.

    • rootVolumeUuidStringRequired

      The UUID of the root volume.

    • platformStringRequired

      平台。

    • architectureStringRequired

      No description provided.

    • defaultL3NetworkUuidStringRequired

      No description provided.

    • typeStringRequired

      类型。

    • hypervisorTypeStringRequired

      No description provided.

    • memorySizeLongRequired

      内存大小。

    • cpuNumIntegerRequired

      No description provided.

    • cpuSpeedLongRequired

      No description provided.

    • allocatorStrategyStringRequired

      No description provided.

    • createDateTimestampRequired

      The time when the resource is created.

    • lastOpDateTimestampRequired

      The time when the resource is last modified.

    • stateStringRequired

      当前状态。

    • guestOsTypeStringRequired

      No description provided.

    • vmNicsListRequired

      See vmNics.

      • uuidStringRequired

        The UUID of the resource.

      • vmInstanceUuidStringRequired

        The UUID of the VM instance.

      • l3NetworkUuidStringRequired

        The UUID of the L3 network.

      • ipStringRequired

        来源IP地址。

      • macStringRequired

        No description provided.

      • hypervisorTypeStringRequired

        No description provided.

      • netmaskStringRequired

        No description provided.

      • gatewayStringRequired

        No description provided.

      • metaDataStringRequired

        元数据。

      • ipVersionIntegerRequired

        IP版本。

      • driverTypeStringRequired

        No description provided.

      • internalNameStringRequired

        内部名称。

      • deviceIdIntegerRequired

        设备ID。

      • typeStringRequired

        类型。

      • createDateTimestampRequired

        The time when the resource is created.

      • lastOpDateTimestampRequired

        The time when the resource is last modified.

      • usedIpsListRequired

        See usedIps.

        • uuidStringRequired

          The UUID of the resource.

        • ipRangeUuidStringRequired

          The UUID of the IP range.

        • l3NetworkUuidStringRequired

          The UUID of the L3 network.

        • ipVersionIntegerRequired

          IP版本。

        • ipStringRequired

          来源IP地址。

        • netmaskStringRequired

          No description provided.

        • gatewayStringRequired

          No description provided.

        • usedForStringRequired

          已使用用于。

        • ipInLonglongRequired

          No description provided.

        • vmNicUuidStringRequired

          The UUID of the VM NIC.

        • createDateTimestampRequired

          The time when the resource is created.

        • lastOpDateTimestampRequired

          The time when the resource is last modified.

    • allVolumesListRequired

      See allVolumes.

      • uuidStringRequired

        The UUID of the resource.

      • nameStringRequired

        The name of the resource.

      • descriptionString

        Optional. The detailed description of the resource.

      • primaryStorageUuidStringRequired

        The UUID of the primary storage.

      • vmInstanceUuidStringRequired

        The UUID of the VM instance.

      • diskOfferingUuidStringRequired

        The UUID of the disk offering.

      • rootImageUuidStringRequired

        根镜像UUID。

      • installPathStringRequired

        安装路径。

      • typeStringRequired

        类型。

      • formatStringRequired

        数据格式或导出格式。

      • sizeLongRequired

        返回记录数。

      • actualSizeLongRequired

        实际大小。

      • deviceIdIntegerRequired

        设备ID。

      • stateStringRequired

        当前状态。

      • statusStringRequired

        状态信息。

      • createDateTimestampRequired

        The time when the resource is created.

      • lastOpDateTimestampRequired

        The time when the resource is last modified.

      • isShareableBooleanRequired

        是否可分享。

      • volumeQosStringRequired

        No description provided.

      • lastDetachDateTimestampRequired

        最近一次detach时间。

      • lastVmInstanceUuidStringRequired

        最近一次云主机实例UUID。

    • vmCdRomsListRequired

      See vmCdRoms.

      • uuidStringRequired

        The UUID of the resource.

      • vmInstanceUuidStringRequired

        The UUID of theVM instance.

      • deviceIdIntegerRequired

        设备ID。

      • isoUuidStringRequired

        No description provided.

      • isoInstallPathStringRequired

        iso安装路径。

      • nameStringRequired

        The name of the resource.

      • descriptionString

        Optional. The detailed description of the resource.

      • createDateTimestampRequired

        The time when the resource is created.

      • lastOpDateTimestampRequired

        The time when the resource is last modified.

Endpoint

PUT/zstack/v1/cdp-backups/actions

/zstack/v1/cdp-backups/actions

Operation ID

CreateVmFromCdpBackup

Permalink

Request Example

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>"]}'

Response Example

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" } ] } }

Change History

This API has no change history records yet.

View all change history