Sometimes you want you virtual machine to have a custom display resolution, eg. 1366x768 but your guest OS doesn’t show it in the display preferences.

So, in order to change this setting you have to first install the Guest additions for your guest OS and also use the VBoxManage command this way

VBoxManage setextradata "vmname" "CustomVideoModel" "1366x768x32"

Where “vmname” should be changed to the actual name of the virtual machine.