I fell into the trap while installing Ubuntu in virtual box to only give Ubuntu 8gb for the hard drive because it was recommended. I quickly realized that this wasn’t big enough. While searching on the internet I found the commands for virtualbox to increase the VDI size. I ran the command and started Ubuntu. Everything appeared normal until after logging in. Ubuntu just sat and didn’t do anything. After realized that the resize likely caused this issue I searched online and found a great article Growing a hard drive partition in a VirtualBox ubuntu guest. The article mentions resizing Ubuntu’s partition after resizing the VDI. I resized the partition and everything is working as expected!
Steps to resize VDI
- Run VBoxManage modifyhd <absolute path to file> –resize <size in MB>
- Boot the VM to either gparted cd or Ubuntu live CD
- Resize Ubuntu’s main partition (You might need to delete the swap partition and readd to move main parititon)
- Restart
- Enjoy 🙂