清单

属性

名字 描述 可选的 可选的参数值 起始支持版本
uuid 请参见 资源属性 0.6
name 请参见 资源属性 0.6
description 请参见 资源属性 0.6
primaryStorageUuid 云盘所在的主存储的uuid, 请参见 primary storage 0.6
vmInstanceUuid 云盘所挂载的虚拟机的uuid,如果没有挂载虚拟机为NULL; 请参见 attach VM 0.6
diskOfferingUuid 云盘规格(disk offering)的uuid, 如果云盘是从云盘规格创建出来的 0.6
rootImageUuid 镜像(image)的uuid, 如果云盘是从一个镜像创建出来的 0.6
installPath 云盘在主存储上的安装路径 0.6
type 云盘的类型
  • Root
  • Data
0.6
format 请参见 format
  • qcow2
0.6
size 云盘的虚拟大小, 单位是字节 0.6
actualSize 0.6
isShareable 0.6
deviceId 请参见 device id 0.6
state 请参见 state
  • Enabled
  • Disabled
0.6
status 请参见 status
  • Creating
  • Ready
  • NotInstantiated
0.6
createDate 请参见 资源属性 0.6
lastOpDate 请参见 资源属性 0.6

示例

{
    "inventories": [
        {
            "actualSize": 454033408,
            "createDate": "Nov 14, 2017 1:21:32 PM",
            "description": "Root volume for VM[uuid:7096021b405e41a2afa22d0f6d7ab6f8]",
            "deviceId": 0,
            "format": "qcow2",
            "installPath": "/Cloud_ps_nxs/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-c33a897
db91e461a9cbc011b0aa441c9/c33a897db91e461a9cbc011b0aa441c9.qcow2",
            "isShareable": false,
            "lastOpDate": "Nov 14, 2017 1:21:33 PM",
            "name": "ROOT-for-pub",
            "primaryStorageUuid": "cae8726c90784ba0946f852952731268",
            "rootImageUuid": "e29e00c1d18a486b8802a8f53c6a6e4f",
            "size": 4195352576,
            "state": "Enabled",
            "status": "Ready",
            "type": "Root",
            "uuid": "c33a897db91e461a9cbc011b0aa441c9",
            "vmInstanceUuid": "7096021b405e41a2afa22d0f6d7ab6f8"
        }
    ],
    "success": true
}

云盘快照清单(VolumeSnapshot Inventory)

名字 描述 可选的 可选的参数值 起始支持版本
uuid 请参见 资源属性 0.6
name 请参见 资源属性 0.6
description 请参见 资源属性 0.6
format 请参见 format 0.6
groupUuid 0.6
latest 0.6
parentUuid 0.6
primaryStorageInstallPath 0.6
primaryStorageUuid 云盘所在的主存储的uuid, 请参见 primary storage 0.6
size 云盘的虚拟大小, 单位是字节 0.6
state 请参见 state 0.6
status 请参见 status 0.6
treeUuid 快照树UUID 0.6
type 云盘的虚拟化类型 0.6
volumeType 云盘类型
  • Root
  • Data
