# Managed Object - HostDatastoreSystem(vim.host.DatastoreSystem)

Property of
  HostConfigManager
See also
  Datastore, HostDatastoreSystemCapabilities, HostDatastoreSystemDatastoreResult, HostDatastoreSystemVvolDatastoreSpec, HostNasVolumeSpec, HostResignatureRescanResult, HostScsiDisk, HostUnresolvedVmfsResignatureSpec, HostUnresolvedVmfsVolume, VmfsDatastoreCreateSpec, VmfsDatastoreExpandSpec, VmfsDatastoreExtendSpec, VmfsDatastoreOption
Since
  2.0

## Managed Object Description

This managed object creates and removes datastores from the host.

To a host, a datastore is a storage abstraction that is backed by one of several types of storage volumes:

Local file system
  A datastore that is backed by a local file system volume uses a host native local file system such as NTFS or ext3. The datastore is created by identifying a file path for a directory in which virtual machine data will be stored. When the datastore is deleted, the mapping from the datastore to the file is deleted. The contents of the directory are not deleted.

NAS Volume
  A datastore that is backed by a network-attached storage device is created by specifying the required data needed to attach the volume to the host. Destroying the datastore detaches the volume from the host.

VMFS
  A datastore that is backed by a VMware File System (VMFS) is created by specifying a disk with unpartitioned space, the desired disk partition format on the disk, and some VMFS attributes.

  An ESX Server system automatically discovers the VMFS volume on attached Logical Unit Numbers (LUNs) on startup and after re-scanning the host bus adapter. Datastores are automatically created. The datastore label is based on the VMFS volume label. If there is a conflict with an existing datastore, it is made unique by appending a suffix. The VMFS volume label will be unchanged.

  Destroying the datastore removes the partitions that compose the VMFS volume.

Datastores are never automatically removed because transient storage connection outages may occur. They must be removed from the host using this interface.
See Datastore

Properties

Name | Type | Description
--- | --- | ---
capabilities | HostDatastoreSystemCapabilities | Capability vector indicating the available product features. Since VI API 2.5
datastore* P | ManagedObjectReference[] to a Datastore[] | List of datastores on this host.

*May not be present P Required privilege: System.View

Methods

Methods defined in this Managed Object
ConfigureDatastorePrincipal, CreateLocalDatastore, CreateNasDatastore, CreateVmfsDatastore, CreateVvolDatastore, DisableClusteredVmdkSupport, EnableClusteredVmdkSupport, ExpandVmfsDatastore, ExtendVmfsDatastore, QueryAvailableDisksForVmfs, QueryUnresolvedVmfsVolumes, QueryVmfsDatastoreCreateOptions, QueryVmfsDatastoreExpandOptions, QueryVmfsDatastoreExtendOptions, RemoveDatastore, RemoveDatastoreEx_Task, ResignatureUnresolvedVmfsVolume_Task, UpdateLocalSwapDatastore

# ConfigureDatastorePrincipal(configureDatastorePrincipal)

Configures datastore principal user for the host.

All virtual machine-related file I/O is performed under this user. Configuring datastore principal user will result in all virtual machine files (configuration, disk, and so on) being checked for proper access. If necessary, ownership and permissions are modified. Note that in some environments, file ownership and permissions modification may not be possible. For example, virtual machine files stored on NFS cannot be modified for ownership and permissions if root squashing is enabled. Ownership and permissions for these files must be manually changed by a system administrator. In general, if server process does not have rights to change ownership and file permissions of virtual machine files, they must be modified manually. If a virtual machine files are not read/writeable by this user, virtual machine related operations such as power on/off, configuration, and so on will fail. This operation must be performed while in maintenance mode and requires host reboot.

Required Privileges
  Host.Config.Maintenance

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
userName P | xsd:string | Datastore principal user name. Since 2.0
password* P | xsd:string | Optional password for systems that require password for user impersonation. Since 2.0

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
HostConfigFault | Thrown if unable to configure the datastore principal.
InvalidState | Thrown if the host is not in maintenance mode.
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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="ConfigureDatastorePrincipal" type="vslm:ConfigureDatastorePrincipalRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="ConfigureDatastorePrincipalResponse"> <complexType/> </element>

# CreateLocalDatastore(createLocalDatastore)

