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:
- Shutdown your VM
- Make a copy of you VDI, you can just ctrl+c, ctrl+v
- VirtualBox comes with an utility called VBoxManage.exe which is usually located at
"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe"
- 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
Top comments (2)
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.
Works on Macs as well.