Host Storage System Unmount Vmfs Volume

Host Storage System Unmount Vmfs Volume

Unmount the Vmfs volume.

An unmounted volume cannot be used for any filesystem operation requiring I/O. In contrast to removal, this operation does not destroy or alter partitions on which vmfs volumes reside. The mountState will be persisted across filesystem rescans and host reboots. See MountVmfsVolume.

unmountVmfsVolume is part of the Unmount / Detach workflow used when a device will be permanently removed.

                     Mounted Vmfs Volume
    unmountVmfsVolume  |  ^ mountVmfsVolume
                       V  |
                     Unmounted Vmfs Volume

         Attached Scsi Device (honors I/O)
    detachScsiLun      |  ^ attachScsiLun
                       V  |
  Detached Scsi Device (does not honor I/O)

It is safe to unprovision a Lun from the Storage array *only* after a Scsi device is detached.

The best practice for decommisioning a Lun would be to find out the set of subsystems that a Lun is being used for. Many of the systems are listed as exceptions in the function documentation.

One typical workflow could be:

  • Find out if the device is used as a Vmfs Extent. (See VmfsVolume.Extent API)
  • Unmount the Vmfs Volume.
  • Find out if device is used by the Diagnostic system (See Diagnostic System API).
  • Deactivate the diagnostic system, if it is being used.
  • Find out if this device is used to back a VM's RDM (See VirtualMachine API).
  • Remove this device from the VM.
  • Detach the Scsi device.
  • On success, it is safe to decommision the Lun at this point.

See also DetachScsiLun.

Required privileges: Host.Config.Storage

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/HostStorageSystem/{moId}/UnmountVmfsVolume
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
UnmountVmfsVolumeRequestType of type(s) application/json
Required
{
    "vmfsUuid": "string"
}
string
vmfsUuid
Required

vmfsUuid

Authentication
This operation uses the following authentication methods.
Responses
204

No Content

Operation doesn't return any data structure

500

NotFound: if VMFS Uuid is not found on the host.

InvalidState: if

  • The volume is already unmounted.
  • The volume is inaccessible.

ResourceInUse: if

  • There is any VM registered on this volume.
  • 1 or more programs have I/O outstanding on this volume.

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