dev/sda1 is 29Gb we will increase to 40Gb. I personally would then boot the machine just to check it boots and everything is in order however this is optional, while I was there I took a quick snip of the HDD space. The next stage is optional: Take the new VDI file and create a new virtual machine using the new HDD file. If you try to expand the a VMDK with VirtualBox you get a nice error as below: This can be done at the command line (with Admin privs) like below. I actually tested this out for a non trivial virtual machine first, this is how I got on:įirst like me if your using a VMDK you will need to convert the disk image to either a VDI or VHD file.
My particular disk image was in VMDK that I needed to increase by an additional 10Gb. The process involves expanding the virtual image file then using GParted to expand the partition. I thought I would share my experience by walking through the steps I took in resizing a VirtualBox Linux disk for the Debian based OS that I had. I came across a need to expand the hdd on Linux virtual machine, as I had run out of space.