I can't be sure but from looking at some of the (not very complete) documentation on VMware Workstation, here;s what I think is happening:
The cleanup process is examining the NTFS file system, It appears to be looking for swap/page files (which can be safely deleted because they are re-created by Windows at boot time). It's also looking for disk blocks that have been returned to the free NTFS free block chain (from files that have been deleted). That information is used to see if disk blocks for the VMDK files can be returned to the host.
I agree with @ColoradoMarmot that since the NTFS file system is being manipulated/examined, it would be a good idea not to automate the cleanup. Perform it manually only after having a backup of the VM.
Without cleanup, the size of the vmdk files reported by Fusion (not factoring in snapshots) would (in my mind) be roughly equivalent to the amount of space that Windows reports as being used, plus the amount of deleted disk space that's been returned to the NTFS free block chain. Whether you consider that "bloat" or just normal operation of thinly allocated disks is debatable.
I'm not sure how aggressively NTFS reuses free space these days. If I remember correctly once upon a time it would allocate new space out of the largest area of free space, which would contribute to requesting new allocation out of a thinly provisioned disk. Thin-friendly file systems use the smaller free space "chunks" more aggressively, reducing the need to "grab a new allocation" out of the thin pool (in the VMware case, that's "expand the vmdk file"). SSDs make the re-use of those smaller blocks more viable, since there's no seek time/rotational latency like on HDDs that would penalize access time due to fragmentation.
------------------------------
- Paul (technogeezer)
------------------------------
Original Message:
Sent: Jun 03, 2024 12:22 PM
From: ColoradoMarmot
Subject: Clean Up Virtual Machine - Reclaimable Space
I have had issues with it deleting space that wasn't free in a very large VM. So now I only do it manually, and after I make a backup.
One thing to do, is inside the VM, run 'Disk Cleanup' as an administrator. That will delete all the windows update cache files (which can get huge).
Original Message:
Sent: Jun 03, 2024 08:46 AM
From: Daniel Britt
Subject: Clean Up Virtual Machine - Reclaimable Space
Using VMWARE Fusion with Windows 11 ARM - I often will go into General Settings and notice there are several GB of "reclaimable" disk space that can be cleaned up after a session.
My understanding is that this is especially helpful after deleting items from the VM (such as exporting files to external HDD and deleting it from the VM directly in Windows), the "reclaim space" clean up feature actually helps to reduce the VM file size overall.
My questions are twofold:
- Is there any danger to allowing the setting to enable "Clean up disks after shutting down virtual machine?" I'm hesitant to have some automatic setting go wrong and glitch up the VM before I've had the chance to make a good working copy of the VM somewhere.
I keep duplicates of this VM and replace those backup duplicates daily, sometimes multiple times a day.
My fear is that the clean-up process could theoretically cause damage to the VM before I've had a chance to duplicate the file (which is done only after the machine has complete been shut down and not in use).
- Even after very basic use and minimal disk/storage additions, the VM seems to always have "reclaimable" space to clean up after each session. What types of files are likely causing 3-4 GB of such reclaimable space each time? Alternatively, what would happen if I never "cleaned up virtual machine" -- would it just bloat the file size relative to its maximum allotment I have set for it? Would it run less efficiently? (I have a large host Hard Drive and not worried about running things to the max, but still just curious). THANKS!