When your ESXi host uses the SCSI or NVMe protocol to connect to storage in the Virtual Volumes environment, the data and configuration virtual volumes are formatted with VMFS6. As a result, the space reclamation process available for VMFS can also be applied to both the data and configuration Virtual Volumes. When you reclaim space on the Virtual Volumes datastore, you can use the esxcli storage vvol command to manually unmap free blocks from the virtual volumes.

Note: Starting with 8.0 Update 3:
  • NVMe backed data Virtual Volumes support space reclamation requests from guest operating systems.
  • Configuration Virtual Volumes support automatic space reclamation. To reclaim the space manually, follow the steps in the given procedure.

Prerequisites

Procedure

  1. Obtain the storage container ID and meta vVol UUID for your configuration virtual volume formatted with VMFS.
    1. Navigate to the VM that contains virtual volumes.
      For example:
      [root@:~] cd /vmfs/volumes/vvol_datastore/VM_1
    2. From the path, extract the storage container ID and meta vVol UUID.
      [root@:/vmfs/volumes/vvol:4abe7eb4bf234ee0xxxxxxxxx/rfc4122.1ffee4bd-9c55-49b9-876d-xxxxxxxx
      In this example,

      Container ID is vvol:4abe7eb4bf234ee0xxxxxxxxx

      Meta vVol UUID is rfc4122.1ffee4bd-9c55-49b9-876d-xxxxxxxx

  2. Use the following command to unmap free blocks from the configuration volume.
    esxcli storage vvol virtualvolume unmap
    The command takes the following options:
    Option Description
    -c|--container-id=<str> Storage container ID. The option is required.
    -n|--reclaim-unit=<long> Number of VMFS blocks to unmap per iteration.
    -u|--uuid=<str> Meta vVol UUID. The option is required.
  3. Verify that you successfully unmapped the blocks by checking the hostd log file.
    grep "Total Unmapped blocks from vmfs" /var/run/log/hostd.log

Example:

  1. [root@:~]esxcli storage vvol virtualvolume unmap -c vvol:4abe7eb4bf234ee0xxxxxxxxx -u rfc4122.1ffee4bd-9c55-49b9-876d-xxxxxxxx
  2. [root@:~] grep "Total Unmapped blocks from vmfs" /var/run/log/hostd.log

    The output looks similar to the following:

    2023-06-01T10:27:45.836Z In(166) Hostd[1000342556]: [Originator@6876 sub=Libs opID=esxcli-5f-1861 sid=523fac9d user=root] Unmap: Done : Total Unmapped blocks from vmfs6 volume rfc4122.1ffee4bd-9c55-49b9-87 6d-xxxxxxxx : 0 (LFB Pass)

    2023-06-01T10:28:13.279Z In(166) Hostd[1000342556]: [Originator@6876 sub=Libs opID=esxcli-5f-1861 sid=523fac9d user=root] Unmap: Done : Total Unmapped blocks from vmfs6 volume rfc4122.1ffee4bd-9c55-49b9-87 6d-xxxxxxxx : 259421 (SFB Pass)