0.6
volumeUuid 云盘UUID 0.6
groupBy 以字段分组,相当于MySQL中的group by关键字。例如groupBy=type 0.6
createDate 请参见 资源属性 0.6
lastOpDate 请参见 资源属性 0.6
userTags 用户标签,请参见 创建用户标签(CreateUserTag) 0.6
systemTags 系统标签,请参见 创建系统标签(CreateSystemTag) 0.6
示例
{
    "inventories": [
        {
            "backupStorageRefs": [],
            "createDate": "Sep 12, 2019 5:26:00 PM",
            "description": "",
            "format": "qcow2",
            "groupUuid": "d6939afab0824cab8e9a57a25686a7d4",
            "lastOpDate": "Sep 12, 2019 5:26:18 PM",
            "latest": false,
            "name": "Snapshot-2-云盘-1",
            "parentUuid": "d403f271636a488fbd25afd74ca589f8",
            "primaryStorageInstallPath": "/Cloud_ps/dataVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-1b746a6adb584ee89c65ab51c3634416/snapshots/d403f271636a488fbd25afd74ca589f8.qcow2",
            "primaryStorageUuid": "b1296dc880984edeb6ec05d2c9d7e243",
            "size": 200704,
            "state": "Enabled",
            "status": "Ready",
            "treeUuid": "864f7a38d38842968ebd7d40121ee25e",
            "type": "Hypervisor",
            "uuid": "2b47066db7c641019495204a39d00abb",
            "volumeType": "Data",
            "volumeUuid": "1b746a6adb584ee89c65ab51c3634416"
        },
        {
            "backupStorageRefs": [],
            "createDate": "Sep 12, 2019 5:26:18 PM",
            "description": "",
            "format": "qcow2",
            "groupUuid": "63854129e8aa42258aa83d0d9d45032c",
            "lastOpDate": "Sep 12, 2019 5:26:28 PM",
            "latest": false,
            "name": "Snapshot-4-云盘-1",
            "parentUuid": "2b47066db7c641019495204a39d00abb",
            "primaryStorageInstallPath": "/Cloud_ps/dataVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-1b746a6adb584ee89c65ab51c3634416/snapshots/2b47066db7c641019495204a39d00abb.qcow2",
            "primaryStorageUuid": "b1296dc880984edeb6ec05d2c9d7e243",
            "size": 200704,
            "state": "Enabled",
            "status": "Ready",
            "treeUuid": "864f7a38d38842968ebd7d40121ee25e",
            "type": "Hypervisor",
            "uuid": "75c17cf55b2a4a70877e274d5c5ec77b",
            "volumeType": "Data",
            "volumeUuid": "1b746a6adb584ee89c65ab51c3634416"
        },
        {
            "backupStorageRefs": [],
            "createDate": "Sep 12, 2019 5:25:39 PM",
            "description": "",
            "format": "qcow2",
            "groupUuid": "e5bad705d61a424aa703578f86ce8522",
            "lastOpDate": "Sep 12, 2019 5:26:00 PM",
            "latest": false,
            "name": "Snapshot-1-ROOT-for-VM-1",
            "primaryStorageInstallPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-b2026ce722584b0383b247640e2961e2/b2026ce722584b0383b247640e2961e2.qcow2",
            "primaryStorageUuid": "b1296dc880984edeb6ec05d2c9d7e243",
            "size": 16781312,
            "state": "Enabled",
            "status": "Ready",
            "treeUuid": "dd4dee32f5bc49b5a0c74a645d15d949",
            "type": "Hypervisor",
            "uuid": "ce2fe3b2faba4b32b1c2fadbd462cc6d",
            "volumeType": "Root",
            "volumeUuid": "b2026ce722584b0383b247640e2961e2"
        },
        {
            "backupStorageRefs": [],
            "createDate": "Sep 12, 2019 5:25:39 PM",
            "description": "",
            "format": "qcow2",
            "groupUuid": "e5bad705d61a424aa703578f86ce8522",
            "lastOpDate": "Sep 12, 2019 5:26:00 PM",
            "latest": false,
            "name": "Snapshot-1-云盘-1",
            "primaryStorageInstallPath": "/Cloud_ps/dataVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-1b746a6adb584ee89c65ab51c3634416/1b746a6adb584ee89c65ab51c3634416.qcow2",
            "primaryStorageUuid": "b1296dc880984edeb6ec05d2c9d7e243",
            "size": 6295552,
            "state": "Enabled",
            "status": "Ready",
            "treeUuid": "864f7a38d38842968ebd7d40121ee25e",
            "type": "Hypervisor",
            "uuid": "d403f271636a488fbd25afd74ca589f8",
            "volumeType": "Data",
            "volumeUuid": "1b746a6adb584ee89c65ab51c3634416"
        }
    ],
    "success": true
}