Creates a new local datastore.

Required Privileges
  Host.Config.Storage

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
name P | xsd:string | The name of a datastore to create on the local host. Since 2.0
path P | xsd:string | The file path for a directory in which the virtual machine data will be stored. Since 2.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference to a Datastore |

Faults

Type | Description
--- | ---
DuplicateName | Thrown if a datastore with the same name already exists.
FileNotFound | Thrown if path doesn't exist
HostConfigFault | Thrown if unable to create the datastore on host.
InvalidName | Thrown if name is not valid datastore name
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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="CreateLocalDatastore" type="vslm:CreateLocalDatastoreRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="CreateLocalDatastoreResponse"> <complexType> <sequence> <element name="returnval" type="vslm:ManagedObjectReference"/> </sequence> </complexType> </element>

# CreateNasDatastore(createNasDatastore)

Creates a new network-attached storage datastore.

Required Privileges
  Host.Config.Storage

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
spec P | HostNasVolumeSpec | The specification for creating a network-attached storage volume. Since 2.0

P Required privilege: spec

Return Value

Type | Description
--- | ---
ManagedObjectReference to a Datastore | The newly created datastore.

Faults

Type | Description
--- | ---
AlreadyExists | Thrown if the local path already exists on the host, or the remote path is already mounted on the host.
DuplicateName | Thrown if a datastore with the same name already exists.
HostConfigFault | Thrown if unable to mount the NAS volume.
NoGateway | Thrown if VMkernel gateway is not configured.
NoVirtualNic | Thrown if VMkernel TCPIP stack is not configured.
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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="CreateNasDatastore" type="vslm:CreateNasDatastoreRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="CreateNasDatastoreResponse"> <complexType> <sequence> <element name="returnval" type="vslm:ManagedObjectReference"/> </sequence> </complexType> </element>

# CreateVmfsDatastore(createVmfsDatastore)

Creates a new VMFS datastore.

Required Privileges
  Host.Config.Storage

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
spec P | VmfsDatastoreCreateSpec | The specification for creating a datastore backed by a VMFS. Since 2.0

P Required privilege: spec

Return Value

Type | Description
--- | ---
ManagedObjectReference to a Datastore | The newly created datastore.

Faults

Type | Description
--- | ---
DuplicateName | Thrown if a datastore with the same name already exists.
HostConfigFault | Thrown if unable to format the VMFS volume or gather information about the created volume.
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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="CreateVmfsDatastore" type="vslm:CreateVmfsDatastoreRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="CreateVmfsDatastoreResponse"> <complexType> <sequence> <element name="returnval" type="vslm:ManagedObjectReference"/> </sequence> </complexType> </element>

# CreateVvolDatastore(createVvolDatastore)

Create a Virtual-Volume based datastore

Required Privileges
  Host.Config.Storage
Since
  vSphere API 6.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
spec P | HostDatastoreSystemVvolDatastoreSpec | Specification for creating a Virtual-Volume based datastore. Since vSphere API 6.0

P Required privilege: spec

Return Value

Type | Description
--- | ---
ManagedObjectReference to a Datastore | The newly created datastore.

Faults

Type | Description
--- | ---
DuplicateName | Thrown if a datastore with the same name already exists.
HostConfigFault | Thrown if unable to create the datastore on host.
InvalidName | Thrown if name is not valid datastore name
NotFound | Thrown if the storage container could not be 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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="CreateVvolDatastore" type="vslm:CreateVvolDatastoreRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="CreateVvolDatastoreResponse"> <complexType> <sequence> <element name="returnval" type="vslm:ManagedObjectReference"/> </sequence> </complexType> </element>

# DisableClusteredVmdkSupport(disableClusteredVmdkSupport)

Disable the clustered vmdk support on specified datastore. This API will fail if there are running VMs on the datastore which are configured to use clustered VMDK feature.

Required Privileges
  Host.Config.Storage
Since
  vSphere API 7.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
datastore P | ManagedObjectReference to a Datastore | Datastore on which clustered vmdk should be disabled. Since vSphere API 7.0

P Required privilege: datastore

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
HostConfigFault | Thrown if unable to disable clustered vmdk support.
NotFound | Thrown if a datastore with the name could not be 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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="DisableClusteredVmdkSupport" type="vslm:DisableClusteredVmdkSupportRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="DisableClusteredVmdkSupportResponse"> <complexType/> </element>

# EnableClusteredVmdkSupport(enableClusteredVmdkSupport)

Enable the clustered vmdk support on specified datastore.

Required Privileges
  Host.Config.Storage
Since
  vSphere API 7.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
datastore P | ManagedObjectReference to a Datastore | Datastore on which clustered vmdk should be enabled Since vSphere API 7.0

P Required privilege: datastore

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
HostConfigFault | Thrown if unable to enable clustered vmdk support.
NotFound | Thrown if a datastore with the name could not be 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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="EnableClusteredVmdkSupport" type="vslm:EnableClusteredVmdkSupportRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="EnableClusteredVmdkSupportResponse"> <complexType/> </element>

# ExpandVmfsDatastore(expandVmfsDatastore)

Increases the capacity of an existing VMFS datastore by expanding (increasing the size of) an existing extent of the datastore.

Required Privileges
  Host.Config.Storage
Since
  vSphere API 4.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
datastore P | ManagedObjectReference to a Datastore | The datastore whose capacity should be increased. Since vSphere API 4.0
spec P | VmfsDatastoreExpandSpec | The specification describing which extent of the VMFS datastore to expand. Since vSphere API 4.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference to a Datastore | The expanded datastore.

Faults

Type | Description
--- | ---
HostConfigFault | Thrown if unable to expand the VMFS volume.
NotFound | Thrown if a datastore with the name could not be 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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="ExpandVmfsDatastore" type="vslm:ExpandVmfsDatastoreRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="ExpandVmfsDatastoreResponse"> <complexType> <sequence> <element name="returnval" type="vslm:ManagedObjectReference"/> </sequence> </complexType> </element>

# ExtendVmfsDatastore(extendVmfsDatastore)

Increases the capacity of an existing VMFS datastore by adding new extents to the datastore.

Required Privileges
  Host.Config.Storage

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
datastore P | ManagedObjectReference to a Datastore | The datastore whose capacity should be increased. Since 2.0
spec P | VmfsDatastoreExtendSpec | The specification describing what extents to add to a VMFS datastore. Since 2.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference to a Datastore | The extended datastore.

Faults

Type | Description
--- | ---
HostConfigFault | Thrown if unable to extend the VMFS volume.
NotFound | Thrown if a datastore with the name could not be 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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="ExtendVmfsDatastore" type="vslm:ExtendVmfsDatastoreRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="ExtendVmfsDatastoreResponse"> <complexType> <sequence> <element name="returnval" type="vslm:ManagedObjectReference"/> </sequence> </complexType> </element>

# QueryAvailableDisksForVmfs(queryAvailableDisksForVmfs)

Query to list disks that can be used to contain VMFS datastore extents. If the optional parameter name is supplied, queries for disks that can be used to contain extents for a VMFS datastore identified by the supplied name. Otherwise, the method retrieves disks that can be used to contain new VMFS datastores.

This operation will filter out disks that are currently in use by an existing VMFS unless the VMFS using the disk is one being extended. It will also filter out management LUNs and disks that are referenced by RDMs. These disk LUNs are also unsuited for use by a VMFS.

Disk LUNs referenced by RDMs are found by examining all virtual machines known to the system and visiting their virtual disk backends. If a virtual disk backend uses an RDM that is referencing a disk LUN, the disk LUN becomes ineligible for use by a VMFS datastore.

Required Privileges
  Host.Config.Storage

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
datastore* P | ManagedObjectReference to a Datastore | The managed object reference of the VMFS datastore you want extents for. Since 2.0

*Need not be set P Required privilege: datastore

Return Value

Type | Description
--- | ---
HostScsiDisk[] | An array of data objects describing SCSI disks.

Faults

Type | Description
--- | ---
HostConfigFault | Thrown if unable to query disk information.
NotFound | Thrown if the named VMFS datastore 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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="QueryAvailableDisksForVmfs" type="vslm:QueryAvailableDisksForVmfsRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="QueryAvailableDisksForVmfsResponse"> <complexType> <sequence> <element name="returnval" type="vslm:HostScsiDisk" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# QueryUnresolvedVmfsVolumes(queryUnresolvedVmfsVolumes)

