The need for manual resize of screen in Ubuntu under VirtualBox is frustrating. There is simple solutions for that:
sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11
After restart, the screen resolution will adjust automatically to the size of the VirtualBox window.