I am trying to optimize a Windows 7 virtual machine disk image. The disk image is a sparsely-allocated image that grows as needed. By zeroing out the bytes in free disk space (in guest) that were left over from deleted files that used to occupy some of that space, I can tell the hypervisor to re-shrink the VM disk image.
To do so, I run the SDelete tool from the Windows SysInternals Suite, in guest:
sdelete -z c:
While running SDelete, when it said it was 99% complete, my virtual machine hung, completely unresponsive. After rebooting the VM, the guest's C: drive reports 98% used, with only 1.5 GiB space free.
I have tried searching in the usual locations (c:\Windows\Temp
, %TEMP%
, etc.) looking for regular and hidden files, with no luck.
Where does SDelete store the temporary file(s) it uses to gobble up free space and zero it? My hunch is that by deleting that file, I will see my free space plummet to an expected size of about 20 GiB.
If that file doesn't exist, how do I reclaim that space?
Edit: I am using SDelete v2.0.
sdelete -z
just gobbles up unallocated space and writes zeroes to it, by just creating a temp file, and increasingly adding to it until it can't anymore. My VM is fine otherwise (it runs). But because Sdelete didn't finish and clean up after itself, it still has a large file "claimed". I just can't seem to find where the file resides so I can delete the entry in the file table.sdelete -z
allows for.