Host Storage System Format Vmfs

Host Storage System Format Vmfs

Formats a new VMFS on a disk partition.

Required privileges: Host.Config.Storage

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/HostStorageSystem/{moId}/FormatVmfs
COPY
Path Parameters
string
moId
Required

The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId, in this case HostStorageSystem/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.


Request Body
FormatVmfsRequestType of type(s) application/json
Required
{
    "createSpec": {
        "_typeName": "string",
        "extent": {
            "_typeName": "string",
            "diskName": "string",
            "partition": 0
        },
        "blockSizeMb": 0,
        "majorVersion": 0,
        "volumeName": "string",
        "blockSize": 0,
        "unmapGranularity": 0,
        "unmapPriority": "string",
        "unmapBandwidthSpec": {
            "_typeName": "string",
            "policy": "string",
            "fixedValue": 0,
            "dynamicMin": 0,
            "dynamicMax": 0
        }
    }
}
createSpec
Required

This data object type describes the VMware File System (VMFS) creation specification.

Once created, these properties for the most part cannot be changed. There are a few exceptions.

Authentication
This operation uses the following authentication methods.
Responses
200

A data object that represents the VMFS file system.

Returns HostVmfsVolume of type(s) application/json
This response body class contains all of the following: HostFileSystemVolume
{
    "_typeName": "string",
    "type": "string",
    "name": "string",
    "capacity": 0,
    "blockSizeMb": 0,
    "blockSize": 0,
    "unmapGranularity": 0,
    "unmapPriority": "string",
    "unmapBandwidthSpec": {
        "_typeName": "string",
        "policy": "string",
        "fixedValue": 0,
        "dynamicMin": 0,
        "dynamicMax": 0
    },
    "maxBlocks": 0,
    "majorVersion": 0,
    "version": "string",
    "uuid": "string",
    "extent": [
        {
            "_typeName": "string",
            "diskName": "string",
            "partition": 0
        }
    ],
    "vmfsUpgradable": false,
    "forceMountedInfo": {
        "_typeName": "string",
        "persist": false,
        "mounted": false
    },
    "ssd": false,
    "local": false,
    "scsiDiskType": "string"
}
integer As int32 As int32
blockSizeMb
Required

Deprecated as of vSphere API 6.5, use HostVmfsVolume.blockSize instead.

Block size of VMFS.

Determines maximum file size. The maximum number of blocks is typically fixed with each specific version of VMFS. To increase the maximum size of a VMFS file, increase the block size.

The minimum block size is 1MB.

integer As int32 As int32
blockSize
Optional

Block size of VMFS in KB.

Determines maximum file size. The maximum number of blocks is typically fixed with each specific version of VMFS. To increase the maximum size of a VMFS file, increase the block size.

The minimum block size is 1MB.

integer As int32 As int32
unmapGranularity
Optional

VMFS unmap reclaims unused storage space.

This property determines the granularity of unmap operations. The unit is KB. If not specified, the default value is the same as the block size of VMFS HostVmfsVolume.blockSize. This property cannot be changed after a VMFS volume is created.

string
unmapPriority
Optional

VMFS unmap reclaims unused storage space.

This property determines the processing rate of unmaps. See HostVmfsVolumeUnmapPriorityEnum for supported values. If not specified, the default value is low, which means unmap is processed at low rate. This property can be updated by calling HostStorageSystem.UpdateVmfsUnmapPriority.

unmapBandwidthSpec
Optional

VMFS unmap reclaims unused storage space.

This data object type describes the specification of VMFS unmap bandwidth.

integer As int32 As int32
maxBlocks
Required

Maximum number of blocks.

Determines maximum file size along with blockSize. See information about the blockSize.

integer As int32 As int32
majorVersion
Required

Major version number of VMFS.

string
version
Required

Version string.

Contains major and minor version numbers.

string
uuid
Required

The universally unique identifier assigned to VMFS.

extent
Required

The list of partition names that comprise this disk's VMFS extents.

This property can be accessed via various enclosing objects. In VirtualCenter, where it can be accessed from multiple hosts, the value of this property may differ according to the context in which it is accessed. When accessed from the VmfsDatastoreInfo object, in VirtualCenter, this property reflects the extent information of any one of the hosts visible to the datastore.

For a VirtualCenter system which manages ESX Server 2.x and ESX Server 3.x hosts, this extent information is only correlatable across hosts if the extents are exposed on the same adapter on all hosts which can access them. To find the extent names for a specific host, this same property should be accessed via the host's HostFileSystemVolume object, by correlating the uuid of the VMFS datastore in the VmfsDatastoreInfo object to the uuid in the FileSystemVolume object.

For a Virtual Center system which manages only ESX Server hosts with versions 4.0 onwards , this extent information is correlatable across hosts, irrespective of the adapters the extents are exposed on.

boolean
vmfsUpgradable
Required

Can the filesystem be upgraded to a newer version.

See also HostStorageSystem.UpgradeVmfs.

forceMountedInfo
Optional

When the system detects a copy of a VmfsVolume, it will not be auto-mounted on the host and it will be detected as 'UnresolvedVmfsVolume'.

If user decides to keep the original Uuid and mount it on the host, it will have 'forceMounted' flag and 'forceMountedInfo' set. 'ForceMountedInfo' provides additional information specific to user-mounted VmfsVolume.

boolean
ssd
Optional

Indicates whether the volume is SSD backed.

If unset, the information whether the volume is SSD backed is unknown.

boolean
local
Optional

Indicates whether the volume is backed by local disk.

If unset, the information of the volume is local-disk backed is unknown.

