VBoxManage modifyhd [VDI] --resize [megabytes]
Problem 1: VBoxManage
modifyhd [VDI] --resize [megabytes]
Problem 2: VBOX_E_NOT_SUPPORTED
VBoxManage: error: Resize hard disk operation for this format is not implemented yet!
Problem 3: Still not Dynamic?
Problem 4: Still no Free Space!
Everything seemed to work fine, but where has that extra space gone? My Guest system is Mate so looking at its drive using GParted gives us the answer:
The extra space has been unallocated: the command only changed the logical size – we need to extend the partition to use the free space. Unfortunately you can’t move or resize the drive now as the partitions are in use. To solve this I will use the GParted Live CD. Once you have downloaded the .iso image mount onto your virtual machine:
You might also want to ensure that the virtual systems boot order is set correctly:
When you start your system you should now be greeted by GParted:
Run through the options (I selected don’t touch and then 02 for english). Once at the terminal use startx to access the GUI:
You can now manipulate the partitions. The first thing we need to do is move the swap partition. To do this we need to remember its size, deleate it and then recreate it.
- Write down the size of the extended -> linux-swap partition
- Delete the linux-swap partition
- Delete the extended partition
You can now expand /dev/sda1, but leave some space at the end to recreate the linux-swap:
Recreate the extended partition:
And then recreate the linux swap:
Apply the changes and shutdown. The disk should automatically be removed from the virtual drive. Start up your virtual system and if all went well your primary partition should be expanded!