| Local Properties | Local Methods | |
Managed Object Types | Data Object Types | All Properties | All Methods |
To a host, a datastore is a storage abstraction that is backed by one of several types of storage volumes:
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.
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.
|
Methods
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call. |
userName | xsd:string |
Datastore principal user name.
|
password* | xsd:string |
Optional password for systems that require password for
user impersonation.
|
Return Value
Type | Description |
---|---|
None |
Faults
Type | Description |
---|---|
HostConfigFault | Thrown if unable to configure the datastore principal. |
InvalidArgument | Thrown if userName or password is not valid. |
InvalidState | Thrown if the host is not in maintenance mode. |
NotSupported | Thrown if this feature is not supported on the host. |
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 HostDatastoreSystem used to make the method call. |
name | xsd:string |
The name of a datastore to create on the local host.
|
path | xsd:string |
The file path for a directory in which the virtual machine data
will be stored.
|
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 |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call. |
spec | HostNasVolumeSpec |
The specification for creating a network-attached storage volume.
|
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. |
InvalidArgument | Thrown if the datastore name is invalid, or the spec is invalid. |
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 |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call. |
spec | VmfsDatastoreCreateSpec |
The specification for creating a datastore backed by a VMFS.
|
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. |
InvalidArgument | Thrown if the datastore name is invalid, or the spec is invalid. |
NotSupported | Thrown if the host is not an ESX Server system. |
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 HostDatastoreSystem used to make the method call. |
spec | HostDatastoreSystemVvolDatastoreSpec |
Specification for creating a Virtual-Volume based datastore.
|
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 |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call. |
datastore | ManagedObjectReference
to a Datastore |
The datastore whose capacity should be increased.
|
spec | VmfsDatastoreExpandSpec |
The specification describing which extent of the VMFS
datastore to expand.
|
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. |
NotSupported | Thrown if the host is not an ESX Server. |
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 HostDatastoreSystem used to make the method call. |
datastore | ManagedObjectReference
to a Datastore |
The datastore whose capacity should be increased.
|
spec | VmfsDatastoreExtendSpec |
The specification describing what extents to add to a
VMFS datastore.
|
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. |
NotSupported | Thrown if the host is not an ESX Server. |
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 |
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call. |
datastore* | ManagedObjectReference
to a Datastore |
The managed object reference of the VMFS datastore
you want extents for.
|
Return Value
Type | Description |
---|---|
HostScsiDisk[] | An array of data objects describing SCSI disks. |
Faults
Type | Description |
---|---|
HostConfigFault | Thrown if unable to query disk information. |
InvalidArgument | Thrown if named VMFS datastore is not a VMFS datastore. |
NotFound | Thrown if the named VMFS datastore is not found. |
NotSupported | Thrown if the host is not an ESX Server. |
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 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 |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call. |
devicePath | xsd:string |
The devicePath of the disk on which datastore creation
options are generated. See devicePath |
vmfsMajorVersion* | xsd:int |
major version of VMFS to be used for
formatting the datastore. If this
parameter is not specified, then the highest
supported VMFS major version for the host
is used. See devicePath Since vSphere API 5.0 |
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 |
NotSupported | Thrown if the host is not an ESX Server. 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 |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call. |
datastore | ManagedObjectReference
to a Datastore |
The datastore to be expanded.
|
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. |
NotSupported | Thrown if the host is not an ESX Server. |
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 HostDatastoreSystem used to make the method call. |
datastore | ManagedObjectReference
to a Datastore |
The datastore to be extended. See devicePath |
devicePath | xsd:string |
The devicePath of the disk on which datastore extension
options are generated. See devicePath |
suppressExpandCandidates* | 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 vSphere API 4.0 |
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 |
NotSupported | Thrown if the host is not an ESX Server. 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 |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call. |
datastore | ManagedObjectReference
to a Datastore |
The datastore to be removed.
|
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 |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call. |
datastore | ManagedObjectReference[]
to a Datastore[] |
each element specifies one datastore to be removed.
|
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a SmsTask |
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 |
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.
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call. |
resolutionSpec | HostUnresolvedVmfsResignatureSpec |
A data object that describes what the disk
extents to be used for creating the new
VMFS volume.
|
Return Value
Type | Description |
---|---|
ManagedObjectReference
to a SmsTask | 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 |
Parameters
Name | Type | Description |
---|---|---|
_this | ManagedObjectReference | A reference to the HostDatastoreSystem used to make the method call. |
datastore* | 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.
|
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. |
NotSupported | Thrown if the datastore argument is set and the localSwapDatastoreSupported capability is not true for the host. |
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 Properties | Local Methods | |
Managed Object Types | Data Object Types | All Properties | All Methods |