VM Virtual Box - MarekBykowski/readme GitHub Wiki

I have always been having problems resizing/increasing the VM disk, so decided to wrap up the howto here:

  1. Enlarge the disk through Tools -> Virtual Media Manager from https://www.howtogeek.com/124622/how-to-enlarge-a-virtual-machines-disk-in-virtualbox-or-vmware/ and stop at C:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifymedium disk "C:\Users\mbykowsx\Documents\VirtualBox_VMs\linux.vdi" --resize <size in MB>
  2. Then run steps from https://packetpushers.net/ubuntu-extend-your-default-lvm-space/ which are:
cfdisk -> Resize /dev/sda3 behind Free Space, Write
pvresize /dev/sda3
pvdisplay
vgdisplay
lvdisplay
lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
lvdisplay
df -h
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
df -h
⚠️ **GitHub.com Fallback** ⚠️