Skip to main content
Platform O&M/Backup Management/Backup Service (Plus)/Backup Service Operations
POSTBackup Service OperationsSince 5.1.0SynchronousAuth Required

CreateVmFromVolumeBackup

CreateVmFromVolumeBackup

Execution Availability

Try It Out

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

Path Parameters

Request Inputs

Path Parameters

  • backupUuidStringRequired

    The backup UUID.

Body Fields

  • paramsObjectRequired

    Request body parameter object.

    • nameStringRequired

      The VM instance name.

    • backupStorageUuidString

      Optional. The backup storage UUID.

    • instanceOfferingUuidStringRequired

      The instance offering UUID.

    • defaultL3NetworkUuidString

      Optional. The UUID of the default L3 network.

    • l3NetworkUuidsListRequired

      The L3 network UUID list.

    • typeString

      Optional. The VM instance type.

    • zoneUuidString

      Optional. The zone UUID.

    • clusterUuidString

      Optional. The cluster UUID.

    • hostUuidString

      Optional. The host UUID.

    • primaryStorageUuidForRootVolumeString

      Optional. The UUID of the primary storage which the root volume resides on.

    • descriptionString

      Optional. The description of the VM instance.

    • rootVolumeSystemTagsList

      Optional. The system tag of the root volume.

    • resourceUuidString

      Optional.

    • systemTagsList

      Optional. The system tag.

    • tagUuidsList

      Optional. The tag UUID list.

    • strategyString

      Optional. The VM creation strategy.

  • userTagsList

    Optional. The user tag.

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 VM instance UUID.

    • nameStringRequired

      The VM instance name.

    • descriptionStringRequired

      The VM instance description.

    • zoneUuidStringRequired

      The zone UUID.

    • clusterUuidStringRequired

      The cluster UUID.

    • imageUuidStringRequired

      The image UUID.

    • hostUuidStringRequired

      The host UUID.

    • lastHostUuidStringRequired

      最近一次主机UUID。

    • instanceOfferingUuidStringRequired

      The instance offering UUID.

    • rootVolumeUuidStringRequired

      The root volume UUID.

    • 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 creation time.

    • lastOpDateTimestampRequired

      The last operation time.

    • stateStringRequired

      当前状态。

    • guestOsTypeStringRequired

      No description provided.

    • vmNicsListRequired

      See vmNics

      • uuidStringRequired

        The UUID of the NIC of the VM instance.

      • 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

        类型。

      • stateStringRequired

        The state of the vmNics.

      • createDateTimestampRequired

        The time when the NIC was created.

      • lastOpDateTimestampRequired

        The time when the NIC was last modified.

      • usedIpsListRequired

        See usedIps

        • uuidStringRequired

          The UUID of the volume.

        • ipRangeUuidStringRequired

          The UUID of the ip range.

        • l3NetworkUuidStringRequired

          The UUID of the L3network.

        • ipVersionIntegerRequired

          IP版本。

        • ipStringRequired

          来源IP地址。

        • netmaskStringRequired

          No description provided.

        • gatewayStringRequired

          No description provided.

        • usedForStringRequired

          已使用用于。

        • ipInLonglongRequired

          No description provided.

        • vmNicUuidStringRequired

          The UUID of the vmNic.

        • createDateTimestampRequired

          The creation time.

        • lastOpDateTimestampRequired

          The last operation time.

    • allVolumesListRequired

      See allVolumes

      • uuidStringRequired

        The UUID of the volume.

      • nameStringRequired

        The name of the volume.

      • descriptionStringRequired

        The detailed description of the volume.

      • 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 volume was created.

      • lastOpDateTimestampRequired

        The time when the volume was last modified.

      • isShareableBooleanRequired

        是否可分享。

      • volumeQosStringRequired

        No description provided.

      • lastDetachDateTimestampRequired

        最近一次detach时间。

      • lastVmInstanceUuidStringRequired

        最近一次云主机实例UUID。

    • vmCdRomsListRequired

      See vmCdRoms

      • uuidStringRequired

        The UUID of the volume.

      • vmInstanceUuidStringRequired

        The UUID of the VM instance.

      • deviceIdIntegerRequired

        设备ID。

      • isoUuidStringRequired

        No description provided.

      • isoInstallPathStringRequired

        iso安装路径。

      • nameStringRequired

        The name of the volume.

      • descriptionStringRequired

        The detailed description of the volume.

      • createDateTimestampRequired

        The creation time.

      • lastOpDateTimestampRequired

        The last operation time.

