In vSphere 5.1 and later, you can configure the disk space reclamation feature for View Composer linked-clone desktop pools and automated farms. Starting in vSphere 5.1, Horizon 7 creates linked-clone virtual machines in an efficient disk format that allows ESXi hosts to reclaim unused disk space on the linked clones, reducing the total storage space required for linked clones.
For instant clones, this feature is not needed because the clones are always recreated when users log off.
As users interact with the virtual machines, the linked clones' OS disks grow and can eventually use almost as much disk space as full-clone virtual machines. Disk space reclamation reduces the size of the OS disks without requiring you to refresh or recompose the linked clones. Space can be reclaimed while the virtual machines are powered on and users are interacting with the machines.
In Horizon Administrator, you cannot directly initiate disk space reclamation for a pool. You determine when Horizon 7 initiates disk space reclamation by specifying the minimum amount of unused disk space that must accumulate on a linked-clone OS disk to trigger the operation. When the unused disk space exceeds the specified threshold, Horizon 7 directs the ESXi host to reclaim space on that OS disk. Horizon 7 applies the threshold to each virtual machine in the pool.
You can use the vdmadmin -M option to initiate disk space reclamation on a particular virtual machine for demonstration or troubleshooting purposes. See the Horizon 7 Administration document.
From vSphere version 6.7 and later, VMFS-6 supports the Automatic UNMAP feature, which reclaims dead blocks automatically and asynchronously (if it is not disabled by the vSphere or vCenter Server administrator). Therefore, periodic space reclaim operations by Horizon 7 do not reclaim significant space. In Horizon Administrator, the option Space reclaimed in the latest run over the last 7 days typically shows a value of 0.00 GB. You do not need to manually invoke View Composer APIs using the vdmadmin.exe -markForSpaceReclamation command for space reclamation. The Automatic UNMAP feature is not supported for Windows 7 therefore, this behavior does not apply to Windows 7 virtual machines.
You can configure disk space reclamation on linked clones when you create a new pool or edit an existing pool. For an existing pool, see "Tasks for Upgrading Pools to Use Space Reclamation" in the Horizon 7 Upgrades document.
This feature is not available for virtual machines stored on a vSAN datastore or a Virtual Volumes datastore.
If a View Composer is refreshing, recomposing, or rebalancing linked clones, disk space reclamation does not take place on those linked clones.
Disk space reclamation operates only on OS disks in linked clones. The feature does not affect View Composer persistent disks and does not operate on full-clone virtual machines.
Native NFS snapshot technology (VAAI) is not supported in pools that contain virtual machines with space-efficient disks.
The following procedure applies to linked-clone desktop pools. The steps are similar for automated farms.
Verify that your vCenter Server and ESXi hosts, including all ESXi hosts in a cluster, are version 5.1 with ESXi 5.1 download patch ESXi510-201212001 or later.
Verify that VMware Tools that are provided with vSphere version 5.1 or later are installed on all the linked-clone virtual machines in the pool.
Verify that all the linked-clone virtual machines in the pool are virtual hardware version 9 or later.
Verify that the virtual machines use SCSI controllers. Disk space reclamation is not supported on virtual machines with IDE controllers.
For Windows 10 virtual machines, verify that the machines are running in vSphere 5.5 U3 or later.
For Windows 8 or 8.1 virtual machines, verify that the machines are running in vSphere 5.5 or later. Disk space reclamation is supported on Windows 8 or 8.1 virtual machines in vSphere 5.5 or later.
For Windows 7 virtual machines, verify that the machines are running in vSphere 5.1 or later.
Verify that disk space reclamation is enabled in vCenter Server. This option ensures that the virtual machines in the pool are created in the efficient disk format that is required to reclaim disk space. See the Horizon 7 Administration document.
- In Horizon Administrator, display the Advanced Storage page.
New desktop pool
Start the Add Desktop Pool wizard to begin creating an automated desktop pool. Follow the wizard configuration prompts until you reach the Advanced Storage page.
Existing desktop pool
Select the existing pool, click Edit, and click the Advanced Storage tab. To upgrade a pool to support space reclamation, see "Upgrade Desktop Pools for Space Reclamation" in the Horizon 7 Upgrades document.
- Select the Reclaim VM disk space check box.
- In the Initiate reclamation when unused space on VM exceeds text box, type the minimum amount of unused disk space, in gigabytes, that must accumulate on a linked-clone OS disk before ESXi starts reclaiming space on that disk.
For example: 2 GB.
The default value is 1 GB.
What to do next
You can configure blackout days and times during which disk space reclamation and regeneration for View Storage Accelerator do not take place. See Set Storage Accelerator and Space Reclamation Blackout Times for View Composer Linked Clones.
In Horizon Administrator, you can select and select a machine to display the last time space reclamation occurred and the last amount of space reclaimed on the machine.