- In the VM (running or stopped):
Hardware > Hard disk, on the toolbar Disk action > Resize
- Set the number of GBs to add, then validate
- Start the VM if not already
- Install partitionning tool:
apt install parted
- Find the disk name (in my case:
sda): lsblk (you can only increase the partition size of the last one)
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 270G 0 disk
├─sda1 8:1 0 3M 0 part
├─sda2 8:2 0 124M 0 part /boot/efi
└─sda3 8:3 0 199.9G 0 part /
- Print and get the last partition number (in my case:
3): parted /dev/sda print
- Extend the partition size:
parted /dev/sda resizepart 3 100% and type yes
# parted /dev/sda resizepart 3 100%
Warning: Partition /dev/sda3 is being used. Are you sure you want to continue?
Yes/No? yes
Information: You may need to update /etc/fstab.
- Refresh the file-system:
partprobe /dev/sda
- Finally apply the new config:
resize2fs /dev/sda3
- Enjoy! (no need to reboot)