快照树清单(VolumeSnapshotTree Inventory)

名字 描述 可选的 可选的参数值 起始支持版本
uuid 请参见 资源属性 0.6
current 0.6
tree 0.6
volumeUuid 云盘UUID 0.6
status 请参见 state 0.6
groupBy 以字段分组,相当于MySQL中的group by关键字。例如groupBy=type 0.6
createDate 请参见 资源属性 0.6
lastOpDate 请参见 资源属性 0.6
userTags 用户标签,请参见 创建用户标签(CreateUserTag) 0.6
systemTags 系统标签,请参见 创建系统标签(CreateSystemTag) 0.6
示例
{
    "inventories": [
        {
            "createDate": "Sep 12, 2019 5:25:39 PM",
            "current": true,
            "lastOpDate": "Sep 12, 2019 5:26:28 PM",
            "status": "Completed",
            "tree": {
                "children": [
                    {
                        "children": [
                            {
                                "children": [
                                    {
                                        "children": [],
                                        "inventory": {
                                            "backupStorageRefs": [],
                                            "createDate": "Sep 12, 2019 5:26:28 PM",
                                            "description": "",
                                            "format": "qcow2",
                                            "groupUuid": "ce6bbd10e379472886e4d74448e43066",
                                            "lastOpDate": "Sep 12, 2019 5:26:28 PM",
                                            "latest": true,
                                            "name": "Snapshot-5-云盘-1",
                                            "parentUuid": "75c17cf55b2a4a70877e274d5c5ec77b",
                                            "primaryStorageInstallPath": "/Cloud_ps/dataVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-1b746a6adb584ee89c65ab51c3634416/snapshots/75c17cf55b2a4a70877e274d5c5ec77b.qcow2",
                                            "primaryStorageUuid": "b1296dc880984edeb6ec05d2c9d7e243",
                                            "size": 200704,
                                            "state": "Enabled",
                                            "status": "Ready",
                                            "treeUuid": "864f7a38d38842968ebd7d40121ee25e",
                                            "type": "Hypervisor",
                                            "uuid": "88864416e95846f68b5e881cdca1eedf",
                                            "volumeType": "Data",
                                            "volumeUuid": "1b746a6adb584ee89c65ab51c3634416"
                                        },
                                        "parentUuid": "75c17cf55b2a4a70877e274d5c5ec77b"
                                    }
                                ],
                                "inventory": {
                                    "backupStorageRefs": [],
                                    "createDate": "Sep 12, 2019 5:26:18 PM",
                                    "description": "",
                                    "format": "qcow2",
                                    "groupUuid": "63854129e8aa42258aa83d0d9d45032c",
                                    "lastOpDate": "Sep 12, 2019 5:26:28 PM",
                                    "latest": false,
                                    "name": "Snapshot-4-云盘-1",
                                    "parentUuid": "2b47066db7c641019495204a39d00abb",
                                    "primaryStorageInstallPath": "/Cloud_ps/dataVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-1b746a6adb584ee89c65ab51c3634416/snapshots/2b47066db7c641019495204a39d00abb.qcow2",
                                    "primaryStorageUuid": "b1296dc880984edeb6ec05d2c9d7e243",
                                    "size": 200704,
                                    "state": "Enabled",
                                    "status": "Ready",
                                    "treeUuid": "864f7a38d38842968ebd7d40121ee25e",
                                    "type": "Hypervisor",
                                    "uuid": "75c17cf55b2a4a70877e274d5c5ec77b",
                                    "volumeType": "Data",
                                    "volumeUuid": "1b746a6adb584ee89c65ab51c3634416"
                                },
                                "parentUuid": "2b47066db7c641019495204a39d00abb"
                            }
                        ],
                        "inventory": {
                            "backupStorageRefs": [],
                            "createDate": "Sep 12, 2019 5:26:00 PM",
                            "description": "",
                            "format": "qcow2",
                            "groupUuid": "d6939afab0824cab8e9a57a25686a7d4",
                            "lastOpDate": "Sep 12, 2019 5:26:18 PM",
                            "latest": false,
                            "name": "Snapshot-2-云盘-1",
                            "parentUuid": "d403f271636a488fbd25afd74ca589f8",
                            "primaryStorageInstallPath": "/Cloud_ps/dataVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-1b746a6adb584ee89c65ab51c3634416/snapshots/d403f271636a488fbd25afd74ca589f8.qcow2",
                            "primaryStorageUuid": "b1296dc880984edeb6ec05d2c9d7e243",
                            "size": 200704,
                            "state": "Enabled",
                            "status": "Ready",
                            "treeUuid": "864f7a38d38842968ebd7d40121ee25e",
                            "type": "Hypervisor",
                            "uuid": "2b47066db7c641019495204a39d00abb",
                            "volumeType": "Data",
                            "volumeUuid": "1b746a6adb584ee89c65ab51c3634416"
                        },
                        "parentUuid": "d403f271636a488fbd25afd74ca589f8"
                    }
                ],
                "inventory": {
                    "backupStorageRefs": [],
                    "createDate": "Sep 12, 2019 5:25:39 PM",
                    "description": "",
                    "format": "qcow2",
                    "groupUuid": "e5bad705d61a424aa703578f86ce8522",
                    "lastOpDate": "Sep 12, 2019 5:26:00 PM",
                    "latest": false,
                    "name": "Snapshot-1-云盘-1",
                    "primaryStorageInstallPath": "/Cloud_ps/dataVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-1b746a6adb584ee89c65ab51c3634416/1b746a6adb584ee89c65ab51c3634416.qcow2",
                    "primaryStorageUuid": "b1296dc880984edeb6ec05d2c9d7e243",
                    "size": 6295552,
                    "state": "Enabled",
                    "status": "Ready",
                    "treeUuid": "864f7a38d38842968ebd7d40121ee25e",
                    "type": "Hypervisor",
                    "uuid": "d403f271636a488fbd25afd74ca589f8",
                    "volumeType": "Data",
                    "volumeUuid": "1b746a6adb584ee89c65ab51c3634416"
                }
            },
            "uuid": "864f7a38d38842968ebd7d40121ee25e",
            "volumeUuid": "1b746a6adb584ee89c65ab51c3634416"
        },
        {
            "createDate": "Sep 12, 2019 5:25:39 PM",
            "current": true,
            "lastOpDate": "Sep 12, 2019 5:26:28 PM",
            "status": "Completed",
            "tree": {
                "children": [
                    {
                        "children": [
                            {
                                "children": [
                                    {
                                        "children": [
                                            {
                                                "children": [],
                                                "inventory": {
                                                    "backupStorageRefs": [],
                                                    "createDate": "Sep 12, 2019 5:26:28 PM",
                                                    "description": "",
                                                    "format": "qcow2",
                                                    "groupUuid": "ce6bbd10e379472886e4d74448e43066",
                                                    "lastOpDate": "Sep 12, 2019 5:26:28 PM",
                                                    "latest": true,
                                                    "name": "Snapshot-5-ROOT-for-VM-1",
                                                    "parentUuid": "6daba46d758445d4af7812738ba93e7d",
                                                    "primaryStorageInstallPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-b2026ce722584b0383b247640e2961e2/snapshots/6daba46d758445d4af7812738ba93e7d.qcow2",
                                                    "primaryStorageUuid": "b1296dc880984edeb6ec05d2c9d7e243",
                                                    "size": 200704,
                                                    "state": "Enabled",
                                                    "status": "Ready",
                                                    "treeUuid": "dd4dee32f5bc49b5a0c74a645d15d949",
                                                    "type": "Hypervisor",
                                                    "uuid": "9eac8e8d51fc450d91e713bc4fdd20a2",
                                                    "volumeType": "Root",
                                                    "volumeUuid": "b2026ce722584b0383b247640e2961e2"
                                                },
                                                "parentUuid": "6daba46d758445d4af7812738ba93e7d"
                                            }
                                        ],
                                        "inventory": {
                                            "backupStorageRefs": [],
                                            "createDate": "Sep 12, 2019 5:26:18 PM",
                                            "description": "",
                                            "format": "qcow2",
                                            "groupUuid": "63854129e8aa42258aa83d0d9d45032c",
                                            "lastOpDate": "Sep 12, 2019 5:26:28 PM",
                                            "latest": false,
                                            "name": "Snapshot-4-ROOT-for-VM-1",
                                            "parentUuid": "d0ea588f6c5d4e539a54ff4f64112e86",
                                            "primaryStorageInstallPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-b2026ce722584b0383b247640e2961e2/snapshots/d0ea588f6c5d4e539a54ff4f64112e86.qcow2",
                                            "primaryStorageUuid": "b1296dc880984edeb6ec05d2c9d7e243",
                                            "size": 200704,
                                            "state": "Enabled",
                                            "status": "Ready",
                                            "treeUuid": "dd4dee32f5bc49b5a0c74a645d15d949",
                                            "type": "Hypervisor",
                                            "uuid": "6daba46d758445d4af7812738ba93e7d",
                                            "volumeType": "Root",
                                            "volumeUuid": "b2026ce722584b0383b247640e2961e2"
                                        },
                                        "parentUuid": "d0ea588f6c5d4e539a54ff4f64112e86"
                                    }
                                ],
                                "inventory": {
                                    "backupStorageRefs": [],
                                    "createDate": "Sep 12, 2019 5:26:07 PM",
                                    "description": "",
                                    "format": "qcow2",
                                    "lastOpDate": "Sep 12, 2019 5:26:18 PM",
                                    "latest": false,
                                    "name": "Snapshot-3",
                                    "parentUuid": "400cabe156424e7282bb4606c40907dc",
                                    "primaryStorageInstallPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-b2026ce722584b0383b247640e2961e2/snapshots/400cabe156424e7282bb4606c40907dc.qcow2",
                                    "primaryStorageUuid": "b1296dc880984edeb6ec05d2c9d7e243",
                                    "size": 200704,
                                    "state": "Enabled",
                                    "status": "Ready",
                                    "treeUuid": "dd4dee32f5bc49b5a0c74a645d15d949",
                                    "type": "Hypervisor",
                                    "uuid": "d0ea588f6c5d4e539a54ff4f64112e86",
                                    "volumeType": "Root",
                                    "volumeUuid": "b2026ce722584b0383b247640e2961e2"
                                },
                                "parentUuid": "400cabe156424e7282bb4606c40907dc"
                            }
                        ],
                        "inventory": {
                            "backupStorageRefs": [],
                            "createDate": "Sep 12, 2019 5:26:00 PM",
                            "description": "",
                            "format": "qcow2",
                            "groupUuid": "d6939afab0824cab8e9a57a25686a7d4",
                            "lastOpDate": "Sep 12, 2019 5:26:07 PM",
                            "latest": false,
                            "name": "Snapshot-2-ROOT-for-VM-1",
                            "parentUuid": "ce2fe3b2faba4b32b1c2fadbd462cc6d",
                            "primaryStorageInstallPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-b2026ce722584b0383b247640e2961e2/snapshots/ce2fe3b2faba4b32b1c2fadbd462cc6d.qcow2",
                            "primaryStorageUuid": "b1296dc880984edeb6ec05d2c9d7e243",
                            "size": 200704,
                            "state": "Enabled",
                            "status": "Ready",
                            "treeUuid": "dd4dee32f5bc49b5a0c74a645d15d949",
                            "type": "Hypervisor",
                            "uuid": "400cabe156424e7282bb4606c40907dc",
                            "volumeType": "Root",
                            "volumeUuid": "b2026ce722584b0383b247640e2961e2"
                        },
                        "parentUuid": "ce2fe3b2faba4b32b1c2fadbd462cc6d"
                    }
                ],
                "inventory": {
                    "backupStorageRefs": [],
                    "createDate": "Sep 12, 2019 5:25:39 PM",
                    "description": "",
                    "format": "qcow2",
                    "groupUuid": "e5bad705d61a424aa703578f86ce8522",
                    "lastOpDate": "Sep 12, 2019 5:26:00 PM",
                    "latest": false,
                    "name": "Snapshot-1-ROOT-for-VM-1",
                    "primaryStorageInstallPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-b2026ce722584b0383b247640e2961e2/b2026ce722584b0383b247640e2961e2.qcow2",
                    "primaryStorageUuid": "b1296dc880984edeb6ec05d2c9d7e243",
                    "size": 16781312,
                    "state": "Enabled",
                    "status": "Ready",
                    "treeUuid": "dd4dee32f5bc49b5a0c74a645d15d949",
                    "type": "Hypervisor",
                    "uuid": "ce2fe3b2faba4b32b1c2fadbd462cc6d",
                    "volumeType": "Root",
                    "volumeUuid": "b2026ce722584b0383b247640e2961e2"
                }
            },
            "uuid": "dd4dee32f5bc49b5a0c74a645d15d949",
            "volumeUuid": "b2026ce722584b0383b247640e2961e2"
        }
    ],
    "success": true
}

