VDI: disk would overflow creating image

Discussions related to using VirtualBox on Windows hosts.
Post Reply
jamboree
Posts: 4
Joined: 19. Jun 2020, 11:49

VDI: disk would overflow creating image

Post by jamboree »

Dear all,

I am currently using the following setup:
Virtualbox: Version 6.0.22 r137980 (Qt5.6.2)
Host: Windows 10 Enterprise (10.0.17134)
Guest: Windows 10 Enterprise (10.0.19041.0)
I have downloaded a Windows 10 VirtualBox image from [here] https://developer.microsoft.com/en-us/w ... -machines/.

The Storage type is "Dinamically allocated".

Since I am running it in a machine with low resources and the image is increasing in size rapidly (a few Gbytes a day) I realize I will run out of resources in a matter of days/weeks.

When reviewing some threads in this forum I have found out that one of the suggestions is to change the Storage type from "Dynamic" to "Fixed", but when attempting to do so, this is what I get.

Code: Select all

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe clonemedium disk "C:\Users\demo\VirtualBox VMs\WinDev2102Eval\WinDev2102Eval-disk001.vdi" "C:\Users\demo\VirtualBox VMs\WinDev2102Eval\WinDev2102Eval-disk001_fixed.vdi" --variant Fixed --format VDI
0%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage.exe: error: Failed to clone medium
VBoxManage.exe: error: Could not create the clone medium 'C:\Users\demo\VirtualBox VMs\WinDev2102Eval\WinDev2102Eval-disk001_fixed.vdi'.
VBoxManage.exe: error: VDI: disk would overflow creating image 'C:\Users\demo\VirtualBox VMs\WinDev2102Eval\WinDev2102Eval-disk001_fixed.vdi' (VERR_DISK_FULL).
VBoxManage.exe: error: VDI: setting image size failed for 'C:\Users\demo\VirtualBox VMs\WinDev2102Eval\WinDev2102Eval-disk001_fixed.vdi' (VERR_DISK_FULL)
VBoxManage.exe: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleCloneMedium(struct HandlerArg *)" at line 1023 of file VBoxManageDisk.cpp
Why is this happening?

Is there any other way to prevent the image from growing this fast?

Thanks in advance for your answers.

Kind regards.
Last edited by mpack on 23. Mar 2021, 15:05, edited 1 time in total.
Reason: Enable Microsoft download link
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: VDI: disk would overflow creating image

Post by mpack »

jamboree wrote: Since I am running it in a machine with low resources and the image is increasing in size rapidly (a few Gbytes a day) I realize I will run out of resources in a matter of days/weeks.
Not really.

Dynamic VDIs do not grow indefinitely, or linearly. They grow only when a 1MB sector in the disk image is written to for the first time, in which case that space will be allocated on the host and hence the host file grows by 1MB. Since every disk has a finite number of 1MB chunks, it will become increasingly unlikely that any one of them is written to for the first time. Even if you go through them systematically, the VDI can't grow larger than the defined capacity set in the VM settings when the VM was created.

Of course you could do things to worsen your prospects, e.g. if you create a snapshot that takes you back to 0 blocks written, so you could eventually lose up to another <VM disk capacity> host space again.


Changing from dynamic to fixed will do absolutely nothing to help you: I'm certain that nobody ever suggested that around here - and nobody anywhere who knows what they're talking about. All that would do is force the VDI to occupy the maximum space possible, right now. Or error out while trying to do so. This is the opposite of what you actually want. The advice you picked up is so bad that I suspect you were being trolled.
Post Reply