Increasing Size of your VirtualBox virtual disk

Today my PHP application on my linux virtual server was giving me a ton of error on simply allocating space for sessions. I couldn’t have actually ran out of space but it was worth the check.

df -h

100% of my virtual image was used and since I did not want to go to the hassle of re-doing everything again, after a bit of research, this is what I have found that helped me a ton:

VBoxManage modifyhd /path/to/the/virtual/disk/image.vdi –resize 20480

This would work perfectly, but my image wasn’t a VDI it was a VMDK which will throw you an error when you do the same process.

There is a way around it:

1st – VBoxManage clonehd /path/to/the/virtual/disk/image.vmdk /path/to/save/the/new/virtual/disk/image.vdi –format vdi
2nd – VBoxManage modifyhd /path/to/new/virtual/disk/image.vdi –resize 20480

For a 8GB Virtual Image it can take up to 20 minutes for the whole process.

Note: This was done in command line for OSX.

About mcloide

Making things simpler, just check: View all posts by mcloide

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: