Running Ubuntu on VirtualBox

11/30/2011

I had to figure out a few things to get Ubuntu installed and working well on VirtualBox.

I had to enable virtualization technologies in my BIOS. I have a Lenovo T520 and did this by pressing F1 during startup and then going to Security > Virtualization. If I did not do this then I would receive the error “VT-x features locked or unavailable in MSR” when trying to run with more than 1 CPU orĀ 3584 MB of RAM. Don’t forget to increase the VirtualBox settings to use more RAM and CPUs after updating this.

The default disk is an 8GB dynamically expanding VDI. You may want to consider changing the default from 8GB to something more like 100GB. This is the max size only and will not be used unless needed.

I had to check “Enable 3D Acceleration” under the “Display” settings in order to get Ubuntu Unity to work. If your screen looks super messed up like a bunch of vertical lines then check out this Stackoverflow post.

I had to run “sudo apt-get install dkms” before installing the VirtualBox Guest Additions to get them to work.

To get USB 2.0 devices to pass through (necessary for Android development), you’ll need to download and install the extension pack. Make sure you’re on the latest version of VirtualBox, then right click the icon and choose “Run as administrator”, followed by “Preferences” -> “Extensions”, and choose and install the downloaded extension pack.

Finally, I remapped the host key. By default all kinds of weird things happen when you use the right Ctrl button. This can be fixed by going to File > Preferences… > Input and then setting Host Key to something you never use like Pause.

Be Sociable, Share!