vCenter Storage Monitoring Service API


Managed Object - HostVStorageObjectManager(vim.vslm.host.VStorageObjectManager)

Extends
VStorageObjectManagerBase
See also
CryptoSpec, Datastore, ID, KeyValue, VirtualMachineProfileSpec, VslmCloneSpec, VslmCreateSpec, vslmInfrastructureObjectPolicy, VslmRelocateSpec, vslmVClockInfo, VStorageObject, VStorageObjectSnapshotInfo, VStorageObjectStateInfo
Since
vSphere API Release 6.5


Managed Object Description

Interface to manage virtual storage object on an ESXi host.

Properties

Name Type Description
None
Properties inherited from VStorageObjectManagerBase
None

Methods

Methods defined in this Managed Object
HostClearVStorageObjectControlFlags, HostCloneVStorageObject_Task, HostCreateDisk_Task, HostDeleteVStorageObject_Task, HostDeleteVStorageObjectEx_Task, HostExtendDisk_Task, HostInflateDisk_Task, HostListVStorageObject, HostQueryVirtualDiskUuid, HostReconcileDatastoreInventory_Task, HostRegisterDisk, HostRelocateVStorageObject_Task, HostRenameVStorageObject, HostRetrieveVStorageInfrastructureObjectPolicy, HostRetrieveVStorageObject, HostRetrieveVStorageObjectMetadata, HostRetrieveVStorageObjectMetadataValue, HostRetrieveVStorageObjectState, HostScheduleReconcileDatastoreInventory, HostSetVirtualDiskUuid_Task, HostSetVStorageObjectControlFlags, HostUpdateVStorageObjectMetadata_Task, HostUpdateVStorageObjectMetadataEx_Task, HostVStorageObjectCreateDiskFromSnapshot_Task, HostVStorageObjectCreateSnapshot_Task, HostVStorageObjectDeleteSnapshot_Task, HostVStorageObjectRetrieveSnapshotInfo, HostVStorageObjectRevert_Task
Methods inherited from VStorageObjectManagerBase
RenameVStorageObjectEx, RevertVStorageObjectEx_Task, VStorageObjectCreateSnapshotEx_Task, VStorageObjectDeleteSnapshotEx_Task, VStorageObjectExtendDiskEx_Task

HostClearVStorageObjectControlFlags(clearVStorageObjectControlFlags)

Clear control flags on VStorageObject. The control flags are defined in vslmVStorageObjectControlFlag.
Required Privileges
System.View
Since
vSphere API Release 6.7

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object.

Since vSphere API Release 6.7
datastore PManagedObjectReference
to a Datastore

The datastore where the source virtual storage object is located.

Since vSphere API Release 6.7
controlFlags*xsd:string[]

control flags enum array to be cleared on the VStorageObject. All control flags not included in the array remain intact.

Since vSphere API Release 6.7
*Need not be set P Required privilege: Datastore.FileManagement

Return Value

Type Description
None

Faults

Type Description
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
InvalidStateThrown if the operation cannot be performed on the disk. The disk may be consumed.
NotFoundThrown if specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



HostCloneVStorageObject_Task(cloneVStorageObject)

Clone a virtual storage object.

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

Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object.

Since vSphere API Release 6.5
datastoreManagedObjectReference
to a Datastore

The datastore where the source virtual storage object is located.

Since vSphere API Release 6.5
specVslmCloneSpec

The specification for cloning the virtual storage object.

Since vSphere API Release 6.5

Return Value

Type Description
ManagedObjectReference
to a SmsTask

Faults

Type Description
FileFaultThrown if an error occurs while cloning the virtual storage object.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
NotFoundThrown if specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None



HostCreateDisk_Task(createDisk)

Create a virtual disk, which is a storage object with vim.vslm.VStorageObject.ConsumptionType#disk as consumption type.

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

Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
specVslmCreateSpec

The specification of the virtual storage object to be created. 2

Since vSphere API Release 6.5

Return Value

Type Description
ManagedObjectReference
to a SmsTask
This method returns a Task object with which to monitor the operation. The result property in the Task contains the newly created VStorageObject upon success.

Faults

Type Description
FileFaultThrown if an error occurs when creating the virtual disk.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None



HostDeleteVStorageObject_Task(deleteVStorageObject)

