Page 1 of 1

VM size not dynamically?

Posted: 14. Mar 2020, 10:44
by Plagrö
Hello,

I have a VM of Win7 32bit.
The VM is about 70 GB.
So yesterday I deleted about 14 GB system files like tmp, windows snapshots and so on.
My expectation was, that now the file will be reduced, so that I just have about 56 GB.
But the file has still the same size. Why?

Where do I have the VDI from?
Answer: I made an image from my old system, then converted it into VDI.
But I assume, that this is a dynamically VDI? Isn't it?

Thank you.
VM-1.png
VM-1.png (118.67 KiB) Viewed 914 times

Re: VM size not dynamically?

Posted: 14. Mar 2020, 11:48
by Pernat1y
Disc size can only grow, not reduce it's size.
You can try to shrink it manually, but that's not something that works automatically.

Re: VM size not dynamically?

Posted: 14. Mar 2020, 11:57
by mpack
Plagrö wrote: My expectation was, that now the file will be reduced, so that I just have about 56 GB.
But the file has still the same size. Why?
Because deleting a file does not un-write the disk sectors. The data is still there, so the hard drive simulation still has to store it. There are tools you can use to "compact" a disk, i.e. un-write all sectors not currently mapped to a guest file, but this is only really useful if your regular usage patterns won't immediately replace the data.

Disks tend to reach an equilibrium size based on your usage patterns, i.e. it becomes increasingly unlikely that a given sector is being written to for the first time.

Re: VM size not dynamically?

Posted: 14. Mar 2020, 14:32
by Plagrö
Thank you.