计算管理/虚拟机相关接口
PUTVM Related Interfaces起始版本 0.6同步需要认证
重启虚拟机
重启虚拟机
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
路径参数
请求参数
路径参数
uuidString必填虚拟机UUID
请求体字段
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 '{"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
响应示例
200{ "inventory": { "uuid": "c8ce67b231bc3a7b998fc5c514fa521a", "name": "Test-VM", "description": "web server VM", "zoneUuid": "dd0c0aae391d39b7b7904146604e5e61", "clusterUuid": "5adf2ae4f6d5339d80c8e698551358fc", "imageUuid": "2ad3afd4feac3e618b2603c42d6b2693", "hostUuid": "1d7c0568f02e3c85a1fd79aa0c7fc60d", "lastHostUuid": "cb0d0894cae53b83b44fe90923b31f6d", "instanceOfferingUuid": "5aefd43e8c833cebab918cdae7a5e128", "rootVolumeUuid": "627c0f9203ad3a5ea4ad443674aea323", "platform": "Linux", "defaultL3NetworkUuid": "e03922c991a03dc1b4e3b8988d06f65c", "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": "1bbcdfc8626930bc8113fb9ec805bfea", "vmInstanceUuid": "c8ce67b231bc3a7b998fc5c514fa521a", "usedIpUuid": "b73449f396c035c39f1074c5499589f7", "l3NetworkUuid": "e03922c991a03dc1b4e3b8988d06f65c", "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": "627c0f9203ad3a5ea4ad443674aea323", "name": "Root-Volume-For-VM-c8ce67b231bc3a7b998fc5c514fa521a", "primaryStorageUuid": "b0f0f4cbc97a31aaaaaa2e83e769c378", "vmInstanceUuid": "c8ce67b231bc3a7b998fc5c514fa521a", "diskOfferingUuid": "59c4db99fb6e3504ae5fe4e5a05dadd8", "rootImageUuid": "2ad3afd4feac3e618b2603c42d6b2693", "installPath": "/zstack_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-627c0f9203ad3a5ea4ad443674aea323/627c0f9203ad3a5ea4ad443674aea323.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" } ] } }变更历史
此 API 暂无变更历史记录。
