| Local Methods | ||
Managed Object Types | Data Object Types | All Properties | All Methods |
A URL has the form
scheme://authority/folder/path?dcPath=dcPath&dsName=dsNamewhere
http
or https
.A datastore path has the form
[datastore] pathwhere
Properties
Name | Type | Description |
---|---|---|
None |
Methods
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
sourceName | xsd:string |
The name of the source, either a datastore path
or a URL referring to the virtual disk to be copied.
|
sourceDatacenter* | ManagedObjectReference
to a Datacenter |
If sourceName is a datastore path, the
datacenter for that datastore path.
Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter,
sourceName must be a URL.
|
destName | xsd:string |
The name of the destination, either a datastore path
or a URL referring to the virtual disk to be created.
|
destDatacenter* | ManagedObjectReference
to a Datacenter |
If destName is a datastore
path, the datacenter for that datastore path.
Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter, it is assumed that
the destination path belongs to the source datacenter.
|
destSpec* | VirtualDiskSpec |
The specification of the virtual disk to be created.
If not specified, a preallocated format and busLogic adapter type is assumed.
|
force* | xsd:boolean |
The force flag is currently ignored. The FileAlreadyExists fault is thrown if
the destination file already exists.
|
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a SmsTask | This method returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
FileFault | Thrown if an error occurs cloning the virtual disk. |
InvalidDatastore | Thrown if the operation cannot be performed on the source or destination datastore. |
InvalidDiskFormat | Thrown if the destination's format is not supported. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
name | xsd:string |
The name of the disk, either a datastore path or a
URL referring to the virtual disk to be created.
|
datacenter* | ManagedObjectReference
to a Datacenter |
If name is a datastore path, the datacenter for
that datastore path. Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter,
name must be a URL.
|
spec | VirtualDiskSpec |
The specification of the virtual disk to be created.
|
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a SmsTask | This method returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
FileFault | Thrown if an error occurs creating the virtual disk. |
InvalidDatastore | Thrown if the operation cannot be performed on the datastore. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
name | xsd:string |
The name of the disk, either a datastore path or a URL
referring to the virtual disk that should be defragmented.
|
datacenter* | ManagedObjectReference
to a Datacenter |
If name is a datastore path, the datacenter for
that datastore path. Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter,
name must be a URL.
|
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a SmsTask | This method returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
FileFault | Thrown if an error occurs defragmenting the virtual disk. |
InvalidDatastore | Thrown if the operation cannot be performed on the datastore. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
name | xsd:string |
The name of the disk, either a datastore path or a URL
referring to the virtual disk to be deleted.
|
datacenter* | ManagedObjectReference
to a Datacenter |
If name is a datastore path, the datacenter for
that datastore path. Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter,
name must be a URL.
|
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a SmsTask | This method returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
FileFault | Thrown if an error occurs deleting the virtual disk. |
InvalidDatastore | Thrown if the operation cannot be performed on the datastore. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
name | xsd:string |
The name of the disk, either a datastore path or a URL
referring to the virtual disk that should be inflated.
|
datacenter* | ManagedObjectReference
to a Datacenter |
If name is a datastore path, the datacenter for
that datastore path. Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter,
name must be a URL.
|
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a SmsTask | This method returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
FileFault | Thrown if an error occurs while eager-zeroing the virtual disk. |
InvalidDatastore | Thrown if the operation cannot be performed on the datastore. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
name | xsd:string |
The name of the disk, either a datastore path or a URL
referring to the virtual disk whose capacity should be expanded.
|
datacenter* | ManagedObjectReference
to a Datacenter |
If name is a datastore path, the datacenter for
that datastore path. Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter,
name must be a URL.
|
newCapacityKb | xsd:long |
The new capacty of the virtual disk in Kb.
|
eagerZero* | xsd:boolean |
If true, the extended part of the disk will be
explicitly filled with zeroes.
Since vSphere API 4.0 |
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a SmsTask | This method returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
FileFault | Thrown if an error occurs extending the virtual disk. |
InvalidDatastore | Thrown if the operation cannot be performed on the datastore. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
vdisk | xsd:string |
- The name of the disk to import, either a datastore path or a URL
referring to the virtual disk from which to get geometry information.
|
datacenter* | ManagedObjectReference
to a Datacenter |
If vdisk is a datastore path, the datacenter for
that datastore path. Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter,
vdisk must be a URL.
|
vvolId | xsd:string |
- unmanaged snapshot identifier
|
Return Value
Type | Description |
---|---|
None |
Faults
Type | Description |
---|---|
InvalidDatastore | Thrown if the operation cannot be performed on the datastore. |
NotFound | Thrown if VVol is not found |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
name | xsd:string |
The name of the disk, either a datastore path or a URL
referring to the virtual disk that should be inflated.
|
datacenter* | ManagedObjectReference
to a Datacenter |
If name is a datastore path, the datacenter for
that datastore path. Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter,
name must be a URL.
|
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a SmsTask | This method returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
FileFault | Thrown if an error occurs inflating the virtual disk. |
InvalidDatastore | Thrown if the operation cannot be performed on the datastore. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
sourceName | xsd:string |
The name of the source, either a datastore path
or a URL referring to the virtual disk to be moved.
|
sourceDatacenter* | ManagedObjectReference
to a Datacenter |
If sourceName is a datastore path, the
datacenter for that datastore path.
Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter,
sourceName must be a URL.
|
destName | xsd:string |
The name of the destination, either a datastore path
or a URL referring to the destination virtual disk.
|
destDatacenter* | ManagedObjectReference
to a Datacenter |
If destName is a datastore
path, the datacenter for that datastore path.
Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter, it is assumed that
the destination path belongs to the source datacenter.
|
force* | xsd:boolean |
If true, overwrite any indentically named disk at the destination.
If not specified, it is assumed to be false
|
profile* | VirtualMachineProfileSpec[] |
User can specify new set of profile when moving virtual disk.
Since vSphere API 5.5 |
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a SmsTask |
Faults
Type | Description |
---|---|
FileFault | Thrown if an error occurs renaming the virtual disk. |
InvalidDatastore | Thrown if the operation cannot be performed on the source or destination datastore. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
name | xsd:string |
The name of the disk, either a datastore path or a URL
referring to the virtual disk for which to return the
percentage of fragmentation.
|
datacenter* | ManagedObjectReference
to a Datacenter |
If name is a datastore path, the datacenter for
that datastore path. Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter,
name must be a URL.
|
Return Value
Type | Description |
---|---|
xsd:int | The percentage of fragmentation (as an integer between 0 and 100) of the sparse virtual disk. |
Faults
Type | Description |
---|---|
FileFault | Thrown if an error occurs reading the virtual disk. |
InvalidDatastore | Thrown if the operation cannot be performed on the datastore. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
name | xsd:string |
The name of the disk, either a datastore path or a URL
referring to the virtual disk from which to get geometry information.
|
datacenter* | ManagedObjectReference
to a Datacenter |
If name is a datastore path, the datacenter for
that datastore path. Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter,
name must be a URL.
|
Return Value
Type | Description |
---|---|
HostDiskDimensionsChs | The geometry information for this virtual disk. |
Faults
Type | Description |
---|---|
FileFault | Thrown if an error occurs reading the virtual disk. |
InvalidDatastore | Thrown if the operation cannot be performed on the datastore. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
name | xsd:string |
The name of the disk, either a datastore path or a URL
referring to the virtual disk from which to get SCSI inquiry
page 0x83 data.
|
datacenter* | ManagedObjectReference
to a Datacenter |
If name is a datastore path, the datacenter for
that datastore path. Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter,
name must be a URL.
|
Return Value
Type | Description |
---|---|
xsd:string | The hex representation of the unique ID for this virtual disk. |
Faults
Type | Description |
---|---|
FileFault | Thrown if an error occurs reading the virtual disk. |
InvalidDatastore | Thrown if the operation cannot be performed on the datastore. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
vdisk | xsd:string |
- The name of the disk to release, either a datastore path or a URL
referring to the virtual disk.
|
datacenter* | ManagedObjectReference
to a Datacenter |
If vdisk is a datastore path, the datacenter for
that datastore path. Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter,
vdisk must be a URL.
|
Return Value
Type | Description |
---|---|
None |
Faults
Type | Description |
---|---|
FileNotFound | Thrown if vdisk is not found |
InvalidDatastore | Thrown if the operation cannot be performed on the datastore. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
name | xsd:string |
The name of the disk, either a datastore path or a URL
referring to the virtual disk whose SCSI inquiry page 0x83
data should be set.
|
datacenter* | ManagedObjectReference
to a Datacenter |
If name is a datastore path, the datacenter for
that datastore path. Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter,
name must be a URL.
|
uuid | xsd:string |
The hex representation of the unique ID for this virtual disk.
|
Return Value
Type | Description |
---|---|
None |
Faults
Type | Description |
---|---|
FileFault | Thrown if an error occurs updating the virtual disk. |
InvalidDatastore | Thrown if the operation cannot be performed on the datastore. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
name | xsd:string |
The name of the disk, either a datastore path or a URL
referring to the virtual disk that should be shrink.
|
datacenter* | ManagedObjectReference
to a Datacenter |
If name is a datastore path, the datacenter for
that datastore path. Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter,
name must be a URL.
|
copy* | xsd:boolean |
If true or omitted, performs shrink in copy-shrink mode, otherwise
shrink in in-place mode.
|
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a SmsTask | This method returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
FileFault | Thrown if an error occurs shrinking the virtual disk. |
InvalidDatastore | Thrown if the operation cannot be performed on the datastore. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the VirtualDiskManager used to make the method call. |
name | xsd:string |
The name of the disk, either a datastore path or a URL
referring to the virtual disk whose blocks should be overwritten
with zeroes.
|
datacenter* | ManagedObjectReference
to a Datacenter |
If name is a datastore path, the datacenter for
that datastore path. Not needed when invoked directly on ESX.
If not specified on a call to VirtualCenter,
name must be a URL.
|
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a SmsTask | This method returns a Task object with which to monitor the operation. |
Faults
Type | Description |
---|---|
FileFault | Thrown if an error occurs zero filling the virtual disk. |
InvalidDatastore | Thrown if the operation cannot be performed on the datastore. |
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
Events
Type | |
---|---|
None |
Top of page | Local Methods | ||
Managed Object Types | Data Object Types | All Properties | All Methods |