Delete a virtual storage object and its assoicated backings.

Requires Datastore.FileManagement privilege on the datastore where the virtual storage object is located.

Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object to be deleted.

Since vSphere API Release 6.5
datastoreManagedObjectReference
to a Datastore

The datastore where the virtual storage object is located.

Since vSphere API Release 6.5

Return Value

Type Description
ManagedObjectReference
to a SmsTask
This method returns a Task object with which to monitor the operation.

Faults

Type Description
FileFaultThrown if an error occurs when deleting the virtual storage object.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
InvalidStateThrown if the operation cannot be performed on the disk. The disk may be consumed and cannot be deleted.
NotFoundThrown if the specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgressThrown if the virtual storage object is busy.

Events

Type
None



HostDeleteVStorageObjectEx_Task(deleteVStorageObjectEx)

Delete a virtual storage object and its assoicated backings.

Requires Datastore.FileManagement privilege on the datastore where the virtual storage object is located.

Required Privileges
System.View
Since
vSphere API Release 7.0.2.0

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object to be deleted.

Since vSphere API Release 7.0.2.0
datastoreManagedObjectReference
to a Datastore

The datastore where the virtual storage object is located.

Since vSphere API Release 7.0.2.0

Return Value

Type Description
ManagedObjectReference
to a SmsTask

Faults

Type Description
FileFaultThrown if an error occurs when deleting the virtual storage object.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
InvalidStateThrown if the operation cannot be performed on the disk. The disk may be consumed and cannot be deleted.
NotFoundThrown if the specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgressThrown if the virtual storage object is busy.

Events

Type
None



HostExtendDisk_Task(extendDisk)

Expand the capacity of a virtual disk, which is a storage object with vim.vslm.VStorageObject.ConsumptionType#disk, to the new capacity. If new capacity is smaller than current disk capacity, then operation fails due to invalid capacity. If new capacity is greater than current disk capacity, then operation proceeds. If new capacity is equal to current disk ccapcity, then operation succeeds without any actual extension. The extended disk region will be the same as the original disk: - For a zerothick disk, the extended disk region will be zeroedthick. - For an eagerzerothick disk, the extended disk region will be eagerzeroedthick - A thin-provisioned disk will always be extended as a thin-provisioned disk.

Requires Datastore.FileManagement privilege on the datastore where the virtual storage object is located.

Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual disk to be extended.

Since vSphere API Release 6.5
datastoreManagedObjectReference
to a Datastore

The datastore where the virtual disk is located.

Since vSphere API Release 6.5
newCapacityInMBxsd:long

The new capacity of the virtual disk in MB.

Since vSphere API Release 6.5

Return Value

Type Description
ManagedObjectReference
to a SmsTask
This method returns a Task object with which to monitor the operation.

Faults

Type Description
FileFaultThrown if an error occurs while extending the virtual disk.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
InvalidStateThrown if the operation cannot be performed on the disk. The disk may be consumed and cannot be extended.
NotFoundThrown if the specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgressThrown if the virtual storage object is busy.

Events

Type
None



HostInflateDisk_Task(inflateDisk)

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.

Currently inflateDisk API only supports the following combinations: Valid provisioning type: THIN; Valid Datastore: VMFS, NFS. Inflating a disk is not applicable for VVol/VSAN datastore.

Requires Datastore.FileManagement privilege on the datastore where the virtual storage object is located.

Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual disk to be inflated.

Since vSphere API Release 6.5
datastoreManagedObjectReference
to a Datastore

The datastore where the virtual disk is located.

Since vSphere API Release 6.5

Return Value

Type Description
ManagedObjectReference
to a SmsTask
This method returns a Task object with which to monitor the operation.

Faults

Type Description
FileFaultThrown if an error occurs while inflating the virtual disk.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
InvalidStateThrown if the operation cannot be performed on the disk. The disk may be consumed and cannot be extended.
NotFoundThrown if the specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgressThrown if the virtual storage object is busy.

Events

Type
None



HostListVStorageObject(listVStorageObject)

List all virtual storage objects located on a datastore.

Requires Datastore.FileManagement privilege on the datastore where the virtual storage object is located.

Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
datastoreManagedObjectReference
to a Datastore

The datastore to query for the virtual storage objects.

Since vSphere API Release 6.5

Return Value

