Compute Management/VM Related Interfaces
PUTVM Related InterfacesSince 4.2.0SynchronousAuth Required
Set VM Boot Volume
Set VM Boot Volume
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Path Parameters
Request Inputs
Path Parameters
vmInstanceUuidStringRequiredVirtual Machine UUID
Body Fields
setvmbootvolumeObjectRequiredsetvmbootvolume request body object.
volumeUuidStringRequiredVolume UUID
systemTagsListSystem Tag
userTagsListUser Tag
Responses
Endpoint
PUT/zstack/v1/vm-instances/{vmInstanceUuid}/actions
/zstack/v1/vm-instances/{vmInstanceUuid}/actions
Request Example
curl -X PUT 'http://{host}/zstack/v1/vm-instances/{vmInstanceUuid}/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"setvmbootvolume":{"volumeUuid":"<volumeUuid>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "uuid": "bfd333f1eb8f31d687970d256394d979", "name": "Test-VM", "description": "web server VM", "zoneUuid": "40347b5f09f83f918c1952285c1d8a63", "clusterUuid": "31b9eccc4dda33c6886655921be64fe2", "imageUuid": "7846fccd62da381da73698f1df7a9b9f", "hostUuid": "4f64d011dce63c00b9bdf4196830e24a", "lastHostUuid": "b7388961594e38dd920042599e384b99", "instanceOfferingUuid": "a9f18b722ff53f5598941b56bdd013c7", "rootVolumeUuid": "ecafc5a76ff83d64af698dee9401d548", "platform": "Linux", "defaultL3NetworkUuid": "14fcf6baf571378eb0eac9bbbd59d92c", "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": "Stopped", "vmNics": [ { "uuid": "c810740f3eae39cc8547ec29e994f46e", "vmInstanceUuid": "bfd333f1eb8f31d687970d256394d979", "usedIpUuid": "f6a911e405243835876e440f3c029c4f", "l3NetworkUuid": "14fcf6baf571378eb0eac9bbbd59d92c", "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, "state": "enable", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM" } ], "allVolumes": [ { "uuid": "ecafc5a76ff83d64af698dee9401d548", "name": "Root-Volume-For-VM-bfd333f1eb8f31d687970d256394d979", "primaryStorageUuid": "fc819dfbacbf36de8773f64f290c3528", "vmInstanceUuid": "bfd333f1eb8f31d687970d256394d979", "diskOfferingUuid": "51d4f148cf043ebc9a3af0f444572be6", "rootImageUuid": "7846fccd62da381da73698f1df7a9b9f", "installPath": "/zstack_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-ecafc5a76ff83d64af698dee9401d548/ecafc5a76ff83d64af698dee9401d548.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.
