Datastore APIs

Datastore APIs

Represents a storage location for virtual machine files.

A storage location can be a VMFS volume, a directory on Network Attached Storage, or a local file system path.

A datastore is platform-independent and host-independent. Therefore, datastores do not change when the virtual machines they contain are moved between hosts. The scope of a datastore is a datacenter; the datastore is uniquely named within the datacenter.

Any reference to a virtual machine or file accessed by any host within the datacenter must use a datastore path. A datastore path has the form "[<datastore>] <path>", where <datastore> is the datastore name, and <path> is a slash-delimited path from the root of the datastore. An example datastore path is "[storage] path/to/config.vmx".

You may use the following characters in a path, but not in a datastore name: slash (/), backslash (\), and percent (%).

All references to files in the VIM API are implicitly done using datastore paths.

When a client creates a virtual machine, it may specify the name of the datastore, omitting the path; the system, meaning VirtualCenter or the host, automatically assigns filenames and creates directories on the given datastore. For example, specifying My_Datastore as a location for a virtual machine called MyVm results in a datastore location of My_Datastore\MyVm\MyVm.vmx.

Datastores are configured per host. As part of host configuration, a HostSystem can be configured to mount a set of network drives. Multiple hosts may be configured to point to the same storage location. There exists only one Datastore object per Datacenter, for each such shared location. Each Datastore object keeps a reference to the set of hosts that have mounted the datastore. A Datastore object can be removed only if no hosts currently have the datastore mounted.

Thus, managing datastores is done both at the host level and the datacenter level. Each host is configured explicitly with the set of datastores it can access. At the datacenter, a view of the datastores across the datacenter is shown.

Operations
POST
Datastore Datastore Enter Maintenance Mode
Puts the datastore in maintenance mode.
POST
Datastore Datastore Exit Maintenance Mode Task
Takes the datastore out of maintenance mode.
POST
Datastore Destroy Task
Destroys this object, deleting its contents and removing it from its parent folder (if any).
POST
Datastore Destroy Datastore
Removes a datastore.
GET
Datastore Get Alarm Actions Enabled
Whether alarm actions are enabled for this entity.
GET
Datastore Get Available Field
List of custom field definitions that are valid for the object's type.
GET
Datastore Get Browser
DatastoreBrowser used to browse this datastore.
GET
Datastore Get Capability
Capabilities of this datastore.
GET
Datastore Get Config Issue
Current configuration issues that have been detected for this entity.
GET
Datastore Get Config Status
The configStatus indicates whether or not the system has detected a configuration issue involving this entity.
GET
Datastore Get Custom Value
Custom field values.
GET
Datastore Get Declared Alarm State
A set of alarm states for alarms that apply to this managed entity.
GET
Datastore Get Disabled Method
List of operations that are disabled, given the current runtime state of the entity.
GET
Datastore Get Effective Role
Access rights the current session has to this entity.
GET
Datastore Get Host
Hosts attached to this datastore.
GET
Datastore Get Info
Specific information about the datastore.
GET
Datastore Get Iorm Configuration
Configuration of storage I/O resource management for the datastore.
GET
Datastore Get Name
Name of this entity, unique relative to its parent.
GET
Datastore Get Overall Status
General health of this managed entity.
GET
Datastore Get Parent
Parent of this entity.
GET
Datastore Get Permission
List of permissions defined for this entity.
GET
Datastore Get Recent Task
The set of recent tasks operating on this managed entity.
GET
Datastore Get Summary
Global properties of the datastore.
GET
Datastore Get Tag
The set of tags associated with this managed entity.
GET
Datastore Get Triggered Alarm State
A set of alarm states for alarms triggered by this entity or by its descendants.
GET
Datastore Get Value
List of custom field values.
GET
Datastore Get Vm
Virtual machines stored on this datastore.
POST
Datastore Is Clustered Vmdk Enabled
Check whether clustered VMDK feature is enabled on this datastore.
POST
Datastore Refresh Datastore
Explicitly refreshes free-space and capacity values in *Datastore.summary* and *Datastore.info*.
POST
Datastore Refresh Datastore Storage Info
Refreshes all storage related information including free-space, capacity, and detailed usage of virtual machines.
POST
Datastore Reload
Reload the entity state.
POST
Datastore Rename Task
Renames this managed entity.
POST
Datastore Rename Datastore
Renames a datastore.
POST
Datastore Set Custom Value
Assigns a value to a custom field.
POST
Datastore Update Virtual Machine Files Task
Update file paths embedded in virtual machine files on the datastore.
POST
Datastore Update V Vol Virtual Machine Files Task
Scan a VVol storage container to update file paths and objectID pointers embedded in virtual machine files on a given storage container.