Type Description
ID[]The list of IDs of the virtual storage objects located on the datastore.

Faults

Type Description
InvalidDatastoreThrown if the operation cannot be performed on the datastore, such as datastore cannot be found or inaccessible.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



HostQueryVirtualDiskUuid(queryVirtualDiskUuidEx)

Get the virtual disk UUID.
Required Privileges
System.View
Since
vSphere API Release 8.0.3.0

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
namexsd:string

The name of the disk, either a datastore path or a URL referring to the virtual disk whose uuid for the DDB entry needs to be queried. A URL has the form
scheme://authority/folder/path?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.
  • 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".

Since vSphere API Release 8.0.3.0

Return Value

Type Description
xsd:stringThe hex representation of the unique ID for this virtual disk.

Faults

Type Description
FileFaultThrown if an error occurs reading the virtual disk.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



HostReconcileDatastoreInventory_Task(reconcileDatastoreInventory)

Reconcile the datastore inventory info of virtual storage objects.

Requires Datastore.FileManagement privilege.

Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
datastoreManagedObjectReference
to a Datastore

The datastore that needs to be reconciled.

Since vSphere API Release 6.5

Return Value

Type Description
ManagedObjectReference
to a SmsTask

Faults

Type Description
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
NotFound
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None



HostRegisterDisk(registerDisk)

Promote a virtual disk to a First Class Disk.

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


See name

Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
pathxsd:string

URL or datastore path to the virtual disk.
See name

Since vSphere API Release 6.5
name*xsd:string

The descriptive name of the disk object. If unset the name will be automatically determined from the path.
See name

Since vSphere API Release 6.5
modifyControlFlags*xsd:boolean

Optional Parameter describing if the control Flags should be changed to default values
See name

Since vSphere API Release 6.5
*Need not be set

Return Value

Type Description
VStorageObjectThe registered virtual storage object for the disk.

Faults

Type Description
AlreadyExistsThrown if disk is already registered as a virtual storage object.
See name
FileFaultThrown if an error occurs while registering the virtual disk.
See name
InvalidDatastoreThrown if datastore cannot be found or the operation cannot be performed on the datastore.
See name
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



HostRelocateVStorageObject_Task(relocateVStorageObject)

Relocate a virtual storage object.

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

Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object.

Since vSphere API Release 6.5
datastoreManagedObjectReference
to a Datastore

The datastore where the source virtual storage object is located.

Since vSphere API Release 6.5
specVslmRelocateSpec

The specification for relocation of the virtual storage object.

Since vSphere API Release 6.5

Return Value

Type Description
ManagedObjectReference
to a SmsTask

Faults

Type Description
FileFaultThrown if an error occurs while relocating the virtual storage object.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
InvalidStateThrown if the operation cannot be performed on the disk. The disk may be consumed and cannot be relocated.
NotFoundThrown if specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None



HostRenameVStorageObject(renameVStorageObject)

Rename a virtual storage object.

Requires Datastore.FileManagement privilege on the datastore where the virtual storage object is located.

Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object to be renamed.

Since vSphere API Release 6.5
datastoreManagedObjectReference
to a Datastore

The datastore where the virtual storage object is located.

Since vSphere API Release 6.5
namexsd:string

The new name for the virtual storage object.

Since vSphere API Release 6.5

Return Value

Type Description
None

Faults

Type Description
FileFaultThrown if an error occurs while renaming the virtual storage object.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
NotFoundThrown if the specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



HostRetrieveVStorageInfrastructureObjectPolicy(retrieveVStorageInfrastructureObjectPolicy)

Retrieve virtual storage infrastructure object SBPM policy on given datastore. Only support VSAN datastore.

Requires Datastore.FileManagement privilege on the datastore specified.

Required Privileges
System.View
Since
vSphere API Release 6.7

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
datastoreManagedObjectReference
to a Datastore

Datastore on which policy needs to be retrieved.

Since vSphere API Release 6.7

Return Value

Type Description
vslmInfrastructureObjectPolicy[]The policy object of virtual storage object.

Faults

Type Description
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
InvalidStateThrown if the operation cannot be performed on the disk.
NotFoundThrown if specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



HostRetrieveVStorageObject(retrieveVStorageObject)

Retrieve a virtual storage object.

Requires Datastore.FileManagement privilege on the datastore where the virtual storage object is located.

Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object to be retrieved.

