计算管理/虚拟机相关接口
POSTVM Related Interfaces起始版本 3.9.0同步需要认证
创建FT虚拟机
创建FT虚拟机
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
请求参数
请求体字段
nameString必填资源名称。
instanceOfferingUuidString实例offering UUID。
cpuNumInteger暂无描述。
memorySizeLong内存大小。
imageUuidString必填镜像UUID。
响应状态
请求地址
POST/zstack/v1/vm-instances/fault-tolerance
/zstack/v1/vm-instances/fault-tolerance
请求示例
curl -X POST 'http://{host}/zstack/v1/vm-instances/fault-tolerance' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"name":"<name>","instanceOfferingUuid":"<instanceOfferingUuid>","cpuNum":1,"memorySize":1,"imageUuid":"<imageUuid>","l3NetworkUuids":["<l3NetworkUuids>"],"dataDiskOfferingUuids":["<dataDiskOfferingUuids>"],"zoneUuid":"<zoneUuid>","clusterUuid":"<clusterUuid>","hostUuid":"<hostUuid>","primaryStorageUuidForRootVolume":"<primaryStorageUuidForRootVolume>","description":"<description>","defaultL3NetworkUuid":"<defaultL3NetworkUuid>","rootVolumeSystemTags":["<rootVolumeSystemTags>"],"dataVolumeSystemTags":["<dataVolumeSystemTags>"],"resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"],"systemTags":["<systemTags>"],"userTags":["<userTags>"],"strategy":"<strategy>","type":"<type>"}'
响应示例
200{ "primaryVmInventory": { "uuid": "2d62fd64016b3e1297efed88bfee8f3d", "name": "Test-VM", "description": "web server VM", "zoneUuid": "d63f4978a99b3911a79b8298660658da", "clusterUuid": "8c61901b64a2371abe0c9be588343da9", "imageUuid": "86de69d705e538f7b0a94f63f13f5e63", "hostUuid": "b6137d47d5ca34b7b67c2f88b1661bf0", "lastHostUuid": "80265be7bebe336eb87eee4f96fb41fb", "instanceOfferingUuid": "f6a0ef68fe7b332ea2a8b1e08ecc142a", "rootVolumeUuid": "d8be99a7405b38a98c066003daa0e515", "platform": "Linux", "defaultL3NetworkUuid": "53655a79af73382f87c5ff5010a1c4cc", "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": "Running", "allVolumes": [ { "uuid": "d8be99a7405b38a98c066003daa0e515", "name": "Root-Volume-For-VM-2d62fd64016b3e1297efed88bfee8f3d", "primaryStorageUuid": "ab385e443b3e3356b12ea36f81e0ffde", "vmInstanceUuid": "2d62fd64016b3e1297efed88bfee8f3d", "diskOfferingUuid": "8b03e36ce93b37dbb2825df535572700", "rootImageUuid": "86de69d705e538f7b0a94f63f13f5e63", "installPath": "/zstack_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-d8be99a7405b38a98c066003daa0e515/d8be99a7405b38a98c066003daa0e515.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" } ] }, "secondaryVmInventory": { "uuid": "5a6d990017e2324397fc89974351dbd5", "name": "Test-svm", "description": "web server svm", "zoneUuid": "cb4ec84375e0396597f86f8472fa0217", "clusterUuid": "19bf28a642733c7f8a09767255eb88ab", "imageUuid": "8f8a5f8e99293536862bf44b0e8e4a06", "hostUuid": "e0d755850cf637df8f7af1004222930d", "lastHostUuid": "190c220ae2323388aa9b6917f6b8608f", "instanceOfferingUuid": "ae9f7726ec1438fcb87574a212bd9f99", "rootVolumeUuid": "d8be99a7405b38a98c066003daa0e515", "platform": "Linux", "defaultL3NetworkUuid": "53655a79af73382f87c5ff5010a1c4cc", "type": "FaultToleranceVmGroup", "hypervisorType": "Ksvm", "memorySize": 8589934592, "cpuNum": 1, "allocatorStrategy": "LastHostPreferredAllocatorStrategy", "createDate": "Nov 14, 2017 2:20:57 PM", "lastOpDate": "Nov 14, 2017 2:20:57 PM", "state": "Running", "allVolumes": [ { "uuid": "d8be99a7405b38a98c066003daa0e515", "name": "Root-Volume-For-VM-2d62fd64016b3e1297efed88bfee8f3d", "primaryStorageUuid": "2f69982e2e91358abd3761dc9f4799a2", "vmInstanceUuid": "2d62fd64016b3e1297efed88bfee8f3d", "diskOfferingUuid": "3a3f0cc999ed3a379b0cd5e5900ac639", "rootImageUuid": "86de69d705e538f7b0a94f63f13f5e63", "installPath": "/zstack_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-d8be99a7405b38a98c066003daa0e515/d8be99a7405b38a98c066003daa0e515.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" } ] }, "faultToleranceVmGroupInventory": { "uuid": "b5428087c53939b9a0b85e322f1e7bb6", "name": "Test-ftVm", "description": "web server ftVm", "zoneUuid": "b441a4f72ac23f92be85f951a54b8ea7", "clusterUuid": "618e159139003cf1971132ec1f426456", "imageUuid": "4e57cd7ee15932e68eb87a7d1f9b03e0", "hostUuid": "6a849cdc9f8f359ba9d878e21fc18a15", "lastHostUuid": "24fcefebc2af3f61a8caecd2fd2cef2b", "instanceOfferingUuid": "04d2247fafbd3ba2a64d367f69b2d402", "rootVolumeUuid": "d8be99a7405b38a98c066003daa0e515", "platform": "Linux", "defaultL3NetworkUuid": "53655a79af73382f87c5ff5010a1c4cc", "type": "FaultToleranceVmGroup", "hypervisorType": "KftVm", "memorySize": 8589934592, "cpuNum": 1, "allocatorStrategy": "LastHostPreferredAllocatorStrategy", "createDate": "Nov 14, 2017 2:20:57 PM", "lastOpDate": "Nov 14, 2017 2:20:57 PM", "state": "Running", "vmNics": [ { "uuid": "e7be04a3db4f31ee9fd35feda0b9e3f6", "vmInstanceUuid": "2d62fd64016b3e1297efed88bfee8f3d", "usedIpUuid": "2baea67e32473aff96a40735735587ba", "l3NetworkUuid": "53655a79af73382f87c5ff5010a1c4cc", "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, "createDate": "Nov 14, 2017 2:20:57 PM", "lastOpDate": "Nov 14, 2017 2:20:57 PM" } ], "allVolumes": [ { "uuid": "d8be99a7405b38a98c066003daa0e515", "name": "Root-Volume-For-VM-2d62fd64016b3e1297efed88bfee8f3d", "primaryStorageUuid": "8a1c7e7eae623b3c827cee8679c03d85", "vmInstanceUuid": "2d62fd64016b3e1297efed88bfee8f3d", "diskOfferingUuid": "4fe96d078ecf3e94b69c6898e53131e0", "rootImageUuid": "86de69d705e538f7b0a94f63f13f5e63", "installPath": "/zstack_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-d8be99a7405b38a98c066003daa0e515/d8be99a7405b38a98c066003daa0e515.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" } ] } }变更历史
此 API 暂无变更历史记录。