Endpoint

POST/zstack/v1/vm-instances/from/vm-backup/{backupUuid}

/zstack/v1/vm-instances/from/vm-backup/{backupUuid}

Operation ID

CreateVmFromVolumeBackup

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/vm-instances/from/vm-backup/{backupUuid}' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"name":"<name>","backupStorageUuid":"<backupStorageUuid>","instanceOfferingUuid":"<instanceOfferingUuid>","defaultL3NetworkUuid":"<defaultL3NetworkUuid>","l3NetworkUuids":["<l3NetworkUuids>"],"type":"<type>","zoneUuid":"<zoneUuid>","clusterUuid":"<clusterUuid>","hostUuid":"<hostUuid>","primaryStorageUuidForRootVolume":"<primaryStorageUuidForRootVolume>","description":"<description>","rootVolumeSystemTags":["<rootVolumeSystemTags>"],"resourceUuid":"<resourceUuid>","systemTags":["<systemTags>"],"tagUuids":["<tagUuids>"],"strategy":"<strategy>"},"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "0a2cbf2edacc399cb9a7e6b2fa14602d", "name": "Test-VM", "description": "web server VM", "zoneUuid": "1086a7491b8c3fb9ab12192dc0fab906", "clusterUuid": "3e368e7f98913ec6bb20d6cc969cf50a", "imageUuid": "2ceb7086482d3b42ab56b9daa6fb4d44", "hostUuid": "d81f8599fd033183ab2d4bcafce233cc", "lastHostUuid": "2d9fd9b480be3fdd9df46548d9d178d5", "instanceOfferingUuid": "feba03817e0e326d827ebdb436786bad", "rootVolumeUuid": "2f368d0d8b4734b7b58e1c5cb2ec27c6", "platform": "Linux", "defaultL3NetworkUuid": "ecebe1b81b18351dbdf304622e9ada80", "type": "UserVm", "hypervisorType": "KVM", "memorySize": 8589934592, "cpuNum": 1, "allocatorStrategy": "LastHostPreferredAllocatorStrategy", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM", "state": "Running", "vmNics": [ { "uuid": "da1e1002fa2b387bbe389ce3bf10ba92", "vmInstanceUuid": "0a2cbf2edacc399cb9a7e6b2fa14602d", "usedIpUuid": "e8c56c6711e83896acb7413183726c1c", "l3NetworkUuid": "ecebe1b81b18351dbdf304622e9ada80", "ip": "192.168.1.10", "mac": "00:0c:29:bd:99:fc", "netmask": "255.255.255.0", "gateway": "192.168.1.1", "deviceId": 0, "state": "enable", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM" } ], "allVolumes": [ { "uuid": "2f368d0d8b4734b7b58e1c5cb2ec27c6", "name": "Root-Volume-For-VM-0a2cbf2edacc399cb9a7e6b2fa14602d", "primaryStorageUuid": "890196bf1b5a308da1c75eb61ff441a3", "vmInstanceUuid": "0a2cbf2edacc399cb9a7e6b2fa14602d", "rootImageUuid": "2ceb7086482d3b42ab56b9daa6fb4d44", "installPath": "/zstack_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-2f368d0d8b4734b7b58e1c5cb2ec27c6/2f368d0d8b4734b7b58e1c5cb2ec27c6.qcow2", "type": "Root", "format": "qcow2", "size": 107374182400, "actualSize": 21474836480, "deviceId": 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