When VMware introduced Linked-Clones in View 4.5 there was a new type of disk included called the Disposable Disk. The purpose of this disk was to redirect certain volatile files away from the OS Disk to help reduce linked-clone growth. I have read a lot of designs that utilize disposable disks but it has become clear that there is a lot of confusion and misunderstanding about what they do and exactly how they function. This confusion is highlighted in a View whitepaper called View Storage Considerations which describes disposable disks as:
Utilizing the disposable disk allows you to redirect transient paging and temporary file operations to a VMDK hosted on an alternate datastore. When the virtual machine is powered off, these disposable disks are deleted.
The three elements from this paragraph I want to demystify are:
- What is redirected to the disposable disk?
- Where are disposable disks hosted?
- When are disposable disks deleted/refreshed?
What is redirected?
By default there are three elements that are redirected to the disposable disk. The first is the Windows swap file, View Composer will redirect the Swap file from C: to the disposable disk. It is recommended to set this to a specific size to make capacity planning easier.
The other elements that are redirected are the System Environment Variables TMP and TEMP. By default, the User TEMP and TMP Environment Variables are NOT redirected. However it is highly recommended to remove the User TEMP and TMP Environment variables, if this is done then Windows will use the System Variables instead and the user temporary files will then be redirected to the disposable disk.
Where is the disposable disk stored?
There is a common misconception that like the User Data Disk, the Disposable Disk can be redirected to a different tier. This is not the case and the Disposable Disk is always stored with the OS Disk. In later versions of View you can choose the drive letter within the GUI for the Disposable Disk to avoid conflicts with mapped drives, but this setting and the size are the only customizations you can make to the disposable disk.
When is the disposable disk refreshed?
This is the question that tends to cause the most confusion. Many people I have spoken to have said that it is refreshed when the user logs off, whilst others say it’s on reboot. The Disposable Disk is actually only refreshed when View powers off the VM. User initiated shutdown & reboots as well as power actions within vCenter do not impact the disposable disk. The following actions will cause the disposable disk to be refreshed:
- VM powered off due to the Pool Power Policy set to “Always Powered Off”
This is quite important to understand, as if the Pool Power Policy is set to any of the other settings (Powered On, Do Nothing or Suspend) then your disposable disks are not getting refreshed automatically.
What does all this mean?
Understanding Disposable Disks and their functionality will enable you to design your environment appropriately. The View Storage Reclamation Feature that was introduced in View 5.2 uses an SE Sparse disk for the OS Disk, this allows View to shrink OS disks if files are deleted from within the OS. However only the OS disk is created as an SE Sparse disk, User Data Disks and Disposable Disks are created as a standard VMDK. The key difference with this feature compared with Disposable Disks, is it relies on files being deleted from within the Guest Operating System, where as the Disposable Disk is deleted along with all the files it contains when View powers off the VM. It is also important to note, that currently SE Sparse disks are not supported on VSAN.
If you choose to use Disposable Disks in your design, then depending on your power cycle you may want to add an operational task for administrators to periodically change the Power On setting for the pool within a maintenance window to refresh the Disposable Disk. This is particularly important for the use case of Persistent Desktops which have long refresh/recompose cycles.
Travis Wood is a VMware Senior Solutions Architect