Since vSphere API Release 6.5
datastoreManagedObjectReference
to a Datastore

The datastore where the virtual storage object is located.

Since vSphere API Release 6.5
diskInfoFlags*xsd:string[]

Flags indicating the FCD information to be retrieved. If diskInfoFlags is unset, then all FCD information will be retrieved. See vslmDiskInfoFlag for the list of supported values.

Since vSphere API Release 6.5
*Need not be set

Return Value

Type Description
VStorageObjectThe required virtual storage object.

Faults

Type Description
FileFaultThrown if an error occurs when retrieving the virtual object.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
NotFoundThrown if specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



HostRetrieveVStorageObjectMetadata(retrieveVStorageObjectMetadata)

Retrieve metadata KV pairs from a virtual storage object.

Requires Datastore.FileManagement privilege on the datastore where the virtual storage object is located.

Required Privileges
System.View
Since
vSphere API Release 6.7.2

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object.

Since vSphere API Release 6.7.2
datastoreManagedObjectReference
to a Datastore

The datastore to query for the virtual storage objects.

Since vSphere API Release 6.7.2
snapshotId*ID

The ID of the snapshot of virtual storage object.

Since vSphere API Release 6.7.2
prefix*xsd:string

The prefix of the metadata key that needs to be retrieved

Since vSphere API Release 6.7.2
*Need not be set

Return Value

Type Description
KeyValue[]returns the array of key value pair

Faults

Type Description
InvalidDatastoreThrown if the operation cannot be performed on the datastore, such as datastore cannot be found or inaccessible.
InvalidStateThrown if the operation cannot be performed on the disk.
NotFoundThrown if specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



HostRetrieveVStorageObjectMetadataValue(retrieveVStorageObjectMetadataValue)

Retrieve the metadata value by key from a virtual storage object.

Requires Datastore.FileManagement privilege on the datastore where the virtual storage object is located.

Required Privileges
System.View
Since
vSphere API Release 6.7.2

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object.

Since vSphere API Release 6.7.2
datastoreManagedObjectReference
to a Datastore

The datastore to query for the virtual storage objects.

Since vSphere API Release 6.7.2
snapshotId*ID

The ID of the snapshot of virtual storage object.

Since vSphere API Release 6.7.2
keyxsd:string

The key for the the virtual storage object

Since vSphere API Release 6.7.2
*Need not be set

Return Value

Type Description
xsd:stringreturns the value for the key

Faults

Type Description
InvalidDatastoreThrown if the operation cannot be performed on the datastore, such as datastore cannot be found or inaccessible.
InvalidStateThrown if the operation cannot be performed on the disk.
KeyNotFoundThrown if specified key cannot be found.
NotFoundThrown if specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



HostRetrieveVStorageObjectState(retrieveVStorageObjectState)

Retrieve a virtual storage object state.

Requires Datastore.FileManagement privilege on the datastore where the virtual storage object is located.

Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object the state to be retrieved.

Since vSphere API Release 6.5
datastoreManagedObjectReference
to a Datastore

The datastore where the virtual storage object is located.

Since vSphere API Release 6.5

Return Value

Type Description
VStorageObjectStateInfoThe required virtual storage object state.

Faults

Type Description
FileFaultThrown if an error occurs when retrieving the virtual object state.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
NotFoundThrown if specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



HostScheduleReconcileDatastoreInventory(scheduleReconcileDatastoreInventory)

Schedules reconcile of the datastore inventory info of virtual storage objects. This method just schedules the reconcile operation for the nearby future and returns. Note that since the reconcile operation will be executed after this method already returns the success of this method should not be considered as success of the actual reconcile operation.

Requires Datastore.FileManagement privilege.

Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
datastoreManagedObjectReference
to a Datastore

The datastore that needs to be reconciled.

Since vSphere API Release 6.5

Return Value

Type Description
None

Faults

Type Description
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
NotFound
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



HostSetVirtualDiskUuid_Task(setVirtualDiskUuidEx)

Set the virtual disk Uuid.
Required Privileges
System.View
Since
vSphere API Release 8.0.3.0

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
namexsd:string

The name of the disk, either a datastore path or a URL referring to the virtual disk whose uuid for the DDB entry needs to be set. A URL has the form
scheme://authority/folder/path?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.
  • 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".