Get the list of unbound VMFS volumes. For sharing a volume across hosts, a VMFS volume is bound to its underlying block device storage. When a low level block copy is performed to copy or move the VMFS volume, the copied volume will be unbound.

Required Privileges
  System.Read
Since
  vSphere API 4.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.

Return Value

Type | Description
--- | ---
HostUnresolvedVmfsVolume[] | An array of unbound VMFS datastore

Faults

Type | Description
--- | ---
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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="QueryUnresolvedVmfsVolumes" type="vslm:QueryUnresolvedVmfsVolumesRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="QueryUnresolvedVmfsVolumesResponse"> <complexType> <sequence> <element name="returnval" type="vslm:HostUnresolvedVmfsVolume" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# QueryVmfsDatastoreCreateOptions(queryVmfsDatastoreCreateOptions)

Queries options for creating a new VMFS datastore for a disk.
See devicePath

Required Privileges
  Host.Config.Storage

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
devicePath P | xsd:string | The devicePath of the disk on which datastore creation options are generated. See devicePath Since 2.0
vmfsMajorVersion* P | xsd:int | major version of VMFS to be used for formatting the datastore. If this parameter is not specified, then the highest supportedVmfsMajorVersion for the host is used. See devicePath Since 2.0

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
VmfsDatastoreOption[] | An array of VMFS datastore provisioning options that can be applied on a disk.

Faults

Type | Description
--- | ---
HostConfigFault | Thrown if unable to get the current partition information for the device. See devicePath
NotFound | Thrown if the device is not found. See devicePath
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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="QueryVmfsDatastoreCreateOptions" type="vslm:QueryVmfsDatastoreCreateOptionsRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="QueryVmfsDatastoreCreateOptionsResponse"> <complexType> <sequence> <element name="returnval" type="vslm:VmfsDatastoreOption" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# QueryVmfsDatastoreExpandOptions(queryVmfsDatastoreExpandOptions)

Queries for options for increasing the capacity of an existing VMFS datastore by expanding (increasing the size of) an existing extent of the datastore.

Required Privileges
  Host.Config.Storage
Since
  vSphere API 4.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
datastore P | ManagedObjectReference to a Datastore | The datastore to be expanded. Since vSphere API 4.0

P Required privilege: datastore

Return Value

Type | Description
--- | ---
VmfsDatastoreOption[] | An array of VMFS datastore expansion options that can be applied.

Faults

Type | Description
--- | ---
HostConfigFault | Thrown if unable to get partition information for the devices on which the extents reside
NotFound | Thrown if the specified datastore could not be found or is unmounted.
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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="QueryVmfsDatastoreExpandOptions" type="vslm:QueryVmfsDatastoreExpandOptionsRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="QueryVmfsDatastoreExpandOptionsResponse"> <complexType> <sequence> <element name="returnval" type="vslm:VmfsDatastoreOption" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# QueryVmfsDatastoreExtendOptions(queryVmfsDatastoreExtendOptions)

Queries for options for increasing the capacity of an existing VMFS datastore by adding new extents using space from the specified disk.
See devicePath

Required Privileges
  Host.Config.Storage

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
datastore P | ManagedObjectReference to a Datastore | The datastore to be extended. See devicePath Since 2.0
devicePath P | xsd:string | The devicePath of the disk on which datastore extension options are generated. See devicePath Since 2.0
suppressExpandCandidates* P | xsd:boolean | Indicates whether to exclude options that can be used for extent expansion also. Free space can be used for adding an extent or expanding an existing extent. If this parameter is set to true, the list of options returned will not include free space that can be used for expansion. See devicePath Since 2.0

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
VmfsDatastoreOption[] | An array of VMFS datastore provisioning options that can be applied on a disk.

Faults

Type | Description
--- | ---
HostConfigFault | Thrown if unable to get the current partition information for the device. See devicePath
NotFound | Thrown if a datastore or device with the given name could not be found or if the datastore is unmounted. See devicePath
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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="QueryVmfsDatastoreExtendOptions" type="vslm:QueryVmfsDatastoreExtendOptionsRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="QueryVmfsDatastoreExtendOptionsResponse"> <complexType> <sequence> <element name="returnval" type="vslm:VmfsDatastoreOption" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# RemoveDatastore(removeDatastore)

