How to extend filesystem partition on Ubuntu VM?
From Ubuntu (in VM) Install gparted
by executing sudo apt-get install gparted
in Terminal.
Open gparted
either from terminal or from dash. Then extend you disk, maybe you may have to move your extended partition at the end of disk.
You do not need a live CD for this to work. I'm basically summarizing the other answers given here:
- From Ubuntu (in VM) install gparted by executing
sudo apt-get install gparted
in terminal - Open
sudo gparted
from terminal - Rightclick on the swap partition, click "swapoff"
- Delete swap partition
- Extend your data partition, but leave enough space to create a new swap partition
- Recreate swap partition with about the same size as before, select linux-swap as file system
- Click that green tick in gparted to apply all operations. Then select "swapon" to enable swap again
- Download gparted LIVECD iso from here
From your VM Choose the iso file and boot as live CD
- Add the iso into your cd-rom drive from the GuestVM settings
or
- Set to boot from the CDROM in BIOS (F2 when you start your VM)
- Once tha gparted Live Cd runs you can use gparted now
- Choose the partition to resize and choose the new size and then apply
- When end reboot and be sure to remove the iso file attached to the VM CD ROM, and boot to your Ubuntu.