CreateVmFromVmBackup
CreateVmFromVmBackup
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Path Parameters
Request Inputs
Path Parameters
groupUuidStringRequiredThe UUID of the VM backup group.
Body Fields
paramsObjectRequiredRequest body parameter object.
nameStringRequiredThe name of the VM.
backupStorageUuidStringOptional. The UUID of the backup storage.
instanceOfferingUuidStringRequiredThe UUID of the instance offering.
l3NetworkUuidsListOptional. The UUIDs of L3 networks.
vmNicParamsStringOptional.The information of the vmNic
typeStringOptional. The type of the VM instance.
zoneUuidStringOptional. The zone UUID.
clusterUuidStringOptional. The cluster UUID.
hostUuidStringOptional. The host UUID.
primaryStorageUuidForRootVolumeStringOptional. The primary storage used to host the root volume.
primaryStorageUuidForDataVolumeStringOptional. The primary storage used to host data volumes.
descriptionStringOptional. The detailed description of the VM.
rootVolumeSystemTagsListOptional. The system tags of the root volume.
dataVolumeSystemTagsListOptional. The system tags of the data volume.
defaultL3NetworkUuidStringThe UUID of the L3 network.
resourceUuidStringOptional.
tagUuidsListOptional. The tagUuids.
strategyStringOptional. The srategy to create vms.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/vm-instances/from/vm-backups/{groupUuid}
/zstack/v1/vm-instances/from/vm-backups/{groupUuid}
Request Example
curl -X POST 'http://{host}/zstack/v1/vm-instances/from/vm-backups/{groupUuid}' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"name":"<name>","backupStorageUuid":"<backupStorageUuid>","instanceOfferingUuid":"<instanceOfferingUuid>","l3NetworkUuids":["<l3NetworkUuids>"],"vmNicParams":"<vmNicParams>","type":"<type>","zoneUuid":"<zoneUuid>","clusterUuid":"<clusterUuid>","hostUuid":"<hostUuid>","primaryStorageUuidForRootVolume":"<primaryStorageUuidForRootVolume>","primaryStorageUuidForDataVolume":"<primaryStorageUuidForDataVolume>","description":"<description>","rootVolumeSystemTags":["<rootVolumeSystemTags>"],"dataVolumeSystemTags":["<dataVolumeSystemTags>"],"defaultL3NetworkUuid":"<defaultL3NetworkUuid>","resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"],"strategy":"<strategy>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "uuid": "a1c07d683f693f6e9f2d7f9a499c7840", "name": "Test-VM", "description": "web server VM", "zoneUuid": "1e48b41ec4b63660b38a72d271c0164b", "clusterUuid": "f29498f04b1e3c319bdaeb6b3f8259f3", "imageUuid": "5c07704333c532e8b402b6b3ddb89315", "hostUuid": "e18cf66eedb3306686a1d4685bbb63af", "lastHostUuid": "4834161c409a34b6a84e40d71d85f714", "instanceOfferingUuid": "f53ad9f147203b499dfbd93ce41b7a8e", "rootVolumeUuid": "24b9fcb69f123ad6b3ddfffed96d2882", "platform": "Linux", "defaultL3NetworkUuid": "d50554f493153be78f6740e18e598046", "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": "9856d36e40783d669b9e4f1de41d1a17", "vmInstanceUuid": "a1c07d683f693f6e9f2d7f9a499c7840", "usedIpUuid": "be02105c2a223492a91fb09ba664ecb1", "l3NetworkUuid": "d50554f493153be78f6740e18e598046", "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": "24b9fcb69f123ad6b3ddfffed96d2882", "name": "Root-Volume-For-VM-a1c07d683f693f6e9f2d7f9a499c7840", "primaryStorageUuid": "ae47a25fd7cf3a349035d01060a8a224", "vmInstanceUuid": "a1c07d683f693f6e9f2d7f9a499c7840", "rootImageUuid": "5c07704333c532e8b402b6b3ddb89315", "installPath": "/zstack_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-24b9fcb69f123ad6b3ddfffed96d2882/24b9fcb69f123ad6b3ddfffed96d2882.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.
