Compute Management/VM Related Interfaces
PUTVM Related InterfacesSince 3.7.0SynchronousAuth Required
Set Virtual Machine Console Mode
Set Virtual Machine Console Mode
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Path Parameters
Request Inputs
Path Parameters
uuidStringRequiredUUID of the resource, uniquely identifying the resource
Body Fields
modeStringRequired模式。
systemTagsList系统标签。
userTagsList用户标签。
Responses
Endpoint
PUT/zstack/v1/vm-instances/{uuid}/actions
/zstack/v1/vm-instances/{uuid}/actions
Request Example
curl -X PUT 'http://{host}/zstack/v1/vm-instances/{uuid}/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"mode":"<mode>","systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "uuid": "bd5f6b44171130a389d39318c49f338c", "name": "Test-VM", "description": "web server VM", "zoneUuid": "ae3bc988c4ec3c1cb4d3998099499ecb", "clusterUuid": "2e8dda4c14093d8bac5e2a0c0543483c", "imageUuid": "6cb82e96abd3374bbdc8bc927a86cad6", "hostUuid": "cadb2c70ab9f33b4a3c33d5b09369572", "lastHostUuid": "8ba7ab53d75f3881853138acdbe4eb65", "instanceOfferingUuid": "a13d6f6bb99830a2b097bccfc634ca36", "rootVolumeUuid": "f4324804b25236ffaf75f827300bd3cb", "platform": "Linux", "defaultL3NetworkUuid": "5d74add19ca63d63994ff87a64d12747", "type": "UserVm", "hypervisorType": "KVM", "memorySize": 8589934592, "cpuNum": 1, "allocatorStrategy": "LastHostPreferredAllocatorStrategy", "createDate": "Nov 14, 2017 2:20:57 PM", "lastOpDate": "Nov 14, 2017 2:20:57 PM", "state": "Stopped", "vmNics": [ { "uuid": "b80845c40f1237839ecb623a792f895c", "vmInstanceUuid": "bd5f6b44171130a389d39318c49f338c", "usedIpUuid": "506c07c24d363c1c9eeac5416dadb23d", "l3NetworkUuid": "5d74add19ca63d63994ff87a64d12747", "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 2:20:57 PM", "lastOpDate": "Nov 14, 2017 2:20:57 PM" } ], "allVolumes": [ { "uuid": "f4324804b25236ffaf75f827300bd3cb", "name": "Root-Volume-For-VM-bd5f6b44171130a389d39318c49f338c", "primaryStorageUuid": "6a431d5d6e153d5d80746aa06d64d80b", "vmInstanceUuid": "bd5f6b44171130a389d39318c49f338c", "diskOfferingUuid": "79c4d5de73e33508b8413528a3d5fa26", "rootImageUuid": "6cb82e96abd3374bbdc8bc927a86cad6", "installPath": "/zstack_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-f4324804b25236ffaf75f827300bd3cb/f4324804b25236ffaf75f827300bd3cb.qcow2", "type": "Root", "format": "qcow2", "size": 107374182400, "actualSize": 21474836480, "deviceId": 0, "state": "Enabled", "status": "Ready", "createDate": "Nov 14, 2017 2:20:57 PM", "lastOpDate": "Nov 14, 2017 2:20:57 PM" } ] } }Change History
This API has no change history records yet.