Since vSphere API Release 8.0.3.0
uuid*xsd:string

The hex representation of the unique ID for this virtual disk. If uuid is not set or missing, a random UUID is generated and assigned.

Since vSphere API Release 8.0.3.0
*Need not be set

Return Value

Type Description
ManagedObjectReference
to a SmsTask

Faults

Type Description
FileFaultThrown if an error occurs updating the virtual disk.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None



HostSetVStorageObjectControlFlags(setVStorageObjectControlFlags)

Set control flags on VStorageObject. The control flags are defined in vslmVStorageObjectControlFlag.
Required Privileges
System.View
Since
vSphere API Release 6.7

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object.

Since vSphere API Release 6.7
datastore PManagedObjectReference
to a Datastore

The datastore where the source virtual storage object is located.

Since vSphere API Release 6.7
controlFlags*xsd:string[]

control flags enum array to be set on the VStorageObject. All control flags not included in the array remain intact.

Since vSphere API Release 6.7
*Need not be set P Required privilege: Datastore.FileManagement

Return Value

Type Description
None

Faults

Type Description
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
InvalidStateThrown if the operation cannot be performed on the disk. The disk may be consumed.
NotFoundThrown if specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



HostUpdateVStorageObjectMetadata_Task(updateVStorageObjectMetadata)

Update metadata KV pairs to a virtual storage object. And this API is by design supposed to be used for all of the addition, modification and deletion operations of metadata KV pairs.

Requires Datastore.FileManagement privilege on the datastore where the virtual storage object is located.

Required Privileges
System.View
Since
vSphere API Release 6.7.2

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object.

Since vSphere API Release 6.7.2
datastoreManagedObjectReference
to a Datastore

The datastore to query for the virtual storage objects.

Since vSphere API Release 6.7.2
metadata*KeyValue[]

array of key/value strings. (keys must be unique within the list)

Since vSphere API Release 6.7.2
deleteKeys*xsd:string[]

array of keys need to be deleted

Since vSphere API Release 6.7.2
*Need not be set

Return Value

Type Description
ManagedObjectReference
to a SmsTask
This method returns a Task object with which to monitor the operation.

Faults

Type Description
InvalidDatastoreThrown if the operation cannot be performed on the datastore, such as datastore cannot be found or inaccessible.
InvalidStateThrown if the operation cannot be performed on the disk.
NotFoundThrown if specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None



HostUpdateVStorageObjectMetadataEx_Task(updateVStorageObjectMetadataEx)

Update metadata KV pairs to a virtual storage object. And this API is by design supposed to be used for all of the addition, modification and deletion operations of metadata KV pairs.

Requires Datastore.FileManagement privilege on the datastore where the virtual storage object is located.

Required Privileges
System.View
Since
vSphere API Release 7.0.2.0

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object.

Since vSphere API Release 7.0.2.0
datastoreManagedObjectReference
to a Datastore

The datastore to query for the virtual storage objects.

Since vSphere API Release 7.0.2.0
metadata*KeyValue[]

array of key/value strings. (keys must be unique within the list)

Since vSphere API Release 7.0.2.0
deleteKeys*xsd:string[]

array of keys need to be deleted

Since vSphere API Release 7.0.2.0
*Need not be set

Return Value

Type Description
ManagedObjectReference
to a SmsTask

Faults

Type Description
InvalidDatastoreThrown if the operation cannot be performed on the datastore, such as datastore cannot be found or inaccessible.
InvalidStateThrown if the operation cannot be performed on the disk.
NotFoundThrown if specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None



HostVStorageObjectCreateDiskFromSnapshot_Task(createDiskFromSnapshot)

Creates a new Disk from given snapshot of a VStorageObject.
Required Privileges
System.View
Since
vSphere API Release 6.7

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object.

Since vSphere API Release 6.7
datastoreManagedObjectReference
to a Datastore

The datastore where the source virtual storage object is located.

Since vSphere API Release 6.7
snapshotIdID

The ID of the snapshot of the virtual storage object.

Since vSphere API Release 6.7
namexsd:string

A user friendly name to be associated with the new disk.

Since vSphere API Release 6.7
profile*VirtualMachineProfileSpec[]

SPBM Profile requirement on the new virtual storage object. If not specified datastore default policy would be assigned.

