VritualBox 4 or updated versions introduced new command "VBoxManage modifyhd". You can increase the size of guest hard drive easily.
Step 1: Increasing the size of .vdi
Open terminal and then run command "VBoxManage modifyhd <vdi_path> --resize <newsize>"
e.g. I increased WinXp.vdi from 10GB to 15GB and command was "VBoxManage modifyhd /home/albot/.VirtualBox/HardDisks/WinXp.vdi --resize 15000"
-- unallocated space is now ready to create a new partition or merge with existing partition in your virtualOS.
Step 2: Creating new partition or merging with existing one
...Turn on your virtualOS then follow..
For Win7: Open Computer Management then go to Disk Management and then do whatever you want.
For Xp: Have to use GParted liveCD (Open Source) or Partition Master Home Edition (Free) or other alternatives.