资源中心/云资源池/云主机相关接口
PUTVM Instance Operations起始版本 0.6同步需要认证
启动云主机
启动云主机
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
路径参数
请求参数
路径参数
uuidString必填云主机UUID
请求体字段
startvminstanceObject必填startvminstance 请求体结构
clusterUuidString集群UUID。若指定,云主机将在该集群启动
hostUuidString物理机UUID。若指定,云主机将在该物理机启动。该字段覆盖clusterUuid字段
systemTagsList系统标签
userTagsList用户标签
响应状态
请求地址
PUT/zstack/v1/vm-instances/{uuid}/actions
/zstack/v1/vm-instances/{uuid}/actions
请求示例
curl -X PUT 'http://{host}/zstack/v1/vm-instances/{uuid}/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"startvminstance":{"clusterUuid":"<clusterUuid>","hostUuid":"<hostUuid>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
响应示例
200{ "inventory": { "uuid": "4fe3f157d2ed3952a528f7a7ad66b458", "name": "Test-VM", "description": "web server VM", "zoneUuid": "05f33790e80833f09d1e41d5dcce1cdb", "clusterUuid": "ed1f4443dfe83da2a4682eea6a6ff8a4", "imageUuid": "9d708bf2d7793d41a8d6aa91ffd8c997", "hostUuid": "5822c13181e73c7e8542884ba85e9339", "lastHostUuid": "b3ead9d0161f3c228cc4d4663f4886a4", "instanceOfferingUuid": "2799e9b24b173e47b63d15ee1e37212d", "rootVolumeUuid": "53bd57a8d319373eb2e957bb34d10ad6", "platform": "Linux", "defaultL3NetworkUuid": "0ed1289e1a5f333f9defdec7a6fd5f74", "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": "b2293d252de931be87ca1ac4379269e9", "vmInstanceUuid": "4fe3f157d2ed3952a528f7a7ad66b458", "usedIpUuid": "78c4d1ced5cb3d5f89dabf4798819ecc", "l3NetworkUuid": "0ed1289e1a5f333f9defdec7a6fd5f74", "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": "53bd57a8d319373eb2e957bb34d10ad6", "name": "Root-Volume-For-VM-4fe3f157d2ed3952a528f7a7ad66b458", "primaryStorageUuid": "6d34e188053e31efb36aeae392a6d92e", "vmInstanceUuid": "4fe3f157d2ed3952a528f7a7ad66b458", "diskOfferingUuid": "44980553f47e3bfe94674c2004a9ffe7", "rootImageUuid": "9d708bf2d7793d41a8d6aa91ffd8c997", "installPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-53bd57a8d319373eb2e957bb34d10ad6/53bd57a8d319373eb2e957bb34d10ad6.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" } ] } }变更历史
此 API 暂无变更历史记录。
