VM size not dynamically?

Discussions related to using VirtualBox on Linux hosts.

VM size not dynamically?

Postby Plagrö » 14. Mar 2020, 10:44

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 152 times
Plagrö
 
Posts: 46
Joined: 27. May 2018, 14:57

Re: VM size not dynamically?

Postby Pernat1y » 14. Mar 2020, 11:48

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.
Hosts: Arch Linux, Windows 10;
Guests: Windows 10, Kali, Fedora/RHEL.
Pernat1y
 
Posts: 27
Joined: 11. Jun 2018, 11:43
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: Windows 10, Kali, Fedora/RHEL

Re: VM size not dynamically?

Postby mpack » 14. Mar 2020, 11:57

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.
mpack
Site Moderator
 
Posts: 31666
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VM size not dynamically?

Postby Plagrö » 14. Mar 2020, 14:32

Thank you.
Plagrö
 
Posts: 46
Joined: 27. May 2018, 14:57


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 17 guests