How to expand Virtual Box VM Storage
I have read through a few Superuser questions and on google and used every way I can think of after looking through the documents on how to expand my virtual box storage. I am running Windows 10, AMD Ryzen 1600, 16gb RAM. VBox --version = 6.0.
EDIT: current size = 20,000 not dynamic
The error that returns is below:
C:\Program Files\Oracle\VirtualBox>VBoxManage modifyvdi --resize 32000 5abb39a5-8f61-43d9-ad20-4810d026b68f
0%...
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage.exe: error: Failed to resize medium
VBoxManage.exe: error: Resizing to new size 33554432000 is not yet supported for medium 'C:\Users\colto\VirtualBox VMs\linuxMint\linuxMint.vdi'
VBoxManage.exe: error: Details: code VBOX_E_NOT_SUPPORTED (0x80bb0009), component MediumWrap, interface IMedium
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleModifyMedium(struct HandlerArg *)" at line 768 of file VBoxManageDisk.cpp
I have also tried running it as modifyhd and modifymedium.
C:\Program Files\Oracle\VirtualBox>VBoxManage showhdinfo "C:\Users\colto\VirtualBox VMs\linuxMint\linuxMint.vdi"
UUID: 5abb39a5-8f61-43d9-ad20-4810d026b68f
Parent UUID: base
State: created
Type: normal (base)
Location: C:\Users\colto\VirtualBox VMs\linuxMint\linuxMint.vdi
Storage format: VDI
Format variant: fixed default
Capacity: 20612 MBytes
Size on disk: 20615 MBytes
Encryption: disabled
In use by VMs: linuxMint (UUID: 51c5a4fd-f68c-47c7-bc59-d1acec94c163)
I really wanted a fixed hard disk but I also needed the ability to change this dynamically, and none of the answers (at the time) were adequate to my needs so here is my answer to my question:
The simplest way to complete this if you have a fixed storage setting is to simply copy the .vdi in question. This can be done through the GUI in the current VBox version at the time of writing this.
- Click the top menu (above your virtual machines list) "tools"
- Enter hard disk tab on right hand GUI
- right click and copy the .vdi you'd like to expand
- Name the copied .vdi and be sure to select "dynamic"
- After it is done copying, enter the .vdi settings that was created, click "Storage"
- Attach the copied .vdi to SATA
- The copied versions size will now be able to be changed inside the "tools>hardisk" menu that you entered at the beginning of this list
After changing the size run your newly copied machine and enter the disk management section (wherever that may be on your virtual OS) and expand the newly freed space to be used.
If you prefer a fixed storage, you can always revert it back by following these steps but instead of selecting dynamic, select "fixed". Clone, as far as I can tell doesn't work unless you use the terminal and tag it correctly as the GUI automatically sets the hard disk type to that it was cloned from.