Scripting Object - VcVirtualDiskManager

Scripting-object corresponding to
VirtualDiskManager
Attribute of
VcSdkConnection, VcServiceContent

Scripting Object Description

This managed object type provides a way to manage and manipulate virtual disks on datastores. The source and the destination names are in the form of a URL or a datastore path.

A URL has the form

scheme://authority/folder/path?dcPath=dcPath&dsName=dsName
where
  • scheme is http or https.
  • authority specifies the hostname or IP address of the VirtualCenter or ESX server and optionally the port.
  • dcPath is the inventory path to the Datacenter containing the Datastore.
  • dsName is the name of the Datastore.
  • path is a slash-delimited path from the root of the datastore.
  • A datastore path has the form

    [datastore] path
    where
  • datastore is the datastore name.
  • path is a slash-delimited path from the root of the datastore.
  • An example datastore path is "[storage] path/to/file.extension". A listing of all the files, disks and folders on a datastore can be obtained from the datastore browser.

    Attributes

    Name Type Description
    idString

    @since Unknown
    morefVcManagedObjectReference

    returns the ManagedObjectReference of this ManagedObject @since Unknown
    sdkConnectionVcSdkConnection

    @since Unknown
    sdkIdString

    @since Unknown
    typeStringDeprecated.

    Returns the name for the this managed object's vim type @since Unknown
    vimHostVcSdkConnection

    @since Unknown
    vimIdString

    @since Unknown
    vimTypeString

    @since Unknown

    Methods

    Methods defined in this Scripting Object
    _getRef, consolidateDisks_Task, copyVirtualDisk_Task, createChildDisk_Task, createTrigger, createVirtualDisk_Task, defragmentVirtualDisk_Task, deleteVirtualDisk_Task, disableUPIT_Task, eagerZeroVirtualDisk_Task, enableUPIT_Task, extendVirtualDisk_Task, importUnmanagedSnapshot, inflateVirtualDisk_Task, moveVirtualDisk_Task, optimizeEagerZeroVirtualDisk_Task, queryObjectInfo_Task, queryObjectTypes, queryVirtualDiskFragmentation, queryVirtualDiskGeometry, queryVirtualDiskInfo_Task, queryVirtualDiskUuid, releaseManagedSnapshot, reparentDisks_Task, revertToChildDisk_Task, setVirtualDiskUuid, shrinkVirtualDisk_Task, zeroFillVirtualDisk_Task

    releaseManagedSnapshot

    Release a snapshot previously imported with importUnmanagedSnapshot

    @since vSphere API 6.5

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter


    Return Value

    Type Description
    None

    _getRef

    @since Unknown

    Parameters

    NameTypeDescription
    None

    Return Value

    Type Description
    VcManagedObjectReference

    extendVirtualDisk_Task

    Expand the capacity of a virtual disk to the new capacity. If the eagerZero flag is not specified, - the extended disk region of a zerothick disk will be zeroedthick - the extended disk region of a eagerzerothick disk will be eagerzeroedthick - a thin-provisioned disk will always be extended as a thin-provisioned disk. If the eagerZero flag TRUE, the extended region of the disk will always be eagerly zeroed. If the eagerZero flag FALSE, the extended region of a zeroedthick or eagerzeroedthick the disk will not be eagerly zeroed. This condition has no effect on a thin source disk.

    The datacenter parameter may be omitted if a URL is used to name the disk.

    Requires Datastore.FileManagement privilege on the datastore where the virtual disk resides.

    @since VI API 2.5

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter

    arg2Number

    arg3Boolean


    Return Value

    Type Description
    VcTask

    defragmentVirtualDisk_Task

    Defragment a sparse virtual disk. This is defragmentation of the virtual disk file(s) in the host operating system, not defragmentation of the guest operating system filesystem inside the virtual disk.

    The datacenter parameter may be omitted if a URL is used to name the disk.

    Requires Datastore.FileManagement privilege on the datastore where the virtual disk resides.

    @since VI API 2.5

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter


    Return Value

    Type Description
    VcTask

    deleteVirtualDisk_Task

    Delete a virtual disk. All files relating to the disk will be deleted.

    The datacenter parameter may be omitted if a URL is used to name the disk.

    Requires Datastore.FileManagement privilege on the datastore where the virtual disk is removed.

    @since VI API 2.5

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter


    Return Value

    Type Description
    VcTask

    setVirtualDiskUuid

    Set the virtual disk SCSI inquiry page 0x83 data.

    The datacenter parameter may be omitted if a URL is used to name the disk.

    Requires Datastore.FileManagement privilege on the datastore where the virtual disk resides.

    @since VI API 2.5

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter

    arg2String


    Return Value

    Type Description
    None

    queryVirtualDiskUuid

    Get the virtual disk SCSI inquiry page 0x83 data.

    The datacenter parameter may be omitted if a URL is used to name the disk.

    Requires Datastore.FileManagement privilege on the datastore where the virtual disk resides.

    @since VI API 2.5

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter


    Return Value

    Type Description
    String

    queryVirtualDiskGeometry

    Get the disk geometry information for the virtual disk.

    The datacenter parameter may be omitted if a URL is used to name the disk.

    Requires Datastore.FileManagement privilege on the datastore where the virtual disk resides.

    @since VI API 2.5

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter


    Return Value

    Type Description
    VcHostDiskDimensionsChs

    revertToChildDisk_Task

    Revert a parent disk to the given child.

    Requires Datastore.FileManagement privilege on the datastores of both the parent and child virtual disks.

    @since vSphere API 6.0

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter

    arg2String

    arg3VcDatacenter


    Return Value

    Type Description
    VcTask

    disableUPIT_Task

    Collapse a UPIT archive back down into a single virtual disk.

    This call will collapse a UPIT archive back down into the virtual disk it came from.

    This copies a snapshot in the archive to be the contents of the virtual disk. @since vim unstable version

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter

    arg2String

    arg3Boolean


    Return Value

    Type Description
    VcTask

    queryObjectTypes

    Queries the host for the list of supported object types. @since vSphere API 6.5

    Parameters

    NameTypeDescription
    None

    Return Value

    Type Description
    String []

    moveVirtualDisk_Task

    Move a virtual disk and all related files from the source location specified by sourceName and sourceDatacenter to the destination location specified by destName and destDatacenter.

    If source (or destination) name is specified as a URL, then the corresponding datacenter parameter may be omitted.

    If source and destination resolve to the same file system location, the call has no effect.

    Requires Datastore.FileManagement privilege on both source and destination datastores.

    @since VI API 2.5

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter

    arg2String

    arg3VcDatacenter

    arg4Boolean

    arg5VcVirtualMachineProfileSpec []


    Return Value

    Type Description
    VcTask

    createVirtualDisk_Task

    Create a virtual disk.

    The datacenter parameter may be omitted if a URL is used to name the disk.

    Requires Datastore.FileManagement privilege on the datastore where the virtual disk is created.

    @since VI API 2.5

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter

    arg2VcVirtualDiskSpec


    Return Value

    Type Description
    VcTask

    queryObjectInfo_Task

    Queries information about an object

    Requires Datastore.FileManagement privilege on the datastore where each object resides.

    @since vSphere API 6.5

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter

    arg2Boolean


    Return Value

    Type Description
    VcTask

    optimizeEagerZeroVirtualDisk_Task

    Converts lazily zeroed thick virtual disk to eagerly zeroed without having to actually write zeroes to the virtual disk. Supported for VMFS thick file allocation type by resetting VMFS TBZ bits without writing zeroes to data blocks.

    The datacenter parameter may be omitted if a URL is used to name the disk.

    Requires Datastore.FileManagement privilege on the datastore where the virtual disk resides.

    @since vSphere API 5.1

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter


    Return Value

    Type Description
    VcTask

    importUnmanagedSnapshot

    Import an unmanaged-snapshot from Virtual-Volume(VVol) enabled Storage Array.

    Storage Array may support users to take snapshots indepedent of VMware stack. Such copies or snapshots are known as 'Unmanaged-Snapshots'. We are providing an ability to end-users to import such unmanaged-snapshots as Virtual Disks.

    End-user needs to know the VVol-Identifier to import unmanaged snapshot as VirtualDisk.

    Once VirtualDisk is created, user can use 'Datastore Browser' to use with rest of Virtual Machine provisioning APIs.

    @since vSphere API 6.0

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter

    arg2String


    Return Value

    Type Description
    None

    eagerZeroVirtualDisk_Task

    Explicitly zero out unaccessed parts zeroedthick disk. Effectively a no-op if the disk is already eagerZeroedThick. Unlike zeroFillVirtualDisk, which wipes the entire disk, this operation only affects previously unaccessed parts of the disk.

    The datacenter parameter may be omitted if a URL is used to name the disk.

    Requires Datastore.FileManagement privilege on the datastore where the virtual disk resides.

    @since vSphere API 4.0

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter


    Return Value

    Type Description
    VcTask

    createTrigger

    @since Unknown

    Parameters

    NameTypeDescription
    timeoutNumber

    filterString

    conditionString

    filterToSyncString


    Return Value

    Type Description
    Trigger

    enableUPIT_Task

    Enable UPIT on an existing virtual disk. @since vim unstable version

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter


    Return Value

    Type Description
    VcTask

    copyVirtualDisk_Task

    Copy a virtual disk, performing conversions as specified in the spec.

    If source (or destination) name is specified as a URL, then the corresponding datacenter parameter may be omitted.

    If source and destination resolve to the same file system location, the call has no effect, regardless of destSpec content.

    Requires Datastore.FileManagement privilege on both source and destination datastores.

    @since VI API 2.5

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter

    arg2String

    arg3VcDatacenter

    arg4VcVirtualDiskSpec

    arg5Boolean


    Return Value

    Type Description
    VcTask

    queryVirtualDiskInfo_Task

    Queries information about virtual disk.

    The datacenter parameter may be omitted if a URL is used to name the disk.

    Requires Datastore.FileManagement privilege on the datastore where each virtual disk resides.

    @since vSphere API 5.0

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter

    arg2Boolean


    Return Value

    Type Description
    VcTask

    zeroFillVirtualDisk_Task

    Overwrite all blocks of the virtual disk with zeros. All data will be lost.

    The datacenter parameter may be omitted if a URL is used to name the disk.

    Requires Datastore.FileManagement privilege on the datastore where the virtual disk resides.

    @since VI API 2.5

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter


    Return Value

    Type Description
    VcTask

    consolidateDisks_Task

    Consolidate a list of disks upward to the parent most disk. After a successful consolidation, the original parent most disk unit contains the entire contents that span the specified disk units, all disk units except the parent most are unlinked. If consolidations are not successful, non disk units will be unlinked.

    Requires Datastore.FileManagement privilege on the datastores of the all the disk units in the consolidate chain.

    @since vSphere API 5.0

    Parameters

    NameTypeDescription
    arg0VcVirtualDiskManagerDiskUnit []

    arg1Boolean


    Return Value

    Type Description
    VcTask

    inflateVirtualDisk_Task

    Inflate a sparse or thin-provisioned virtual disk up to the full size. Additional space allocated to the disk as a result of this operation will be filled with zeroes.

    The datacenter parameter may be omitted if a URL is used to name the disk.

    Requires Datastore.FileManagement privilege on the datastore where the virtual disk resides.

    @since VI API 2.5

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter


    Return Value

    Type Description
    VcTask

    reparentDisks_Task

    Reparent disks.

    Requires Datastore.FileManagement privilege on the datastores of both parent and child virtual disks specified in the reparentSpec. @since vSphere API 4.0

    Parameters

    NameTypeDescription
    arg0VcVirtualDiskManagerReparentSpec []


    Return Value

    Type Description
    VcTask

    shrinkVirtualDisk_Task

    Shrink a sparse virtual disk.

    The datacenter parameter may be omitted if a URL is used to name the disk.

    The optional parameter copy specifies whether to shrink the disk in copy-shrink mode or in-place mode. In copy-shrink mode, additional space is required, but will result in a shrunk disk that is also defragmented. In-place shrink does not require additional space, but will increase fragmentation. The default behavior is to perform copy-shrink if the parameter is not specified.

    Requires Datastore.FileManagement privilege on the datastore where the virtual disk resides.

    @since VI API 2.5

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter

    arg2Boolean


    Return Value

    Type Description
    VcTask

    queryVirtualDiskFragmentation

    Return the percentage of fragmentation of the sparse virtual disk. This is the fragmentation of virtual disk file(s) in the host operating system, not the fragmentation of the guest operating systemS filesystem inside the virtual disk.

    The datacenter parameter may be omitted if a URL is used to name the disk.

    Requires Datastore.FileManagement privilege on the datastore where the virtual disk resides.

    @since VI API 2.5

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter


    Return Value

    Type Description
    Number

    createChildDisk_Task

    Create a new sparse child disk and adds it to the end of the disk chain specified. The disk type of the child disk is inferred from the create type of the parent type, for example, on ESX servers, the child disk type is usually VMFS sparse.

    Requires Datastore.FileManagement privilege on the datastores of both the parent and child virtual disks.

    @since vSphere API 5.0

    Parameters

    NameTypeDescription
    arg0String

    arg1VcDatacenter

    arg2String

    arg3VcDatacenter

    arg4Boolean


    Return Value

    Type Description
    VcTask