Skip to content

暂停虚拟机API文档 #68

@luchukun

Description

@luchukun

描述

暂停虚拟机

API

org.zstack.kvm.APISPauseVmInstanceMsg

举例(Example)

用户可以使用SuspendVmInstance暂停一个处于运行状态的虚拟机. 例如:

SuspendVmInstance uuid=d911e5f5dc674370b273b4f511058fec

返回结果:
{
"inventory": {
"allVolumes": [
{
"actualSize": 1099563008,
"createDate": "Nov 5, 2016 12:29:31 PM",
"description": "Root volume for VM[uuid:d911e5f5dc674370b273b4f511058fec]",
"deviceId": 0,
"format": "qcow2",
"installPath": "/zstack_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-07e91f0990fc401387d4263051a248f2/07e91f0990fc401387d4263051a248f2.qcow2",
"lastOpDate": "Nov 5, 2016 12:29:32 PM",
"name": "ROOT-for-lucky",
"primaryStorageUuid": "c74b252a9c62486dbe752878a4dad1f9",
"rootImageUuid": "78819898580d48808fcc1a5e2c36c210",
"size": 42949672960,
"state": "Enabled",
"status": "Ready",
"type": "Root",
"uuid": "07e91f0990fc401387d4263051a248f2",
"vmInstanceUuid": "d911e5f5dc674370b273b4f511058fec"
}
],
"allocatorStrategy": "LeastVmPreferredHostAllocatorStrategy",
"clusterUuid": "312e0c28846c42c0b4b3674eae100632",
"cpuNum": 1,
"cpuSpeed": 1,
"createDate": "Nov 5, 2016 12:29:31 PM",
"defaultL3NetworkUuid": "921679f8011840429f40727cd8b9d606",
"description": "",
"hostUuid": "9390e5ad0e6c44b89727e7f383d6416c",
"hypervisorType": "KVM",
"imageUuid": "78819898580d48808fcc1a5e2c36c210",
"instanceOfferingUuid": "64a8b35974b34732b5a8b1665f173938",
"lastHostUuid": "9390e5ad0e6c44b89727e7f383d6416c",
"lastOpDate": "Nov 5, 2016 1:39:05 PM",
"memorySize": 1073741824,
"name": "lucky",
"platform": "Linux",
"rootVolumeUuid": "07e91f0990fc401387d4263051a248f2",
"state": "Suspended",
"type": "UserVm",
"uuid": "d911e5f5dc674370b273b4f511058fec",
"vmNics": [
{
"createDate": "Nov 5, 2016 12:29:31 PM",
"deviceId": 0,
"gateway": "172.20.0.1",
"ip": "172.20.68.28",
"l3NetworkUuid": "921679f8011840429f40727cd8b9d606",
"lastOpDate": "Nov 5, 2016 12:29:31 PM",
"mac": "fa:dc:ad:c7:93:00",
"netmask": "255.255.0.0",
"uuid": "64b8a43af86f4440a50054da219a80c6",
"vmInstanceUuid": "d911e5f5dc674370b273b4f511058fec"
}
],
"zoneUuid": "75230372b0aa4aa89bb3983120931344"
},
"success": true
}
返回结果中显示虚拟机 state:suspended

参数(Parameters)

名字 描述 可选的参数 起始支持版本
uuid 要暂停虚拟机的uuid 1.8

备注

暂停的虚拟机处于“”Suspended“状态

Feature_link

https://github.com/zxwing/premium/issues/1073

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions