Thursday, June 5, 2014

Set custom videomode for correct resizing of virtualbox guest OS

First, you will need to install the Guest Additions for the VM you wish to resize. For most Linux VMs, this requires installing the latest kernel and kernel headers. To get the kernel and  kernel headers in CentOS, run sudo yum -y install kernel kernel-devel


Once this is done, reboot the VM. This should use the latest kernel (which was just installed) allowing for successful building of the main Guest Additions module. To build the Guest Additions, go to Devices->Install Guest Additions in the Virtualbox menu. You should now be able to autorun the Guest Additions software (it should show up as a CD) in the VM. There may still be other issues, typically OpenGL fails to build, but generally the main Guest Additions module is all that is necessary for screen resizing.


vboxmanage setextradata "Z7" "CustomVideoMode1" "1280x650x32"

Where Z7 is the name of the VM, and 1280x650x32 is the custom resolution you desire. In Ubuntu, you can take a stab at what your monitor resolution is by running xrandr. You can get a list of VM names by doing

vboxmanage list vms


https://forums.virtualbox.org/viewtopic.php?f=6&p=105958

No comments:

Post a Comment