vcenter vm hardware disk: create spec

The create_spec structure provides a specification for the configuration of a newly-created virtual disk.

Representation:

{
    "scsi"{
        "bus"1,
        "unit"1
    },
    "nvme"{
        "bus"1,
        "unit"1
    },
    "new_vmdk"{
        "name""string",
        "storage_policy"{
            "policy""obj-103"
        },
        "capacity"1
    },
    "backing"{
        "vmdk_file""string",
        "type""VMDK_FILE"
    },
    "ide"{
        "primary"true,
        "master"true
    },
    "type""IDE",
    "sata"{
        "bus"1,
        "unit"1
    }
}

Attributes:

Name Type Description
Required
scsi.bus long Bus number of the adapter to which the device should be attached.

sata.bus long Bus number of the adapter to which the device should be attached.

nvme.bus long Bus number of the adapter to which the device should be attached. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

backing.type string Backing type for the virtual disk.

Defines the valid backing types for a virtual disk. Value is one of:
VMDK_FILE: Virtual disk is backed by a VMDK file.

new_vmdk.storage_policy.policy string Identifier of the storage policy which should be associated with the VMDK file. This attribute was added in vSphere API 6.7.

When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vcenter.StoragePolicy. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vcenter.StoragePolicy.

Optional
type string Type of host bus adapter to which the device should be attached.

Optional. If unset, guest-specific default values will be used.

ide ide_address_spec Address for attaching the device to a virtual IDE adapter.

Optional. It is only relevant when type has value IDE. If unset, the server will choose an available address; if none is available, the request will fail.

ide.primary boolean Flag specifying whether the device should be attached to the primary or secondary IDE adapter of the virtual machine.

Optional. If unset, the server will choose a adapter with an available connection. If no IDE connections are available, the request will be rejected.

ide.master boolean Flag specifying whether the device should be the master or slave device on the IDE adapter.

Optional. If unset, the server will choose an available connection type. If no IDE connections are available, the request will be rejected.

scsi scsi_address_spec Address for attaching the device to a virtual SCSI adapter.

Optional. It is only relevant when type has value SCSI. If unset, the server will choose an available address; if none is available, the request will fail.

scsi.unit long Unit number of the device.

Optional. If unset, the server will choose an available unit number on the specified adapter. If there are no available connections on the adapter, the request will be rejected.

sata sata_address_spec Address for attaching the device to a virtual SATA adapter.

Optional. It is only relevant when type has value SATA. If unset, the server will choose an available address; if none is available, the request will fail.

sata.unit long Unit number of the device.

Optional. If unset, the server will choose an available unit number on the specified adapter. If there are no available connections on the adapter, the request will be rejected.

nvme nvme_address_spec Address for attaching the device to a virtual NVMe adapter. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Optional. It is only relevant when type has value NVME. If unset, the server will choose an available address; if none is available, the request will fail.

nvme.unit long Unit number of the device. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Optional. If unset, the server will choose an available unit number on the specified adapter. If there are no available connections on the adapter, the request will be rejected.

backing backing_spec Existing physical resource backing for the virtual disk. Exactly one of backing or new_vmdk must be specified.

Optional. If unset, the virtual disk will not be connected to an existing backing.

backing.vmdk_file string Path of the VMDK file backing the virtual disk.

Optional. It is only relevant when type has value VMDK_FILE. This field is optional and it is only relevant when the value of type is VMDK_FILE.

new_vmdk vmdk_create_spec Specification for creating a new VMDK backing for the virtual disk. Exactly one of backing or new_vmdk must be specified.

Optional. If unset, a new VMDK backing will not be created.

new_vmdk.name string Base name of the VMDK file. The name should not include the '.vmdk' file extension.

Optional. If unset, a name (derived from the name of the virtual machine) will be chosen by the server.

new_vmdk.capacity long Capacity of the virtual disk backing in bytes.

Optional. If unset, defaults to a guest-specific capacity.

new_vmdk.storage_policy storage_policy_spec The storage_policy_spec structure contains information about the storage policy that is to be associated the with VMDK file. This attribute was added in vSphere API 6.7.

Optional. If unset the default storage policy of the target datastore (if applicable) is applied. Currently a default storage policy is only supported by object based datastores : VVol & vSAN. For non- object datastores, if unset then no storage policy would be associated with the VMDK file.