Scripting Object - VcHostDatastoreSystem

Scripting-object corresponding to
HostDatastoreSystem
Attribute of
VcHostConfigManager

Scripting 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.

Attributes

Name Type Description
capabilitiesVcHostDatastoreSystemCapabilities

@since VI API 2.5
datastoreVcDatastore []

@since VI API 2.5
idString

@since Unknown
morefVcManagedObjectReference

returns the ManagedObjectReference of this ManagedObject @since Unknown
sdkConnectionVcSdkConnection

@since Unknown
sdkIdString

@since Unknown
typeStringDeprecated.

Returns the name for the this managed object's vim type @since Unknown
vimHostVcSdkConnection

@since Unknown
vimIdString

@since Unknown
vimTypeString

@since Unknown

Methods

Methods defined in this Scripting Object
_getRef, checkVmFileAccessibility, configureDatastorePrincipal, createLocalDatastore, createNasDatastore, createTrigger, createVmfsDatastore, createVvolDatastore, createVvolDatastoreInternal, expandVmfsDatastore, extendVmfsDatastore, notifyDatastore, processVmfsDatastoreUpdate, queryAvailableDisksForVmfs, queryUnresolvedVmfsVolumes, queryVmfsDatastoreCreateOptions, queryVmfsDatastoreExpandOptions, queryVmfsDatastoreExtendOptions, removeDatastore, removeDatastoreEx_Task, resignatureUnresolvedVmfsVolume_Task, updateLocalSwapDatastore, updateVvolDatastoreInternal

expandVmfsDatastore

Increases the capacity of an existing VMFS datastore by expanding (increasing the size of) an existing extent of the datastore. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcDatastore

arg1VcVmfsDatastoreExpandSpec


Return Value

Type Description
VcDatastore

_getRef

@since Unknown

Parameters

NameTypeDescription
None

Return Value

Type Description
VcManagedObjectReference

notifyDatastore

Notifies the datastore(s) on some specific action. @since vSphere API 6.0

Parameters

NameTypeDescription
arg0String

arg1VcDatastore []


Return Value

Type Description
None

processVmfsDatastoreUpdate

Process a vmfs datastore for corresponding operation. After create, remove, expand, extend a datastore from vc, vc issues a rescan vmfs in all the host where the datastore is connected (skipping the one which performed this operation). We are removing this rescan vmfs call by adding a light weight probe to update other hosts's caches in a granular manner. @since vSphere API 6.5

Parameters

NameTypeDescription
arg0String

arg1VcHostDatastoreSystemVmfsEventType


Return Value

Type Description
None

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. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcDatastore


Return Value

Type Description
VcHostScsiDisk []

updateVvolDatastoreInternal

Update Virtual-Volume based storage-container datastore. @since vSphere API 6.0

Parameters

NameTypeDescription
arg0VcVvolDatastoreSpec


Return Value

Type Description
None

resignatureUnresolvedVmfsVolume_Task

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.

@since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcHostUnresolvedVmfsResignatureSpec


Return Value

Type Description
VcTask

createNasDatastore

Creates a new network-attached storage datastore. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcHostNasVolumeSpec


Return Value

Type Description
VcDatastore

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. @since vSphere API 4.0

Parameters

NameTypeDescription
None

Return Value

Type Description
VcHostUnresolvedVmfsVolume []

extendVmfsDatastore

Increases the capacity of an existing VMFS datastore by adding new extents to the datastore. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcDatastore

arg1VcVmfsDatastoreExtendSpec


Return Value

Type Description
VcDatastore

createTrigger

@since Unknown

Parameters

NameTypeDescription
timeoutNumber

filterString

conditionString

filterToSyncString


Return Value

Type Description
Trigger

createVvolDatastore

Create a Virtual-Volume based datastore @since vSphere API 6.0

Parameters

NameTypeDescription
arg0VcHostDatastoreSystemVvolDatastoreSpec


Return Value

Type Description
VcDatastore

createVvolDatastoreInternal

Creates a new Virtual-Volume based storage-container datastore. @since vSphere API 6.0

Parameters

NameTypeDescription
arg0VcVvolDatastoreSpec


Return Value

Type Description
VcDatastore

createVmfsDatastore

Creates a new VMFS datastore. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcVmfsDatastoreCreateSpec


Return Value

Type Description
VcDatastore

removeDatastore

Removes a datastore from a host. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcDatastore


Return Value

Type Description
None

queryVmfsDatastoreExtendOptions

Queries for options for increasing the capacity of an existing VMFS datastore by adding new extents using space from the specified disk. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcDatastore

arg1String

arg2Boolean


Return Value

Type Description
VcVmfsDatastoreOption []

removeDatastoreEx_Task

Remove one or more datastores. This is an asynchronous, batch operation of removeDatastore. Please see {@link vim.host.DatastoreSystem#removeDatastore} for operational details. Note: This API currently supports removal of only NFS datastores. @since vSphere API 6.0

Parameters

NameTypeDescription
arg0VcDatastore []


Return Value

Type Description
VcTask

queryVmfsDatastoreCreateOptions

Queries options for creating a new VMFS datastore for a disk. @since VI API 2.5

Parameters

NameTypeDescription
arg0String

arg1Number


Return Value

Type Description
VcVmfsDatastoreOption []

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. @since VI API 2.5

Parameters

NameTypeDescription
arg0String

arg1String


Return Value

Type Description
None

createLocalDatastore

Creates a new local datastore. @since VI API 2.5

Parameters

NameTypeDescription
arg0String

arg1String


Return Value

Type Description
VcDatastore

checkVmFileAccessibility

Check if the file objects for the specified Virtual Machine IDs are accessible on the datastore. @since vSphere API 5.5

Parameters

NameTypeDescription
arg0String []


Return Value

Type Description
VcHostDatastoreSystemVmFileAccessibilityResult []

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. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcDatastore


Return Value

Type Description
VcVmfsDatastoreOption []

updateLocalSwapDatastore

Choose the {@link vim.host.ConfigInfo#localSwapDatastore 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. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcDatastore


Return Value

Type Description
None