How to add a display mode to a VirtualBox VM?

I am using my first VirtualBox VM in order to run Windows 8 Preview on my Windows 7 machine. It looks like only a few resolutions are available for me to choose. My physical display is 1600x900, so I'd like to be able to set my Windows 8 VM to that in order to have a fullscreen experience. How do I add a 1600x900 to the choices I have in the "Screen Resolution" dialog?


You can use VBoxManage setextradata "<vm-name>" "CustomVideoMode1" "1600x900x32" (See the VirtualBox manual for more information).


This solution worked once for me but now that I have 2 physical monitors it is not working.

You can set the video mode on a running VM by using the following virutalbox command

Windows

"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" controlvm "YOURVMGUESTNAME" setvideomodehint 1920 1200 32

*nix

VBoxManage controlvm "YOURVMGUESTNAME" setvideomodehint 1920 1200 32

This setting will take effect immediately and sometimes survive reboot.