|
| 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* | 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. |
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. |
| HostConfigFault | Thrown if unable to create the datastore on host. |
| RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error. |
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. |
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. |
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.
|
| spec | VmfsDatastoreExtendSpec |
The specification to extend 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. |
This operation will filter out disks that are currently in use by an existing VMFS unless the VMFS using the disk is one being 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. |
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 |
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. |
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 creation
options are generated. See devicePath |
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. 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. |
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. |
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 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. |
| Top of page | Local Properties | Local Methods | |
| Managed Object Types | Data Object Types | All Properties | All Methods |