Expanding virtual disk size for a Fedora guest on VirtualBox

First, while the virtual machine is down, resize the disk image:

vboxmanage modifyhd vdi_disk_image_name.vdi --resize new_size_in_mb

Now boot the image and logon. If you’re not using LVM, I think to resize regular partitions it’s as simple as starting gparted, and then just drag the size of the partition to take up the new unformatted space. If you are using LVM, then do the following:

sudo lvm

List physical volumes with pvs, find the one containing the logical volume that you want to resize, and then use pvresize:

pvresize --setphysicalvolumesize xxG /dev/name

To show volume groups:


To show logical volumes:


To expand a logical volume to use the newly added space:

lvextend -L +sizeG vg_groupname/lv_volumename

where size is the new size in GB.