After you create disk partitions on host
storage, you can configure VMFS datastores.
To create a VMFS datastore, use the following
steps.
Procedure
-
Configure and install any third-party
adapter your storage requires and rescan the adapters by calling
HostStorageSystem.RescanAllHba.
-
Call
HostDatastoreSystem.QueryAvailableDisksForVmfs
for information about disks that can be used to contain VMFS datastore.
This method filters 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. The
method returns an array of
HostScisiDisk objects.
-
Call
HostDatastoreSystem.QueryVmfsDatastoreCreateOptions
for information about options for for creating a new VMFS datastore. The call
returns an array of
VmfsDatastoreCreateOption
data objects that allow you to access the UUIDs of suitable data stores.
-
(Optional) If no suitable partitions for
your VMFS volume exist, you might have to create them. Use the
ComputeDiskPartitionInfo and
UpdateDiskPartitions methods
in
HostStorageSystem.
-
Create the datastore.
- Call
HostDatastoreSystem.CreateVmfsDatastore to
create a VMFS datastore. The method takes a
VmfsDatastoreCreateSpec
data object that consists of a a
partition, a
HostVmfsSpec, and an
optional
extent. The
HostVmfsSpec allows you
to specify the block size, extent, major version, and volume name for the VMFS.
- Call
HostDatastoreSystem.CreateNasDatastore to
create a network-attached storage based datastore.
Results
You can later expand and extend the VMFS
datastore by calling one of the following methods.
- Call first
QueryVmfsDatastoreExpandOptions and then
ExpandVmfsDatastore to
expand an existing VMFS datastore using the specification provided in the
VmfsDatastoreExpandSpec data
object (which contains the name of the extent and partition information).
ExpandVmfsDatastore
increases the size of the datastore up to the full size provisioned for the
datastore, if necessary.
- Call first
QueryVmfsDatastoreExtendOptions and then
ExtendVmfsDatastore to
extend an existing VMFS datastore using the specification provided in the
VmfsDatastoreExtendSpec data
object.