"Virtual Size" equals to "Actual Size"

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Kevin_0304
Posts: 7
Joined: 4. Mar 2021, 03:55

"Virtual Size" equals to "Actual Size"

Post by Kevin_0304 »

Hello Forum,

I have one issue about my VM of Ubuntu. The disk size of the VM is having the issue — "Virtual Size" equals to "Actual Size", but I know the used size of the VM is only about 20GB at most. Please check out the screenshots I posted here below...
1.png
1.png (28.28 KiB) Viewed 6254 times
2.png
2.png (12.16 KiB) Viewed 6254 times
Thanks in advance for your help to point me out if I was wrong anywhere?!
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: (Help) "Virtual Size" equals to "Actual Size"

Post by mpack »

I'm not sure I understand your point, but neither Virtual size nor Actual size has anything to do with "used size".

Virtual size = the size you chose at VM creation, i.e. this is the capacity of the drive.

Actual size = how much host disk space has been allocated so far. If this equals virtual size then it's most usually because you created a fixed size disk - but the graphic above says otherwise, so the other reason is because every sector on the drive has now been written to. Usually you'd have to have done something unexpected like run a disk surface test for this to happen.

Used size = how much data the guest OS reports as being currently stored on the disk, this number is not relevant to VirtualBox or to either of the above numbers, and is especially irrelevant if you selected a fixed size disk. For a dynamic disk all VirtualBox knows is how many sectors have been written to.

If you have accidentally made the disk grow to max size (e.g. with that surface write test) then you can fix it by compacting the disk. The easiest way would be using CloneVDI. Be sure to set the "Keep UUID" checkbox so that the compacted clone will be a direct replacement after it's renamed.

Edit. DANGER DANGER. One obstacle I've just noticed is that the VDI seems to be a "difference disk", i.e. it isn't a stand alone disk. Given the VDI name this must be a linked clone. It looks like you maxed out the original VDI size (or it's a fixed size disk) and then you created the linked clone presented above. You can't compact a linked clone or the original VM it's based on, and you can't compact fixed size disks. You'll need to turn both clones into stand alone VMs (by cloning) in order to sort this mess out.
Kevin_0304
Posts: 7
Joined: 4. Mar 2021, 03:55

Re: "Virtual Size" equals to "Actual Size"

Post by Kevin_0304 »

mpack wrote:I'm not sure I understand your point, but neither Virtual size nor Actual size has anything to do with "used size"...
Thank you @mpack for your post! :-) I was actually meaning, why my Actual size equaled to Virtual size...? Because my Used size of my VM is only around 20GB. LIke you said, probably the sectors were written somehow and to be full.
Post Reply