VirtualBox – How To Increase/Decrease Size of .VDI Disk on Windows

In this article, we will show you how to resize a Virtual Box dist (.vdi) on Windows machine in case you run out of space in it or simply you want to set another size for it.

In order to do this, we will need to use the command-line interface VBoxManage, which we can completely control VM VirtualBox from the command line such as resize VM dist, create VM, clone VM, etc.

On the Windows machine, you can find it in the Oracle Virtual Box’s installation folder:

C:\Program Files\Oracle\VirtualBox\VBoxManage.exe

If you do not have this path added in Environment Variables yet, you can add it for a short command when using it in the command line.

And here is the command, let’s open command prompt windows and use VBoxManage to resize .vdi dist as follows:

  • If you have VBoxManage.exe added in Environment Variables:
VBoxManage modifymedium </path/to/your/disk.vdi> --resize <new size in MB>
  • If you DON’T have VBoxManage.exe added in Environment Variables:
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifymedium </path/to/your/disk.vdi> --resize <new size in MB>

For example, I want to change the size of my QA-Win10x64.vdi disk to 90GB, then the command will be:

VBoxManage modifymedium "D:\VirtualBox VMs\QA-Win10x64\QA-Win10x64.vdi" --resize 90000

That’s all!

Please tell us to know whether or not the above command works in your machine by adding a comment in the comment form below. Thanks for reading the article.

Leave a Reply