Page 1 of 1
[Solved] Incorrect free space
Posted: 22. Sep 2017, 04:14
by teethdood
Hi all,
I'm having an issue with reported free drive space.
I'm running Windows 10 as Host and Windows Server 2008 R2 as guest.
The Host shows the Guest VM including all snapshots at 335GB.
The Guest has a virtual dynamic size of 1.5TB.
The Guest OS shows C:\ drive total size 1.5TB. Correct so far.
The Guest OS shows C:\ drive used space 874GB + free space 664GB = 1.5TB Total. This is the problem.
When I ran WinDirStat and SpaceSniffer, I get:
Disk usage 236GB
Free space 664GB
Total C:\ space 900GB
There is a problem with my current reported disk usage and that relates to the total C:\ space. There's about 600GB difference between what the Guest OS reports as total space and what WinDirStat says my total space is, and that 600GB difference somehow gets "accounted for" by being added to the used space, I think.
How do I correct this problem? Thank you for your help.
Re: Incorrect free space
Posted: 22. Sep 2017, 07:25
by BillG
The same way as on a physical machine. After using all the standard methods to reclaim space (including emptying the recycle bin), compact the drive.
The free space on a disk is never simply the difference between its total capacity and the size of the files stored on it (except maybe on a fresh install).
The longer a system has been running the larger the amount of "lost" space. A recently installed Windows 10 vm of mine shows 13.6G used from the guest OS, but the size of the .vdi on the host is 17.4G. Windows does not try to reclaim space if there is plenty of unused space available.
I find the best way to compact a .vdi file is to use mpack's Clonevdi program to copy the file with the Compact while copying set.
Re: Incorrect free space
Posted: 22. Sep 2017, 19:40
by teethdood
Thank you for your input Bill,
You did not read my post correctly I'm afraid. I'm not talking strictly about the free space per se. I'm talking about the reported TOTAL size in the Guest OS windows explorer (1.5TB) but using other software like WinDirStat, it shows the TOTAL size to be completely different (900GB). The difference in the TOTAL size somehow gets calculated as USED space in the Guest OS.
Re: Incorrect free space
Posted: 22. Sep 2017, 19:48
by Martin
Please ask the producers of WinDirStat and SpaceSniffer how they calculate these numbers.

Re: Incorrect free space
Posted: 22. Sep 2017, 21:13
by teethdood
Regardless of how WinDirStat and Spacesniffer calculate the TOTAL drive space, I'm still missing 600GB to the USED space category in Guest windows explorer.
When I ran Guest windows explorer to add up all the files including hidden files, I get 236GB used. This is in line with the Host VM file size (335GB) accounting for the different snapshots.
But Guest windows explorer shows 874GB used. The only thing I can think off to account for the difference is somehow the allocated 1.5TB TOTAL size isn't the true TOTAL size. That's why I ran WinDirStat and Spacesniffer to see the real TOTAL size and there it is...900GB TOTAL size.
Re: Incorrect free space
Posted: 22. Sep 2017, 22:35
by erdeslawe
BillG already gave you the answer above, i.e. "compact the VDI"; but for further clarification see
viewtopic.php?f=35&t=8046
Check out the following Topics:
- Q: Why do dynamic VDIs grow far more than the used space?
- Q: How can I reduce the size of a dynamic VDI on disk?
Re: Incorrect free space
Posted: 23. Sep 2017, 18:29
by teethdood
Thank you for helping guys,
I ran the CloneVDI tool with the compact VDI setting enabled. It merges all my snapshots together into 1 VDI, which now stands at 247GB (I could've simply merged all the snapshots in VB to achieve the same thing.)
Upon bootup, the USED space is still the same, 874GB in Guest windows explorer. I had hoped that clonevdi compact setting (I did not use sdelete as I read that clobevdi compact is even better) would solve the problem, but it didn't.
Anything else I should try?
Thank you again.
Re: Incorrect free space
Posted: 23. Sep 2017, 18:54
by mpack
Then I would look elsewhere for your problem. As someone else has suggested, you should ask the WinDirStat people why their reporting of disk space disagrees with Windows. I don't see that VirtualBox has anything to do with it.
Compaction has nothing to do with this either. It never did. That can only affect the allocation of space on the host.
Re: Incorrect free space
Posted: 24. Sep 2017, 17:12
by teethdood
Thank yoy everyone for helping again.
Mpack: I thought so originally too that the Host wasn't the problem (host reports only 335GB including snapshots) so why use clonevdi to compact anything. My thought was that there was something wrong with the VB disk creation process where I created a 1.5TB virtual image, but VB really only created a 900GB instead and wrongfully called it 1.5TB. That's why I asked for help here in VB forum.
At any rate, I was able to resolve the problem and I felt like a dolt. I never ran chkdsk, and chkdsk /f fixed the partition mapping issue that was there. Now my USED space in Guest is correct.
Thank you again!
Re: Incorrect free space
Posted: 24. Sep 2017, 18:20
by mpack
Thanks for reporting back.
Re: [Solved] Incorrect free space
Posted: 14. Dec 2019, 10:44
by alberto.villar
Hello,
I had similar problems wins an Ubuntu host and Windows 10 guest. The original VM had 30 GB drive and I did an extension to 50 GB. Windows was running out of space but "diskpart" was showing 30 GB and no free space. I had no snapshots and the guest was a recent clone
Restarting the guest did not get me the 20 GB free space. The solution, in my case, was powering the machine off and then on. "diskpart" was then able to see the extra 20 GB and I could extend the partition.
Regards, Alberto
Re: [Solved] Incorrect free space
Posted: 14. Dec 2019, 11:04
by socratis
Alberto,
You resurrected three different threads with the same copy/paste message:
- 2016-10-25: Windows doesn't see enlarged virtual disk
- 2017-04-16: [Solved] Windows & Cannot See Unallocated Disk Space
- 2017-09-22: [Solved] Incorrect free space
The solution that you provided is already in the FAQ and the threads have been locked, we don't want to keep "zombies" around...
By the way, keep in mind that according to the
The Forum Posting Guide,
duplicate posts are not allowed.
I kind of have to break that rule myself, just to justify why the threads have been locked.