I have recently created an Ubuntu Virtual Machine, but the resolution is way off, and I am not able to change it to a more appropriate size.
My host machine is a MacBook pro running 10.7.5 with a 1280x800 resolution. My virtual machine is running Ubuntu 14.04 and everything except the resolution is working fine. The resolution is not just "not ideal" but it is impossible to work with at 640x480.
I have researched a lot and looked all over askubuntu, but none of the answers I have found work for me. And I do have guest additions installed.
What I have tried
This seems to be a very informative and exhaustive answer, yet none of the solutions he has offered have worked for me.
1. Use Mouse to adjust screen size
Adjusting the screen by resizing the Virtual Box Windows with the mouse allows for any screen resolution up to the host screen resolution.
I have tried that but the resolution remains the same and gray bars are added around the outside of the window.
2. Use predefined standard screen sizes
If you need a fixed (standard) resolution you may also choose System Settings -> Monitors (for 11.04) or Displays (for 12.04) for a selection of fixed resolutions (here shown for 12.04):
For maximum host screen resolution you will need to run Virtual Box in Fullscreen mode (Host + F) For a fixed host screen resolution we need to disable Auto-resize Guest Display (HOST+G) from Virtual Box Manager View menu.
1: The only option I have is 640x480.
2: When I go to fullscreen, it just makes the gray bars larger without affecting the resolution.
3: Auto-resize Guest Display is grayed out and I am unable to disable it. Host+G also does nothing.
3. Define new geometry with xrandr
If you need a fixed geometry that is not in the list of resolutions for monitors you will have to use xrandr to define a new resolution:
First we use gtf for calculating the modeline of possible resolutions:
gtf <xres> <yres> <refresh> [-x]
Give the desired values for x-resolution, y-resolution and refresh rate. The flag -x is default and can be omitted. For a portrait resolution 480x640 at 60 Hz you will get the following output:
$ gtf 480 640 60 -x
$ 480x640 @ 60.00 Hz (GTF) hsync: 39.78 kHz; pclk: 24.82 MHz Modeline "480x640_60.00" 24.82 480 504 552 624 640 641 644 663 -HSync +Vsync
From this we can copy & paste the modeline to add it to xrandr list of known resolutions:
xrandr --newmode "480x640_60.00" 24.82 480 504 552 624 640 641 644 663 -HSync +Vsync
and add this for the Virtual Box Monitor:
xrandr --addmode VBOX0 480x640_60.00
Replace VBOX0 with the appropriate monitor if you have setup Virtual Box with multiple monitors (or any other output name the driver reports).
We can now switch to the newly defined geometry as described above (2.).
I have done as he said ^ there. Here is what I wrote in the terminal and what the terminal said back.
VirtualBox:~$ cvt 1280 800
# 1280X800 59.81 Hz (CVT 1.02MA) hsync: 49.70 kHz; pclk: 83.50 Mhz
Modeline "1280x800_60.00" 83.50 1280 1352 1480 1680 800 803 809 831 -hsync +vsync
VirtualBox:~$ xrandr --newmode "1280X800" 83.50 1280 1352 1480 1680 800 803 809 831 -hsync +vsync
xrandr: Failed to get size of gamma for output defualt
VirtualBox:~$ xrandr --addmode default 1280X800_60.00
xrandr: Failed to get size of gamma for output defualt
xrandr: Cannot find mode "1280X800_60.00"
Any help would be appreciated, I'm pulling my hair out over this!
lsmod | grep vboxvideo
in a terminal. – Takkat Jun 09 '14 at 20:29