You can use the vdmadmin command with the -M option to mark an instant-clone virtual machine for disk space reclamation. VMware Horizon directs the ESXi host to reclaim disk space on the instant-clone OS disk without waiting for the unused space on the OS disk to reach the minimum threshold that is specified in Horizon Console.

Syntax

vdmadmin -M [-b authentication_arguments] -d desktop -m machine -markForSpaceReclamation

Usage Notes

With this option, you can initiate disk space reclamation on a particular virtual machine for demonstration or troubleshooting purposes.

Space reclamation does not take place if you run this command when a blackout period is in effect.

Before using this option, see "Reclaim Disk Space on Instant Clones" in the Windows Desktops and Applications in Horizon 8 document. This option is only applicable to non-vSAN datastores prior to vSphere 6.7 where space reclamation operation is performed by Horizon.

Options

Table 1. Options for Reclaiming Disk Space on Virtual Machines
Option Description
-d desktop Specifies the name of the desktop pool.
-m machine Specifies the name of the virtual machine.
-MarkForSpaceReclamation Marks the virtual machine for disk space reclamation.

Example

Marks the virtual machine machine3 in the desktop pool pool1 for disk space reclamation.

vdmadmin -M -d pool1 -m machine3 -markForSpaceReclamation