VirtualBox: increase screen resolution on Mac Os as a guest

I mounted MacOS 10.12 Sierra as a virtual machine on a windows host. By default the screen resolution is 1024×768, this is small resolution especially when you have a large screen.. So how to increase it?

EFI provides two distinct video interfaces: GOP (Graphics Output Protocol) and UGA (Universal Graphics Adapter). Mac OS X uses GOP, while Linux tends to use UGA. VirtualBox provides a configuration option to control the framebuffer size for both interfaces.

To control GOP, use the following VBoxManage command:

VBoxManage setextradata "VM name" VBoxInternal2/EfiGopMode N

Where N can be one of 0,1,2,3,4,5 referring to the 640×480, 800×600, 1024×768, 1280×1024, 1440×900, 1920×1200 screen resolution respectively.

To get the machine name use vboxmanage list vms

For me I choose 1440×900 VBoxManage setextradata "mac" VBoxInternal2/EfiGopMode 4