string
scsiDiskType
Optional

The type of disk drives.

See ScsiDiskTypeEnum for supported types. If unset, the default disk drive type is native512.


500

InvalidArgument: if VMFS version specified is not 2 or 3, if blocksize, lock mode, or volume label are invalid, the partition does not exist or is of an invalid type.

AlreadyExists: if the volume name is already being used by another volume on the host.

HostConfigFault: for all other configuration failures.

Returns VimFault of type(s) application/json
This response body class contains all of the following: MethodFault
{
    "_typeName": "string",
    "faultCause": "MethodFault Object",
    "faultMessage": [
        {
            "_typeName": "string",
            "key": "string",
            "arg": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ],
            "message": "string"
        }
    ]
}

Host Storage System Operations
POST
Host Storage System Add Internet Scsi Send Targets
POST
Host Storage System Add Internet Scsi Static Targets
POST
Host Storage System Attach Scsi Lun
POST
Host Storage System Attach Scsi Lun Ex Task
POST
Host Storage System Attach Vmfs Extent
POST
Host Storage System Change NFS User Password
POST
Host Storage System Clear NFS User
POST
Host Storage System Compute Disk Partition Info
POST
Host Storage System Compute Disk Partition Info For Resize
POST
Host Storage System Connect Nvme Controller
POST
Host Storage System Connect Nvme Controller Ex Task
POST
Host Storage System Create Nvme Over Rdma Adapter
POST
Host Storage System Create Software Adapter
POST
Host Storage System Delete Scsi Lun State
POST
Host Storage System Delete Vffs Volume State
POST
Host Storage System Delete Vmfs Volume State
POST
Host Storage System Destroy Vffs
POST
Host Storage System Detach Scsi Lun
POST
Host Storage System Detach Scsi Lun Ex Task
POST
Host Storage System Disable Multipath Path
POST
Host Storage System Disconnect Nvme Controller
POST
Host Storage System Disconnect Nvme Controller Ex Task
POST
Host Storage System Discover Fcoe Hbas
POST
Host Storage System Discover Nvme Controllers
POST
Host Storage System Enable Multipath Path
POST
Host Storage System Expand Vmfs Extent
POST
Host Storage System Extend Vffs
POST
Host Storage System Format Vffs
POST
Host Storage System Format Vmfs
GET
Host Storage System Get Available Field
GET
Host Storage System Get File System Volume Info
GET
Host Storage System Get Multipath State Info
GET
Host Storage System Get Storage Device Info
GET
Host Storage System Get System File
GET
Host Storage System Get Value
POST
Host Storage System Mark As Local Task
POST
Host Storage System Mark As Non Local Task
POST
Host Storage System Mark As Non Ssd Task
POST
Host Storage System Mark As Ssd Task
POST
Host Storage System Mark For Removal
POST
Host Storage System Mark Perennially Reserved
POST
Host Storage System Mark Perennially Reserved Ex Task
POST
Host Storage System Mount Vffs Volume
POST
Host Storage System Mount Vmfs Volume
POST
Host Storage System Mount Vmfs Volume Ex Task
POST
Host Storage System Query Available Ssds
POST
Host Storage System Query NFS User
POST
Host Storage System Query Path Selection Policy Options
POST
Host Storage System Query Storage Array Type Policy Options
POST
Host Storage System Query Unresolved Vmfs Volume
POST
Host Storage System Query Vmfs Config Option
POST
Host Storage System Refresh Storage System
POST
Host Storage System Remove Internet Scsi Send Targets
POST
Host Storage System Remove Internet Scsi Static Targets
POST
Host Storage System Remove Nvme Over Rdma Adapter
POST
Host Storage System Remove Software Adapter
POST
Host Storage System Rescan All Hba
POST
Host Storage System Rescan Hba
POST
Host Storage System Rescan Vffs
POST
Host Storage System Rescan Vmfs
POST
Host Storage System Resolve Multiple Unresolved Vmfs Volumes
POST
Host Storage System Resolve Multiple Unresolved Vmfs Volumes Ex Task
POST
Host Storage System Retrieve Disk Partition Info
POST
Host Storage System Set Custom Value
POST
Host Storage System Set Multipath Lun Policy
POST
Host Storage System Set NFS User
POST
Host Storage System Turn Disk Locator Led Off Task
POST
Host Storage System Turn Disk Locator Led On Task
POST
Host Storage System Unmap Vmfs Volume Ex Task
POST
Host Storage System Unmount Force Mounted Vmfs Volume
POST
Host Storage System Unmount Vffs Volume
POST
Host Storage System Unmount Vmfs Volume
POST
Host Storage System Unmount Vmfs Volume Ex Task
POST
Host Storage System Update Disk Partitions
POST
Host Storage System Update Hpp Multipath Lun Policy
POST
Host Storage System Update Internet Scsi Advanced Options
POST
Host Storage System Update Internet Scsi Alias
POST
Host Storage System Update Internet Scsi Authentication Properties
POST
Host Storage System Update Internet Scsi Digest Properties
POST
Host Storage System Update Internet Scsi Discovery Properties
POST
Host Storage System Update Internet Scsi IP Properties
POST
Host Storage System Update Internet Scsi Name
POST
Host Storage System Update Scsi Lun Display Name
POST
Host Storage System Update Software Internet Scsi Enabled
POST
Host Storage System Update Vmfs Unmap Bandwidth
POST
Host Storage System Update Vmfs Unmap Priority
POST
Host Storage System Upgrade Vmfs
POST
Host Storage System Upgrade Vm Layout