Shrinking a virtual disk reclaims unused space in the virtual disk. If there is empty space in the disk, this process reduces the amount of space the virtual disk occupies on the host drive. Normal users and processes—that is users and processes without root or administrator privileges—within virtual machines have the capability to invoke this procedure. However, if this is done repeatedly, the virtual disk can become unavailable, effectively causing a denial of service.
In most datacenter environments, disk shrinking is not done, so you can disable this feature.
To disable disk shrink for a virtual machine:
-
Power off the virtual machine. Do not skip this step.
-
Remove the virtual machine from the inventory.
-
Edit the virtual machine's .vmx file and add the following lines:
isolation.tools.diskWiper.disable = "TRUE"
isolation.tools.diskShrink.disable = "TRUE"
Note: For more information about editing a .vmx file, see Tips for editing a .vmx file (1714).
-
Re-add the virtual machine to the inventory.
-
Power on the virtual machine.