An updated post for VirtualBox 2, Ubuntu 8.04, and 8.10 is available.
I’m running a few Ubuntu virtual machines for testing new software. My favorite virtualization software, VirtualBox, is much easier to use with the additional drivers (called “Guest Additions”) that allow higher screen resolutions, better display performance, and mouse integration. For Ubuntu 8.04 guests, I had some issues installing the guest additions using VirtualBox 1.5.6 OSE.
Start up your Ubuntu 8.04 guest. In VirtualBox, click
Additions and your virtual Ubuntu should recognize a new CD. Open a terminal
and run this command:
The installer should prompt you that it’s time to restart the virtual machine once it’s done. Just logging out and back in should work.
This is where things get sticky. For Ubuntu 8.04 guests, the VirtualBox video driver will not be enabled because of the minimalistic xorg.conf file.
Open your guest machine’s xorg.conf file:
gksu gedit /etc/X11/xorg.conf
Find the device section, which should look like this:
Section "Device" Identifier "Configured Video Device" EndSection
And replace it with this to enable the VirtualBox driver:
Section "Device" Identifier "Configured Video Device" Driver "vboxvideo" EndSection
Changing screen resolutions in Ubuntu 8.04 is done with RandR, which is not supported by VirtualBox. So you’ll also need to set a resolution manually. Find the screen section, which should look like this:
Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Device" EndSection
And replace it with this, but change
1024x768 to your preferred resolution:
Section "Screen" Identifier "Default Screen" Device "VirtualBox graphics card" Monitor "Generic Monitor" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1024x768" EndSubSection EndSection
Save, exit the editor, and log out. You should now have a large virtual machine window, as well as mouse pointer integration. Enjoy your VM!