DEV Community

GaMa
GaMa

Posted on

6 2

Virtualbox Increase Disk Size How to Resize a VirtualBox Linux VDI Disk under Windows Host

I usually set a big amount of space for my VMs, but this time I created an Ubuntu VM with just 15GB of dynamic allocated space. I wanted to use it "just to test stuff" and I knew I would probably make a mess and that VM won´t last much. But, all things went more than great and I ended up using it as my "prod" environment for now, this is were the guest started to complain about the limited space left, I did a quick search in Google and I got the following:

  1. Shutdown your VM
  2. Make a copy of you VDI, you can just ctrl+c, ctrl+v
  3. VirtualBox comes with an utility called VBoxManage.exe which is usually located at "c:\Program Files\Oracle\VirtualBox\VBoxManage.exe"
  4. To modify the size of your VDI to 25GB execute the following command:

C:\path\of\your\vdifile\"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd yourvdifilename.vdi --resize 25000

Output:

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Start your guest VM and in my case it registered the new space automatically but if your guest didn´t you can follow the instructions detailed here: http://derekmolloy.ie/resize-a-virtualbox-disk/

Props to derekmolloy from where I took this information

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (2)

Collapse
 
arnolde profile image
Ethan Arnold

Before anyone else blindly follows these instructions which are really easy... In most cases you actually do need to use a partition manager to enlargen the partition, as described on the derekmolloy page.

Collapse
 
greatvovan profile image
Vladimir

Works on Macs as well.

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay