VMware ESXi and vSphere Cluster Management

How to Delete a VMFS Datastore in VMware vSphere

Learn how to safely delete a VMFS datastore in the vSphere Client, check shared-host dependencies, verify removal, and retire the backing storage correctly.

Overview

A VMFS datastore is a VMware Virtual Machine File System volume created on block storage and presented to one or more ESXi hosts. A datastore is the storage container that vSphere uses for virtual machine files and other supported content. A LUN is a logical block-storage unit, commonly supplied by a SAN, that may provide the backing storage for a VMFS datastore.

Deleting a VMFS datastore is a destructive vSphere administration operation. It removes the VMFS datastore from the participating vSphere inventory and makes the files stored there unavailable through that datastore. Treat the action as irreversible unless the required data has already been migrated or protected elsewhere.

What Deleting a VMFS Datastore Does

When a VMFS datastore is deleted, vSphere removes the datastore's filesystem and inventory visibility from the relevant environment. Depending on the storage workflow and platform version, the underlying device may remain visible to ESXi; deleting the datastore alone does not automatically decommission the SAN LUN or physical storage.

All content stored on the datastore must be considered at risk, including:

  • Virtual machine configuration files, virtual disks, swap files, logs, and snapshots.
  • Registered virtual machines and templates that still depend on files there.
  • ISO images, floppy images, and files accessed through the datastore browser.
  • Content-library items, diagnostic files, and administrator-uploaded files.

Deleting the datastore differs from unmounting it from one ESXi host. Unmounting removes that host's mount while preserving the VMFS volume and its contents for other hosts or a later remount. Deletion removes the datastore itself from vSphere administration and should be used only when the datastore is no longer required.

Delete, Unmount, Detach, or Retire the LUN?

OperationPrimary purposeEffect on VMFS dataEffect on host visibilityTypical use case
Delete datastoreRemove an unwanted VMFS datastore from vSphereDestructive to the VMFS datastore and its stored contentDatastore disappears from the participating inventory; the device may still be visibleRetiring an empty or fully migrated datastore
Unmount datastoreStop one host from mounting a datastorePreserves the VMFS volume and filesDatastore is removed from that host but may remain available to other hostsTemporarily removing a shared LUN from one host
Detach storage deviceRemove an unused backing device from ESXiDoes not itself mean that the VMFS data was deletedDevice is no longer available to that ESXi hostPreparing a released device for storage-side retirement
Remove SAN presentation or delete LUNRetire storage at the SAN or array layerCan destroy or make the backing data unavailableAll hosts lose access to the presented storageDecommissioning a LUN or physical storage resource

Pre-Deletion Safety Checks

Complete the following checks before selecting the delete action. Use the datastore browser to inspect files where appropriate.

CheckHow to verifyWhy it matters
Virtual machines migrated or powered offReview each VM's configuration, virtual disks, snapshots, swap location, and logs. Migrate files with Storage vMotion or another approved method, or power off and move them offline.A VM can remain dependent on a datastore even when its main virtual disk appears to be elsewhere.
No active tasks use the datastoreReview Recent Tasks and Events for backup, replication, Storage vMotion, provisioning, snapshot consolidation, maintenance, and host operations.Deleting storage during an active operation can cause failures or file loss.
Other ESXi hosts assessedList every host that can see the shared VMFS volume, including hosts outside the immediate cluster and hosts connected through the same SAN.A shared datastore can be used by multiple hosts. Removing it without coordination makes its files unavailable to all users.
Important files backed up or movedInventory and copy templates, ISO and floppy images, content-library items, diagnostic files, and administrator-uploaded files.These files may not be obvious from a VM inventory.
Correct datastore and backing device identifiedValidate the datastore name, capacity, VMFS version where relevant, mount points, extents, and backing device or LUN identity.Prevents deleting a similarly named production datastore or the wrong storage resource.
Required permissions availableConfirm the administrator's vCenter and datastore privileges, or use an approved role with the required storage permissions.The delete action may be hidden or disabled without sufficient authorization.

Dependency inventory

Check registered VMs, templates, ISO images, floppy images, content-library items, backup repositories, replication targets, snapshot chains, and files visible in the datastore browser. Also check VM configuration files and virtual disks individually; moving only a VM's disks does not necessarily move its configuration, snapshot, swap, or log files.

Confirm that no host process, maintenance workflow, backup task, replication task, snapshot consolidation, Storage vMotion operation, or provisioning job is using the datastore. If the datastore is shared, coordinate with every connected ESXi host and the teams that administer storage, backup, and replication.

Deleting the Datastore with the vSphere Client

The exact labels can vary slightly between vSphere versions, but the workflow is generally the same. Perform this procedure from vCenter Server when the datastore is managed centrally.

  1. Select the target ESXi host in the vCenter inventory. An ESXi host is the hypervisor server that runs virtual machines and accesses datastores.
  2. Open Related Objects and choose Datastores, or open the global Datastores inventory view.
  3. Select the intended VMFS datastore. Carefully compare its name, capacity, backing device or LUN, connected hosts, and workload status with your change record.
  4. Open the datastore's actions menu and choose the delete datastore action.
  5. Read the warning. Confirm deletion only after completing the dependency, backup, and shared-host checks.
  6. Wait for the task to finish. Do not remove SAN presentation or power off storage devices while vSphere is still processing the operation.

