A Problem I Have With VirtualBox.

This is for discussing general topics about how to use VirtualBox.
Post Reply
UnknownBeing
Posts: 1
Joined: 14. Jun 2022, 22:32

A Problem I Have With VirtualBox.

Post by UnknownBeing »

Hi there.

I use Windows 10 as my host, and I've been using VirtualBox for at least a few years now.
This problem never started until recently. I use VirtualBox 5.2.44 because the latest version has some issues on my Windows XP Virtual Machines with Microsoft Agent. But that is not my issue here.

When you make a Virtual Machine, you either have the options of dynamically allocated space, or a "Fixed size".

But no matter what option I press, the machine's size will get bigger every time. How?

Say that I make a virtual machine that only had 1GB of space, with 500MB remaining.
My actual VM would still be a gigabyte left.
Then, I wanted to add a 450MB file.
My VM would become 1.4GBs on my Windows 10 host, although the machine says there's only 1GB in total of space for the machine.
Then I deleted the 450MB file on my VM, right and get the amount of space back, right?
Well, my Windows 10 host STILL has the VM itself at 1.4GBS, even though the VM inside would actually be 1GBs in total, with 500MB remaining of free space.

And if I fill up the 500MB of free space, my 1.4GB VM would turn into 1.9GBS on Windows 10.

Basically, if I add more space on my Virtual Machines, the size stays on the actual Virtual Machine on Windows 10, and it won't go smaller unless I restore a screenshot, or delete the VM entirely.

This problem is wasting space on my Windows 10 machine THAT DOESN'T NEED TO BE THERE. I had a 1GB VM that suddenly turned into 2GBS because of this that I had to delete.

WHY IS THIS HAPPENING? I tried reinstalling VirtualBox, problem still remains. Doubt I can find this stupid problem anywhere on Google, BECAUSE THIS DOESN'T HAPPEN TO ANYBODY ELSE.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: A Problem I Have With VirtualBox.

Post by scottgus1 »

UnknownBeing wrote:dynamically allocated space, or a "Fixed size".

But no matter what option I press, the machine's size will get bigger every time. How?
Dynamic starts off small and gets bigger as it is filled up. Fixed gets full size right away and never gets bigger afterwards. The behavior you report is normal for dynamic but not for fixed. If you see different on the fixed drive, you'll need to show us what you're seeing.
UnknownBeing wrote:Then I deleted the 450MB file on my VM, right and get the amount of space back, right?
No, one the virtual disk gets bigger on the host, it does not get smaller again.
UnknownBeing wrote:I fill up the 500MB of free space, my 1.4GB VM would turn into 1.9GBS on Windows 10.
This depends on where the VM OS chooses to write the data. If it decides to write to different sectors than it did before, then the data becomes new sectors in the disk file, and the file gets bigger.

Generally, a modern OS needs 50-ish GB to allow for OS and data. You can pick the final size of the virtual disk, fixed or dynamic, and disks can be made smaller or bigger with built-in or 3rd-party tools.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: A Problem I Have With VirtualBox.

Post by mpack »

Sorry, but this report makes zero sense. It is impossible for a VDI to outgrow capacity without corrupting the header (i.e. having a header that doesn't match the image), and VirtualBox has separate tests for that - so you'd get a VERR_NOT_RECOGNIZED error on next VM start. If no such error is being reported then no such error exists.

So, I'd like to see the evidence (not assertion or guesswork) that should have been included in the OPs post.

I'm also puzzled by the teeny numbers. 500MB and <2GB sizes are typical when talking about RAM, no modern Windows would deal in disk sizes that small. Is the OP conflating RAM and disk allocation questions? I am suspecting that this is a case of someone looking at RAM usage on the host, and not understanding how disk caches work.
Post Reply