Removes a datastore from a host.

Required Privileges
  Host.Config.Storage

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
datastore P | ManagedObjectReference to a Datastore | The datastore to be removed. Since 2.0

P Required privilege: datastore

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
HostConfigFault | Thrown if unable to umount the NAS volume for NAS datastore, or gather the existing volume information.
NotFound | Thrown if the datastore could not be found.
ResourceInUse | Thrown for a VMFS volume if there is any VM registered on any host attached to this 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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="RemoveDatastore" type="vslm:RemoveDatastoreRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="RemoveDatastoreResponse"> <complexType/> </element>

# RemoveDatastoreEx_Task(removeDatastoreEx)

Remove one or more datastores. This is an asynchronous, batch operation of removeDatastore. Please see RemoveDatastore for operational details. Note: This API currently supports removal of only NFS datastores.

Required Privileges
  Host.Config.Storage
Since
  vSphere API 6.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
datastore P | ManagedObjectReference[] to a Datastore[] | each element specifies one datastore to be removed. Since vSphere API 6.0

P Required privilege: datastore

Return Value

Type | Description
--- | ---
ManagedObjectReference to a VslmTask |

Faults

Type | Description
--- | ---
HostConfigFault | Thrown for host configuration failures.
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

# ResignatureUnresolvedVmfsVolume_Task(resignatureUnresolvedVmfsVolume)

Resignature an unbound VMFS volume. To safely enable sharing of the volume across hosts, a VMFS volume is bound to its underlying block device storage. When a low level block copy is performed to copy or move the VMFS volume, the copied volume will be unbound. In order for the VMFS volume to be usable, a resolution operation is needed to determine whether the VMFS volume should be treated as a new volume or not and what extents compose that volume in the event there is more than one unbound volume.

With 'Resignature' operation, a new Vmfs Uuid is assigned to the volume but its contents are kept intact. Resignature results in a new Vmfs volume on the host. Users can specify a list of hosts on which the volume will be auto-mounted.

Required Privileges
  Host.Config.Storage
Since
  vSphere API 4.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
resolutionSpec P | HostUnresolvedVmfsResignatureSpec | A data object that describes what the disk extents to be used for creating the new VMFS volume. Since vSphere API 4.0

P Required privilege: resolutionSpec

Return Value

Type | Description
--- | ---
ManagedObjectReference to a VslmTask | This method returns a Task object with which to monitor the operation. The task result (Info.result) contains a HostResignatureRescanResult object that identifies the newly created VMFS datastore.

Faults

Type | Description
--- | ---
HostConfigFault | Thrown for all other configuration failures.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
VmfsAmbiguousMount | when ESX is unable to resolve the extents of a VMFS volume unambiguously. This is thrown only when a VMFS volume has multiple extents and multiple copies of non-head extents are detected, and the user has not specified one copy of every extent. Please note that some versions of ESX may not support resolving the situation where multiple copies of non-head extents are detected, even if one copy of every extent is specified in the method parameter. To resolve such a situation, the user is expected to change the configuration (for example, using array management tools) so that only one copy of each non-head extent is presented to ESX.

Events

Type
None

# UpdateLocalSwapDatastore(updateLocalSwapDatastore)

Choose the localSwapDatastore for this host. Any change to this setting will affect virtual machines that subsequently power on or resume from a suspended state at this host, or that migrate to this host while powered on; virtual machines that are currently powered on at this host will not yet be affected.

Required Privileges
  Host.Config.Storage
Since
  VI API 2.5

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call.
datastore* P | ManagedObjectReference to a Datastore | The selected datastore. If this argument is unset, then the localSwapDatastore property becomes unset. Otherwise, the host must have read/write access to the indicated datastore. Since VI API 2.5

*Need not be set P Required privilege: datastore

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
DatastoreNotWritableOnHost | Thrown if the datastore argument is set and the host cannot write to the indicated datastore.
InaccessibleDatastore | Thrown if the datastore argument is set and the host cannot access the indicated 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

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="UpdateLocalSwapDatastore" type="vslm:UpdateLocalSwapDatastoreRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="UpdateLocalSwapDatastoreResponse"> <complexType/> </element>