Problem
There is no free space on CentOS system disk in VirtualBox.
Solution
First of all you need to extend the virtual hdd (VDI) size.
VBoxManage modifyhd "C:\path\to\vdi\file" --resize SIZE_IN_MB
You can do this only for Dynamically alocated discs.
After that, start your VirtualBox and boot into GParted live CD. There just follow instructions in GUI and resize you partition to desired size.
After that, reboot into your CentOS system. Here just start console and enter
pvresize /dev/sda2
after that, find out your logical volume path. You can do this by entering this command
lvdisplay
My LV path is /dev/VolGroup/lv_root so I’ll use this. Now enter the following commands
lvresize -l +100%FREE /dev/VolGroup/lv_root resize2fs -p /dev/VolGroup/lv_root
Now just verify that the filesystem is larger with
df -h
Important info! You are doing this on your own responsibility! The data on your virtual disc can be erased at any time! You should created backup before doing any of this!