Since vSphere API Release 6.7
crypto*CryptoSpec

Crypto information of the new disk.

Since vSphere API Release 6.7
path*xsd:string

Relative location in the specified datastore where disk needs to be created. If not specified disk gets created at defualt VStorageObject location on the specified datastore.

Since vSphere API Release 6.7
provisioningType*xsd:string

Provisioining type of the disk as specified in above mentioned profile. The list of supported values can be found in BaseConfigInfoDiskFileBackingInfoProvisioningType

Since vSphere API Release 6.7
*Need not be set

Return Value

Type Description
ManagedObjectReference
to a SmsTask

Faults

Type Description
FileFaultThrown if an error occurs while snapshotting the virtual storage object.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
InvalidStateThrown if the operation cannot be performed on the disk.
NotFoundThrown if specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None



HostVStorageObjectCreateSnapshot_Task(createSnapshot)

Creates a snapshot of a given VStorageObject.
Required Privileges
System.View
Since
vSphere API Release 6.7

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object.

Since vSphere API Release 6.7
datastoreManagedObjectReference
to a Datastore

The datastore where the source virtual storage object is located.

Since vSphere API Release 6.7
descriptionxsd:string

A short description to be associated with the snapshot.

Since vSphere API Release 6.7

Return Value

Type Description
ManagedObjectReference
to a SmsTask

Faults

Type Description
FileFaultThrown if an error occurs while snapshotting the virtual storage object.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
InvalidStateThrown if the operation cannot be performed on the disk.
NotFoundThrown if specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None



HostVStorageObjectDeleteSnapshot_Task(deleteSnapshot)

Deletes a given snapshot of a VStorageObject.
Required Privileges
System.View
Since
vSphere API Release 6.7

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object.

Since vSphere API Release 6.7
datastoreManagedObjectReference
to a Datastore

The datastore where the source virtual storage object is located.

Since vSphere API Release 6.7
snapshotIdID

The ID of the snapshot of a virtual storage object.

Since vSphere API Release 6.7

Return Value

Type Description
ManagedObjectReference
to a SmsTask

Faults

Type Description
FileFaultThrown if an error occurs while snapshotting the virtual storage object.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
InvalidStateThrown if the operation cannot be performed on the disk.
NotFoundThrown if specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None



HostVStorageObjectRetrieveSnapshotInfo(retrieveSnapshotInfo)

Retrieves snapshot information of a given VStorageObject.
Required Privileges
System.View
Since
vSphere API Release 6.7

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object.

Since vSphere API Release 6.7
datastoreManagedObjectReference
to a Datastore

The datastore where the source virtual storage object is located.

Since vSphere API Release 6.7

Return Value

Type Description
VStorageObjectSnapshotInfo

Faults

Type Description
FileFaultThrown if an error occurs while snapshotting the virtual storage object.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
InvalidStateThrown if the operation cannot be performed on the disk.
NotFoundThrown if specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



HostVStorageObjectRevert_Task(RevertVStorageObject)

Reverts to a given snapshot of a VStorageObject. This operation is supported on detached VirtualDisks During revert all the snapshots which were taken after the specified snapshot would get deleted.

E.g. Consider Disk with 4 snapshots

BaseDisk -> Snap-2 -> Snap-3 -> Snap-4 -> Running-Point

If user chooses to revert to snap-2 then snap-4 and snap-3 would also be deleted. After revert operation disk would have below configuration:

BaseDisk -> Snap-2 -> Running-Point

Required Privileges
System.View
Since
vSphere API Release 6.7

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostVStorageObjectManager used to make the method call.
idID

The ID of the virtual storage object.

Since vSphere API Release 6.7
datastoreManagedObjectReference
to a Datastore

The datastore where the source virtual storage object is located.

Since vSphere API Release 6.7
snapshotIdID

The ID of the snapshot of a virtual storage object.

Since vSphere API Release 6.7

Return Value

Type Description
ManagedObjectReference
to a SmsTask

Faults

Type Description
FileFaultThrown if an error occurs while snapshotting the virtual storage object.
InvalidDatastoreThrown if the operation cannot be performed on the datastore.
InvalidStateThrown if the operation cannot be performed on the disk.
NotFoundThrown if specified virtual storage object cannot be found.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None