VMware ESXi and vSphere Cluster Management

Remove a VMFS Datastore in VMware ESXi

Learn when to delete or unmount a VMFS datastore in VMware ESXi, including safety checks, prerequisites, workflows, troubleshooting, and verification.

Removing a VMware Virtual Machine File System (VMFS) datastore requires choosing between two different operations: deleting the datastore permanently or unmounting it from one ESXi host. These operations have very different consequences.

A VMFS datastore is a logical storage container formatted with VMware Virtual Machine File System. ESXi uses it to store virtual machine configuration files, virtual disks, snapshots, swap files, templates, ISO images, and other files. The datastore may be backed by local storage or by shared storage such as a SAN LUN.

Delete the datastore only when its structure and contents are no longer required. Unmount it when a particular ESXi host must stop using the datastore while the underlying files should remain available for recovery or for other hosts.

Delete Versus Unmount

OperationUnderlying data outcomeEffect on ESXi host accessEffect on other hostsAppropriate use caseKey precautions
Delete datastoreRemoves the VMFS datastore structure. Stored files become unavailable through that datastore.The selected host loses the datastore.Every host with access to the same storage can lose access to the datastore and its files.Permanent retirement of storage whose data is no longer needed.Back up required data, evacuate workloads, verify the target, and confirm the destructive warning.
Unmount datastoreDoes not intentionally erase the underlying VMFS files.The datastore is removed from the mounted datastore inventory of the selected host.Other hosts can continue using it if they still have valid access and dependencies are preserved.Removing one host's access, preparing storage changes, or preparing a later device detachment.Clear VM and service dependencies, disable required storage features, and verify the correct host.

Deleting a datastore is not a way to detach one ESXi host from shared storage. If the goal is to remove only one host's access, unmount the datastore on that host instead.

Decision framework

  1. Choose delete only if the datastore and all data on it are no longer needed by any host, virtual machine, service, or recovery process.
  2. Choose unmount if the data must be retained, if other hosts must continue using the datastore, or if you are preparing to remove a storage device or LUN later.
  3. If you are uncertain, do not delete. Stop and confirm ownership, backups, dependencies, and the intended storage identifier.

Pre-Removal Safety Checks

Before either operation, identify everything that depends on the datastore. A virtual machine can depend on a datastore even when its powered-on console appears to be running elsewhere.

Dependency typeExamplesCheck before deleteCheck before unmount
Virtual machine filesVMX configuration, VMDK virtual disks, snapshots, suspend files, and virtual machine swap filesMove or remove every required file and unregister or migrate affected virtual machines as appropriate.Ensure no virtual machine on the selected host has files on the datastore.
Templates and imagesVirtual machine templates, ISO images, installation media, and scriptsCopy required content elsewhere and update references.Remove host or automation references to the content.
Cluster and storage servicesDatastore clusters, Storage DRS, Storage I/O Control, and vSphere HA datastore heartbeatingConfirm no service still requires the datastore.Clear the specific configuration dependencies before unmounting.
Shared-host usageOther ESXi hosts, clusters, backup systems, and automationVerify that no host or service needs the datastore.Confirm that only the selected host is being disconnected.
  • Confirm the exact datastore name, ESXi host, storage device, filesystem UUID if available, and LUN identifier.
  • Power off or migrate every affected virtual machine before deletion or unmounting. A powered-off VM can still have files resident on the datastore.
  • Move or remove virtual machine files, templates, ISOs, snapshots, and other content that must be retained.
  • Create and verify backups before deletion. A backup that has not been tested or confirmed may not provide a usable recovery path.
  • Check whether another host or service still uses the datastore, especially when the storage is shared.

Unmount Readiness Checklist

Unmounting has additional prerequisites because ESXi and vSphere services may use a datastore for more than virtual machine files.

RequirementHow to validateWhy it mattersRequired remediation if not ready
No virtual machines remain residentReview virtual machine file locations, virtual disks, snapshots, configuration files, and swap locations.The host cannot safely unmount storage that still contains active or registered workload dependencies.Power off and migrate the virtual machine or move its files to another datastore.
Not a datastore cluster memberReview datastore cluster membership in the vSphere Client.Datastore cluster management may expect the datastore to remain available.Remove the datastore from the datastore cluster or follow the approved datastore-cluster change procedure.
Storage I/O Control disabledOpen the datastore configuration and verify that Storage I/O Control is disabled.Storage I/O Control manages storage I/O resource allocation and can block or complicate unmounting while enabled.Disable Storage I/O Control according to the organization's change procedure.
Not selected for vSphere HA datastore heartbeatingReview vSphere HA datastore heartbeat configuration for the cluster.HA uses heartbeat datastores to help determine host and virtual machine state during failures.Choose alternate eligible heartbeat datastores, then confirm the target is no longer referenced.
Not used by Storage DRSReview Storage DRS and datastore cluster configuration.Storage DRS may make placement and balancing decisions involving the datastore.Remove the dependency from Storage DRS or remove the datastore from the relevant datastore cluster.

Delete a VMFS Datastore

Use the vSphere Client or ESXi Host Client. Exact menu names vary by vSphere and ESXi version, but the operation is performed from datastore management.

  1. Complete the safety checks and confirm that all required data has been backed up or moved.
  2. Open the storage or datastore inventory and select the intended VMFS datastore.
  3. Review the datastore's summary and configuration information. Compare its capacity, backing device, identifier, and connected hosts with the change plan.
  4. Open the datastore actions menu and choose the option labeled Delete datastore or the equivalent destructive removal action.
  5. Read the warning. Confirm that the datastore and its stored files are no longer required by any host, virtual machine, service, or recovery process.
  6. Confirm the operation.
  7. Refresh datastore and host storage views. Verify that the datastore no longer appears for connected hosts that used the deleted VMFS datastore.

