I use Mac OS X for my daily tasks, but some software just isn’t available or doesn’t run as smoothly on a Mac. To design circuit boards I use KiCAD and for developing my latest product I need to compile Linux images. For both, having a Linux installation on your computer which you can fire up in seconds is invaluable. In this post I will show you how to make a small but up-to-date Linux virtual machine using the Ubuntu Server install disk and VMware Fusion.
Many Mac users may be familiar with Parallels or VMware Fusion. Both allow you to run Windows on your Mac in a so-called virtual machine. Having a virtual machine is like having an extra computer in your computer. The virtualization software pretends to have a hard disk, processor, memory and other items you would find in a computer or laptop. Inside the virtual machine you can install an operating system like Linux, Windows or even another copy of Mac OS.
- You need a copy of VMware Fusion, but if you don’t own a license it might be better to use the open source (and free) VirtualBox. The instructions here are for VMware Fusion
- The Ubuntu server iso. As of writing the latest version is 11.10. You can download it from the Ubuntu website. I recommend the 32-bit version for its smaller file size.
In VMware Fusion create a new virtual machine. Choose ‘Continue without disc’, then ‘choose disc image’ and browse to your ubuntu server iso. Follow the instructions on screen, finally press ‘Finish’. You are now greeted by the Ubuntu install menu. Before pressing install, press F4 and choose ‘minimal virtual machine’. This option makes the Ubuntu installer install as few packages as possible, making a very small operating system.
Press install and follow the instructions. After the installation and reboot you will see a black screen with a trusty old blinking cursor. Dont’ panic, we’ll get you a graphical user interface as quickly as possible!
First log in using the username and password you provided at the start of the installation. Then install lightdm by typing the following into the command line:
sudo apt-get install lightdm
sudo apt-get install gnome-core
During the installation of gnome-core choose lightdm as the display manager. Next, install xorg and unity-2d:
sudo apt-get install xorg
sudo apt-get install unity-2d
Reboot! If everything went right you are greeted with a lean and minimal desktop that boots up very quickly and uses about 2GB of disk space.
To enable cursor sharing between OS X and Ubuntu and some other tweaks, go to to Other -> Synaptic package manager and search for open-vm-tools. Mark it for install. You might also want to search for light-themes if you want the default Ubuntu theme. I like it because it has the minimize/close buttons on the left just like Mac OS X.
If after rebooting Ubuntu fails booting with an error like Alert: cannot find /dev/disk/uuid-xxxxx, justjoheinz has a solution on his blog.