Site icon David Yin's Blog

Extend VirutalBox disk of Ubuntu 16.04

I have a VM using VirtualBox on Windows 10. The VM was created last year. Now I feel it is too small.  I am going to increased the disk without damaging the data on it.

The basic information of the VM.

I am going to increased the disk size from 8Gb to 12GB.

Step 1: Increase the vdi file.

D:\VirtualBox VM>"C:\Program Files\Oracle\VirtualBox\VBoxmanage" modifyhd "ubuntu 16.04.vdi" --resize 12000
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Step 2: Use Gparted CD image to modify the size of partition.

There are two locks on the partitions, sda2 and sda5.

I have to unlock them first.  Highlight the sda5, right-click and choose Deactivate.

When done, I can resize the partitions without problem.

Step 3: Resize the LVM, logical volumes,

There are three tabs.

Click root LV, change Volume size to “Use all free VG space”, Save and restart the VM.

 

Done.

 

Exit mobile version