VirtualDisk

VirtualDisk
VirtualDisk

This data object type contains information about a disk in a virtual machine.

The virtual disk backing object types describe the different virtual disk backings available. The disk format version in each case describes the version of the format that is used.

Supported virtual disk backings:

Sparse disk format, version 1 and 2
The virtual disk backing grows when needed. Supported only for VMware Server.
Flat disk format, version 1 and 2
The virtual disk backing is preallocated. Version 1 is supported only for VMware Server.
Space efficient sparse disk format
The virtual disk backing grows on demand and incorporates additional space optimizations.
Raw disk format, version 2
The virtual disk backing uses a full physical disk drive to back the virtual disk. Supported only for VMware Server.
Partitioned raw disk format, version 2
The virtual disk backing uses one or more partitions on a physical disk drive to back a virtual disk. Supported only for VMware Server.
Raw disk mapping, version 1
The virtual disk backing uses a raw device mapping to back the virtual disk. Supported for ESX Server 2.5 and 3.x.
AllOf
This class requires all of the following:
JSON Example
{
    "_typeName": "string",
    "key": 0,
    "deviceInfo": {
        "_typeName": "string",
        "label": "string",
        "summary": "string"
    },
    "backing": {
        "_typeName": "string"
    },
    "connectable": {
        "_typeName": "string",
        "migrateConnect": "string",
        "startConnected": false,
        "allowGuestControl": false,
        "connected": false,
        "status": "string"
    },
    "slotInfo": {
        "_typeName": "string"
    },
    "controllerKey": 0,
    "unitNumber": 0,
    "numaNode": 0,
    "deviceGroupInfo": {
        "_typeName": "string",
        "groupInstanceKey": 0,
        "sequenceId": 0
    },
    "capacityInKB": 0,
    "capacityInBytes": 0,
    "shares": {
        "_typeName": "string",
        "shares": 0,
        "level": "string"
    },
    "storageIOAllocation": {
        "_typeName": "string",
        "limit": 0,
        "shares": {
            "_typeName": "string",
            "shares": 0,
            "level": "string"
        },
        "reservation": 0
    },
    "diskObjectId": "string",
    "vFlashCacheConfigInfo": {
        "_typeName": "string",
        "vFlashModule": "string",
        "reservationInMB": 0,
        "cacheConsistencyType": "string",
        "cacheMode": "string",
        "blockSizeInKB": 0
    },
    "iofilter": [
        "string"
    ],
    "vDiskId": {
        "_typeName": "string",
        "id": "string"
    },
    "vDiskVersion": 0,
    "nativeUnmanagedLinkedClone": false,
    "independentFilters": [
        {
            "_typeName": "string"
        }
    ],
    "guestReadOnly": false
}
integer As int64 As int64
capacityInKB
Required

Deprecated as of vSphere API 5.5, use capacityInBytes.

Capacity of this virtual disk in kilobytes.

Information might be lost when actual disk size is rounded off to kilobytes. If the disk is on a Virtual Volume datastore the disk size must be a multiple of a megabyte.

integer As int64 As int64
capacityInBytes
Optional

Capacity of this virtual disk in bytes.

Server will always populate this property. Clients must initialize it when creating a new non -RDM disk or in case they want to change the current capacity of an existing virtual disk, but can omit it otherwise. If the disk is on a Virtual Volume datastore the disk size must be a multiple of a megabyte.

shares
Optional

Specification of shares.

Shares are used to determine relative allocation between resource consumers. In general, a consumer with more shares gets proportionally more of the resource, subject to certain other constraints.

storageIOAllocation
Optional

Deprecated as of vSphere8.0 U3, and there is no replacement for it.

The IOAllocationInfo specifies the shares, limit and reservation for storage I/O resource.

The storage I/O resource is allocated to virtual machines based on their shares, limit and reservation. The reservation is currently exposed only at the host level for local and shared datastores. We do not support storage I/O resource management on resource pools.

Each virtual machine has one IOAllocationInfo object per virtual disk. For example, we can specify that a virtual machine has 500 shares on the first virtual disk, 1000 shares on the second virtual disk, etc.

string
diskObjectId
Optional

Deprecated as of vSphere API 6.5, use vDiskId.

Virtual disk durable and unmutable identifier.

Virtual disk has a UUID field but that can be set through VirtualDiskManager APIs. This identifier is a universally unique identifier which is not settable. VirtualDisk can remain in existence even if it is not associated with VM.

vFlashCacheConfigInfo
Optional

Data object describes the vFlash cache configuration on this virtual disk.

array of string
iofilter
Optional

IDs of the IO Filters associated with the virtual disk.

See id. This information is provided when retrieving configuration information for an existing virtual machine. The client cannot modify this information on a virtual machine.

vDiskId
Optional

This data object type describes an identifier class which is globally unique to identify the associated object.

integer As int32 As int32
vDiskVersion
Optional

Disk descriptor version of the virtual disk.

Since: vSphere API Release 8.0.1.0

boolean
nativeUnmanagedLinkedClone
Optional

Indicates whether a disk with VirtualDiskFlatVer2BackingInfo backing is a linked clone from an unmanaged delta disk and hence the parent chain to this delta disk will not be available.

independentFilters
Optional

The IDs of the independent filters associated with the virtual disk.

This information is provided when retrieving configuration information for an existing virtual machine. The client cannot modify this information on a virtual machine.

Since: vSphere API Release 7.0.2.1

boolean
guestReadOnly
Optional

Flag to indicate whether a disk should be presented to the guest in read-only mode (limited by choice of adapter).

Since: vSphere API Release 8.0.2.0