Optional ESXi CLI Verification

The following commands can help inspect mounted filesystems, VMFS extents, and storage devices before or after a change. They are verification commands, not a substitute for the supported client workflow unless the ESXi version and environment explicitly support an equivalent method.

esxcli storage filesystem list
esxcli storage vmfs extent list
esxcli storage core device list
  • esxcli storage filesystem list displays mounted filesystems and datastore mount information.
  • esxcli storage vmfs extent list helps associate VMFS volumes with their extents and backing devices.
  • esxcli storage core device list displays storage-device identity and characteristics.

Post-Deletion Verification

  1. Check Recent Tasks and Events for a successful completion message or a detailed failure reason.
  2. Confirm that the datastore no longer appears in the affected host's datastore list or the global Datastores inventory view.
  3. Check for inaccessible or orphaned VMs. A VM that still references files on the deleted datastore may show missing disks, an inaccessible configuration, or an orphaned inventory entry.
  4. If the backing LUN will be retired, review host storage adapters and devices to determine whether the device remains visible and whether a separate detach operation is required.
  5. Record the datastore name, backing-device identity, migration or backup destination, completion time, affected hosts, and approval or change-record identifier.

Storage Retirement Workflow

Datastore deletion is only one stage of storage retirement. Use this order:

  1. Migrate or back up all workloads and required files.
  2. Remove VM, template, backup, replication, snapshot, and administrative-file dependencies.
  3. Delete the datastore when permanent removal is intended, or unmount it when the VMFS volume must be preserved.
  4. Verify that vSphere tasks have completed and that all relevant hosts have released the datastore.
  5. Detach the backing device from ESXi when required by the approved procedure.
  6. Only then remove SAN zoning or LUN masking, and finally decommission or delete the storage on the array.

Coordinate the final storage-side steps with the storage administrator. Do not remove storage presentation before ESXi hosts have safely released the datastore and backing device.

Practical Examples

Retiring an old shared SAN datastore

  1. Inventory every VM, template, ISO, content-library item, snapshot, and other file on the old datastore.
  2. Migrate VM configuration files and virtual disks to the replacement datastore. Move or back up ISO files, templates, and administrative files.
  3. Check cluster members, hosts outside the cluster, and every host connected through the shared SAN.
  4. Confirm that backups, replication, Storage vMotion, snapshot consolidation, and provisioning tasks no longer use the old datastore.
  5. Delete the datastore through vCenter and verify task completion and inventory removal.
  6. Proceed with device detachment and SAN-side retirement only after the vSphere work is complete.

Removing an unused local VMFS datastore

  1. Confirm that the datastore is local to the intended ESXi host rather than shared with other hosts.
  2. Validate that it is empty, or copy all required files elsewhere.
  3. Select the datastore from the host's storage view and validate its capacity and backing device.
  4. Use the delete datastore action, confirm the warning, and verify that the local datastore no longer appears.

Choosing unmount instead of delete

Suppose a VMFS LUN must remain intact, but one ESXi host should temporarily stop accessing it. Use the host-level unmount workflow. Unmounting preserves the VMFS volume and its data; it does not permanently delete the datastore. Do not choose the destructive delete action for this scenario.

Troubleshooting

The delete datastore action is unavailable or disabled

  • Verify that the account has the required vCenter and datastore privileges; see assigning permissions if role configuration is needed.
  • Confirm that the selected object is a deletable VMFS datastore and not another storage object.
  • Check whether the datastore or backing device is still in use.
  • Use the appropriate host context or Datastores inventory view. The action may not be exposed from every inventory location.

Deletion reports that the datastore is in use

  • Locate VM configuration, disk, snapshot, swap, or log files that remain on the datastore.
  • Unmount or remove mounted ISO images and other file references.
  • Wait for or safely stop backup, replication, migration, provisioning, and snapshot-related tasks.
  • Review every ESXi host with access to the shared datastore, not only the host currently selected.

A VM becomes inaccessible after removal

Stop further destructive storage changes. The VM may still depend on files that were not migrated, or the wrong datastore may have been selected. Recover the required files from retained storage or backup, then re-register or repair the VM only after its configuration and virtual disks are available. Improve the dependency inventory before attempting future removals.

The datastore is gone from vSphere but the device remains visible

This is expected when only the datastore-level operation was performed. Deleting the VMFS datastore does not automatically remove the LUN from SAN zoning, LUN masking, or the storage array. Follow the separate device-detach and storage-retirement procedure with the storage administrator.

Exam-Relevant Distinctions

  • VMFS: A clustered filesystem used by ESXi for VM and related files on block storage.
  • Datastore: A vSphere storage container presented to ESXi.
  • Shared datastore: A datastore accessible by more than one ESXi host.
  • Unmount: Remove a datastore mount from a host while preserving the VMFS volume and contents.
  • Detach device: Remove an unused underlying storage device from ESXi.
  • Storage vMotion: Move a powered-on VM's files between datastores.
  • Datastore deletion: A destructive vSphere action; it is not the same as unmounting, detaching a device, or deleting the LUN.

For related storage administration, review the VMware ESXi online course, adding an ESXi host to vCenter inventory, and datastores in VMware vSAN.