Have created fixed virtual hard drive for you vm and later you ran out of space and now you want to resize your virtual hard disk ?

Virtual box has command line utility to help you with this, not only resize you can do lot of useful and advanced stuff with this utilities.

For now we'll see how to resize your vm's virtual hard drive,
I'm using mac, command is pretty much same for windows and linux as well,

$ VBoxManage modifyhd VirtualBox/windows7/windows7.vdi  --resize 15360
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Note:  new harddisk size is given in Mega Bytes, so multiply new size with 1024, ex: for 15 Gb it's going to be 15*1024 which is 15360

that's all you have successfully resized your virtual hard disk.

wait....
wait ..

guys you just resized ur virtual disk, it doesn't mean you can see 15 gb in your my computer after you login, you have to expand hard disk in your windows machine by going to disk management, as shown below.

login to your windows guest
open run and type

$ diskmgmt.msc

now Diskmanagement window opens, in there you can see extra space which you have just added. So right click on your hard drive and click expand, just click next next and your can see harddrive with new size in my computer.