Inventory

Properties

Name Description Optional Valid Value Starting Version
uuid The UUID. For more information, see Resource Property. 0.6
name The name. For more information, see Resource Property. 0.6
description The description. For more information, see Resource Property. Yes 0.6
primaryStorageUuid The UUID of the primary storage where the volume is located. For more information, see Primary Storage. 0.6
vmInstanceUuid The UUID of the VM instance to which the volume is attached. If the volume is not attached to any VM instance, this parameter is NULL. For more information, see Attached VM Instance. Yes 0.6
diskOfferingUuid The disk offering UUID. This parameter is valid if the volume is created from disk offering. Yes 0.6
rootImageUuid The image UUID. This parameter is valid if the volume is created from image. Yes 0.6
installPath The volume installation path on the primary storage. 0.6
type The volume type.
  • Root
  • Data
0.6
format The volume format. For more information, see Format.
  • qcow2
0.6
size The virtual size of the volume. Unit: byte. 0.6
actualSize 0.6
isShareable 0.6
deviceId The device ID. For more information, see Device ID. Yes 0.6
state The volume state. For more information, see State.
  • Enabled
  • Disabled
0.6
status The volume status. For more information, see Status.
  • Creating
  • Ready
  • NotInstantiated
0.6
createDate The creation date. For more information, see Resource Property. 0.6
lastOpDate The last operation date. For more information, see Resource Property. 0.6

Sample

{
    "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
}

Attached VM Instance

A data volume can be attached to a running or stopped VM instance. However, a data volume can only be attached to one VM instance at any given time. After a data volume is attached to a VM instance, the UUID of the data volume will show up in the vmInstanceUuid field. A data volume can be detached from a VM instance and then attached to the other as long as these two VM instances are of the same hypervisors type. A root volume is always attached to its owner VM instance and cannot be detached.

Format

The volume format reveals the relationship between a volume and a hypervisor type, specifying what VM instances of which hypervisor type that a volume can be attached.

Device ID

The device ID shows the order that volumes are attached to a VM instance. Root volumes are always the first volume to be attached. Therefore, root volumes have a fixed device ID 0. Data volumes might have device IDs 1, 2, 3 ... N, depending on the sequence they are attached to a VM instance. The device ID can be used to identify the disk letter of a volume in the guest operating system. For example, in Linux, 0 usually means /dev/xvda, 1 usually means /dev/xvdb, and so forth.

State

A volume can have the following two states:
  • Enabled:

    Indicates that the volume can be attached to a VM instance.

  • Disabled:

    Indicates that the volume cannot be attached to a VM instance. However, an attached data volume can be detached even the data volume is in Disabled state.

Status

Status shows the lifecycle of a volume.
  • NotInstantiated:

    A specific status for only data volumes. Data volumes of this status are just database records. Data volumes of the NotInstantiated status can be attached to VM instances of any hypervisor types. After a data volume is attached to a VM instance, the hypervisorType field of the data volume will store the hypervisor type of the VM instance, and will be instantiated to concrete binaries on primary storage. Meanwhile, the status will be changed to Ready. Then, the data volume can only be re-attached to VM instances of the same hypervisor type.

  • Ready:

    Indicates that the volume is already instantiated on primary storage and is ready to use.

  • Creating:

    Indicates that the volume is being created from image or volume snapshot, and is not ready to use.

The status transition of a volume is shown in Figure 1.
Figure 1. Volume Status Transition Diagram