CreateVmInstanceFromVolumeSnapshot
CreateVmInstanceFromVolumeSnapshot
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Path Parameters
Request Inputs
Path Parameters
volumeSnapshotUuidStringRequiredThe snapshot group UUID.
Body Fields
paramsObjectRequiredRequest body parameter object.
nameStringRequiredThe resource name.
descriptionStringOptional. Optional. The detailed description of the resource.
instanceOfferingUuidStringOptional. The instance offering UUID.
cpuNumIntegerOptional. The number of CPU cores.
memorySizeLongOptional. The memory size.
l3NetworkUuidsListRequiredThe L3 network UUID.
typeStringOptional. The VM type. This is a reserved field.
platformStringThe VM platform type.
zoneUuidStringOptional. The zone UUID.
clusterUuidStringOptional. The cluster UUID.
hostUuidStringOptional. The host UUID.
primaryStorageUuidStringOptional. The UUID of the primary storage.
defaultL3NetworkUuidStringOptional. The default L3 network UUID.
strategyStringOptional. The policy that specifies whether to start a VM instance when the instance is created.
resourceUuidStringOptional. The resource UUID.
tagUuidsListOptional. The tag UUIDs.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/vm-instances/from/volume-snapshots/{volumeSnapshotUuid}
/zstack/v1/vm-instances/from/volume-snapshots/{volumeSnapshotUuid}
Request Example
curl -X POST 'http://{host}/zstack/v1/vm-instances/from/volume-snapshots/{volumeSnapshotUuid}' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"name":"<name>","description":"<description>","instanceOfferingUuid":"<instanceOfferingUuid>","cpuNum":1,"memorySize":1,"l3NetworkUuids":["<l3NetworkUuids>"],"type":"<type>","platform":"<platform>","zoneUuid":"<zoneUuid>","clusterUuid":"<clusterUuid>","hostUuid":"<hostUuid>","primaryStorageUuid":"<primaryStorageUuid>","defaultL3NetworkUuid":"<defaultL3NetworkUuid>","strategy":"<strategy>","resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "uuid": "109d10001c5c3553a7f2333e6a48610a", "name": "Test-VM", "description": "web server VM", "zoneUuid": "f31cb809cf0b3c668953e2507d5467b2", "clusterUuid": "fdfdf92e7bbe3212ab6530b11d8e0af5", "imageUuid": "96acc892dd793fb98c1924d54eb27a88", "hostUuid": "8eb85f51f10c30c0a6305b73d2002899", "lastHostUuid": "59ae08c1f6ed3638b6e4aa35b5a30d2e", "instanceOfferingUuid": "8b6d6aabad773972a0549539099e3e68", "rootVolumeUuid": "70eda0fe06163e67accf01a266fd5274", "platform": "Linux", "defaultL3NetworkUuid": "5ec42284ceaa3ad18f2b498e98ab6acc", "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": "b6d840187f1932209c21888923f5f35e", "vmInstanceUuid": "109d10001c5c3553a7f2333e6a48610a", "usedIpUuid": "54e8db987a4a333c80a87e4a84ab7675", "l3NetworkUuid": "5ec42284ceaa3ad18f2b498e98ab6acc", "ip": "192.168.1.10", "mac": "00:0c:29:bd:99:fc", "hypervisorType": "KVM", "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": "70eda0fe06163e67accf01a266fd5274", "name": "Root-Volume-For-VM-109d10001c5c3553a7f2333e6a48610a", "primaryStorageUuid": "0739abbe904639649da74cdcf0abd25f", "vmInstanceUuid": "109d10001c5c3553a7f2333e6a48610a", "rootImageUuid": "96acc892dd793fb98c1924d54eb27a88", "installPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-70eda0fe06163e67accf01a266fd5274/70eda0fe06163e67accf01a266fd5274.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.
