Expand/Resize Virtualbox Disk Size (Windows Host, Ubuntu Guest)

December 13, 2019

Resize VirtualBox VDI Disk

Launch command prompt

cd "C:\Program Files\Oracle\VirtualBox"

Change Disk Size

VBoxManage modifymedium disk "D:\vm\Lubuntu\Lubuntu.vdi" --resize 24576

NOTE: 24576 = 1024 * 24 = 24G.

NOTE: You can check for disk location with VirtualBox -> Settings -> Storage and click on Disk.

Pesize Partition

You need to repartition the disk as well.

Since I am resizing a mounted disk, I need to use GParted Live CD. Download gparted-live-1.0.0-5-i686.iso.

At VirtualBox -> Settings -> Storage, Add Optical Drive or select existing Optical Drive

VirtualBox add GParted Live CD

Start the Ubuntu Guest and you shall be prompted with the GParted Screen: select GParted Live (Default Settings), keymap and language.

Expand the extended File System: Right click on it and select Resize/Move.

NOTE: The option is disabled if you are not using Live CD, since it is mounted.

GParted Resize

GParted Resize

Resize the Partition.

GParted Resize

Click Resize/Move.

Expand the ext4 File System: Right click on it and select Resize/Move.

GParted Resize

Resize the Partition again, and click Click Resize/Move.

Click Apply All Operation at the toolbar.

GParted Apply

After the operation is done, close GParted. Click Exit on the Desktop.

Remove GParted Live CD from VirtualBox -> Settings -> Storage, then start the Ubuntu guest again.

This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.