This page explains how to reclaim unused storage space from a Windows VM that uses a VirtIO SCSI disk.
Overview
A Windows virtual machine using a VirtIO SCSI disk may not return unused storage space to the cluster running SC//HyperCore™ HyperVisor after data is deleted within the guest operating system. This happens when TRIM is disabled or a retrim hasn’t run. This page shows how to check TRIM support, enable it if needed, and run a manual retrim to reclaim the space.
Requirements
- SC//HyperCore 9.6 or later
- Virtual disk configured as VirtIO SCSI
- VirtIO drivers installed in the guest OS
- Administrative access to the Windows VM
VirtIO block disks do not support storage reclamation.
Procedure
1. Verify TRIM Support
Open an elevated Command Prompt and run:
fsutil behavior query DisableDeleteNotify
Expected result:
DisableDeleteNotify = 0
Meaning:
| Value | Status |
|---|---|
0 |
TRIM is enabled |
1 |
TRIM is disabled |
2. Enable TRIM (If Necessary)
If the previous command returns DisableDeleteNotify = 1, run this command to enable TRIM:
fsutil behavior set DisableDeleteNotify 0
3. Consolidate Free Space
Before you run the reclaim, consolidate fragmented free space.
Run:
defrag C: /U /V
This gets the filesystem ready to reclaim as much storage as it can.
4. Issue the Reclaim (TRIM) Operation
After defragmentation finishes, run:
defrag C: /L
This sends a retrim command to the storage device, so it can release unused blocks back to the SC//HyperCore cluster.
Alternative Method (PowerShell)
You can also run the retrim from PowerShell:
Optimize-Volume -DriveLetter C -ReTrim -Verbose
This runs the same TRIM operation as defrag C: /L.
Notes
- For best results, run the
defragand retrim operations one after the other. - Storage reclamation does not reduce the virtual disk size. It releases unused blocks back to the cluster’s storage pool instead.
- Windows may issue TRIM operations on its own during scheduled storage optimization tasks. But a manual retrim can help after you delete a lot of data.