1. Open terminal and enter the following command:
#sudo apt-get update
#sudo apt-get install build-essential linux-headers-$(uname -r)
#sudo apt-get install virtualbox-ose-guest-x11
2. Once installation is finished, restart your VirtualBox machine.
3. Go to System –>Preferences –>Monitors and change the resolution of your screen. You might be able to change the resolution but the screen will re-size properly when you maximize.