VStorageObjectAttachSpec

VStorageObjectAttachSpec
VStorageObjectAttachSpec

This data type defines the specification for one volume to be attached to virtual machine.

Since: vSphere API Release 9.1.0.0

AllOf
This class requires all of the following:
JSON Example
{
    "_typeName": "string",
    "volumeId": {
        "_typeName": "string",
        "id": "string"
    },
    "datastore": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    },
    "diskMode": "string",
    "sharing": "string",
    "controllerKey": 0,
    "unitNumber": 0
}
volumeId
Required

The ID of the virtual disk to be operated.

See ID

datastore
Required

datastore where the volume is located.

string
diskMode
Optional

The disk persistence mode.

Supported modes are listed in VirtualDiskModeEnum When unset, default mode is vim.vm.device.VirtualDiskOption#persistent (that also means dependent persistent to CNS) see VirtualDiskModeEnum

string
sharing
Optional

The sharing mode of the virtual disk.

Supported modes are listed in VirtualDiskSharingEnum When unset, default value is sharingNone See VirtualDiskSharingEnum

integer As int32 As int32
controllerKey
Optional

Key of the controller the disk will connect to.

It can be unset if there is only one controller (SCSI/SATA/NVMe) with the available slot in the virtual machine. If there are multiple SCSI/SATA/NVMe controllers available, user must specify the controller; if there is no available controllers, a MissingController fault will be thrown.

integer As int32 As int32
unitNumber
Optional

The unit number of the disk to be attached on its controller.

If unset, the next free slot on the specified controller or on the only available controller will be assigned to the attached disk.