Deletion removes the VMFS datastore structure from the storage and makes its files unavailable through that datastore. It is appropriate for permanently retiring obsolete storage, not for merely removing one host from a shared datastore.

Example: permanent storage retirement

  1. Power down or migrate every virtual machine using the obsolete datastore.
  2. Move templates, ISO images, snapshots, and other retained files.
  3. Back up anything that must remain recoverable and verify the backup.
  4. Check all connected hosts and services for remaining dependencies.
  5. Delete the datastore, confirm the destructive warning, and verify that it is absent from the expected host inventories.

Unmount a VMFS Datastore

Unmounting removes a datastore's mounted availability from one selected ESXi host. It does not intentionally erase the VMFS files, and it does not automatically remove the datastore from other hosts.

  1. Identify the specific ESXi host from which access must be removed.
  2. Complete the unmount readiness checklist.
  3. In the vSphere Client, select the host and open its storage or datastore view. In the ESXi Host Client, open the host's storage inventory.
  4. Select the target datastore and choose Unmount datastore or the equivalent action.
  5. Review the prerequisite and warning messages. Do not continue if a virtual machine, heartbeat, datastore cluster, Storage DRS, or Storage I/O Control dependency remains.
  6. Confirm the unmount.
  7. Refresh the selected host's storage inventory and verify that the datastore is no longer mounted on that host.
  8. Check other hosts separately. If they are intended to retain access, verify that the datastore remains available to them.

Unmounting is separate from detaching a storage device. After a successful unmount, a later, separately approved procedure may detach the backing device from the ESXi host and then remove the LUN presentation from the SAN. Do not treat those later actions as part of the unmount itself.

Example: removing one host from shared storage

  1. Confirm that other ESXi hosts must continue using the shared datastore.
  2. Remove virtual machine placement and service dependencies from the selected host and datastore.
  3. Disable Storage I/O Control, remove the datastore from relevant Storage DRS or datastore-cluster management, and choose alternate vSphere HA heartbeat datastores if necessary.
  4. Unmount the datastore from the selected host only.
  5. Verify that the selected host no longer lists the datastore while other hosts retain access.

Example: preparing to remove a SAN LUN

  1. Clear virtual machine, cluster, HA, Storage DRS, and Storage I/O Control dependencies.
  2. Unmount the datastore from the intended ESXi host.
  3. Verify that the datastore is absent from that host and that no paths are being used by workloads.
  4. Continue with the organization's approved storage-device detachment and SAN LUN presentation-removal process.

Post-Action Verification

Verification should cover both the datastore state and the workloads that might have depended on it.

  • Confirm whether the operation was deletion or unmounting and whether the result matches the change plan.
  • Review the datastore inventory on the affected host or hosts.
  • Check virtual machine inventory, configuration locations, virtual disk paths, snapshot locations, and swap-file locations.
  • Review storage paths and device visibility if a later device-detachment step is planned.
  • Check host, cluster, HA, and storage alarms for unexpected dependencies or path problems.
  • For an unmount, verify that other hosts retain access when shared access is intended.
  • For a deletion, verify that no required datastore or virtual machine files were left behind.
  • Record the action, date and operator, affected hosts, datastore name, storage or LUN identifier, backup location, reason for removal, and follow-up storage actions.

Troubleshooting

The unmount action is unavailable or fails validation

Common causes include virtual machines or files remaining on the datastore, membership in a datastore cluster, enabled Storage I/O Control, vSphere HA heartbeat usage, or Storage DRS dependencies.

  1. Identify each dependency from the validation message and datastore configuration.
  2. Review virtual machine file locations, including snapshots and swap files.
  3. Move or remove workloads and content as appropriate.
  4. Remove the datastore from the relevant cluster or automation configuration.
  5. Disable Storage I/O Control and select alternate HA heartbeat datastores where required.
  6. Recheck the configuration, then retry the unmount only after every prerequisite is satisfied.

A virtual machine becomes inaccessible after removal

Stop further destructive actions. The VM's disks, configuration, snapshots, or supporting files may have remained on the removed datastore. Other possibilities include selecting the wrong datastore or deleting a shared datastore that other hosts still required.

Compare the change record with the selected datastore and backing device. Assess storage presentation and available backups, then restore access or recover files using the organization's approved recovery procedures.

The datastore cannot be safely deleted

Do not force deletion when required data is not backed up, workloads still depend on the datastore, or other ESXi hosts still need it. Migrate or remove dependent workloads, create and verify backups, and confirm the storage owner and target identifier. If only host-level disconnection is intended, use unmounting instead.

Key Exam and Operations Notes

  • VMFS is the filesystem used by ESXi datastores for virtual machine and related files.
  • Delete datastore is destructive; it removes the VMFS datastore structure and affects access for hosts using that storage.
  • Unmount datastore removes mounted access from a selected host while leaving the underlying data in place.
  • A datastore cluster is a group of datastores managed together, commonly with Storage DRS.
  • Storage I/O Control manages storage I/O resource allocation among virtual machines.
  • A vSphere HA datastore heartbeat helps HA determine host and virtual machine state during failures.
  • Storage DRS balances virtual machine placement and storage utilization across datastores in a datastore cluster.
  • A LUN is a logical storage volume presented by SAN or other block storage.
  • Device detachment is a separate operation performed after appropriate preparation and, commonly, after unmounting.