挂载的虚拟机(Attached VM)

数据云盘可以被挂载到正在运行的(Running)或者已经停止的(Stopped)云主机上, 但在同一时间一个云盘只能挂载到一个云主机上; 挂载后云盘的uuid会出现在vmInstanceUuid中。 数据云盘可以从一个云主机上卸载,然后挂载到另一个云主机上,但是这两个云主机需要是相同类型的虚拟机管理程序管理的。根云盘作为云主机的附属,不能卸载。

格式(Format)

云盘格式揭示了云盘和虚拟机管理程序之间的关系, 指示了该云盘可以挂载到哪种虚拟机管理程序管理的云主机上。

设备ID(Device ID)

设备号表明了云盘挂载到云主机的顺序。根云盘有固定的设备ID 0,因为第一个被挂载的云盘总是根云盘; 数据云盘则取决于挂载到云主机的顺序,可能有1, 2,3 …… N这样的设备ID。 设备ID可以用来识别云盘在客户操作系统(guest operating system)中的盘符(disk letter); 例如,在Linux系统中, 0通常代表/dev/xvda, 1通常代表/dev/xvdb,依次类推。

可用状态(State)

云盘有两种可用状态:
  • Enabled:

    启用(Enabled)状态下,允许云盘被挂载到云主机上。

  • Disabled:

    禁用(Disabled)状态下,不允许云盘被挂载到云主机上; 然而,数据云盘总是可以被卸载,即使已经是禁用状态的数据云盘也可以被卸载。

连接状态(Status)

连接状态体现了云盘的生命周期:
  • NotInstantiated:

    数据云盘特有的状态。在这个连接状态中,数据云盘只存在于数据库的表记录中。NotInstantiated状态的数据云盘可以挂载到任何类型虚拟机管理程序管理的云主机上;当挂载到云主机上后,数据云盘的hypervisorType域会存储云主机对应的虚拟机管理程序类型,在主存储上被实例化为虚拟机管理程序类型的实际二进制文件,同时连接状态会改为就绪(Ready);在这之后,这些数据云盘就只能被重新挂载到相同类型虚拟机管理程序管理的云主机上了。

  • Ready:

    在这种状态时,云盘已经在主存储上实例化;已就绪可以使用。

  • Creating:

    在这种状态时,正在从镜像或云盘快照创建云盘;未就绪不能使用。

连接状态转换图如Figure 1所示:
Figure 1. 云盘连接状态转换图