By Sascha Goebel on Tuesday, March 19th, 2013 11:14 AM PST

Disclaimer: In case you’re a Linux, OS X or Windows fanboy, please skip the first paragraph and continue reading after that.

After being in a long lasting love/hate relationship with MS Windows in different incarnations, countless blind dates with desktop Linux and a quick affair with OS X, I decided for myself that Windows is my weapon of choice. As a Web-Developer, I nonetheless have the need for a lot of tools that are usually built from source or not available for Windows at all. The existing solutions like Cygwin appear to add way too much clutter to a system I only want to read mails and write documents with and that already gets slower over time by itself. Therefore I only use Windows for my office and gaming needs and have a virtual machine with a linux setup for development. This comes with the added benefit of distraction free coding whenever I fullscreen the VM and effectively hide Outlook and Skype. These are my reasons and I’m pretty sure you’ll have or find your own, so here’s how to setup such a development system.

Installing the virtualization software

From the plethora of available solutions like VirtualPCVMWare or VirtualBox, I personally prefer the latter as it’s free, easy to install and use and has never failed me so far.

Grab the installation package matching your environment from the Download Section of their site and follow the installation wizard.
If you choose to do a full install, this will shortly disconnect your network devices to install the bridging driver.

Once the installation is complete, you can start VirtualBox and should see something like this.

Hardware Virtualization

Do yourself a favor and double check that hardware virtualization is supported by your CPU and is turned on in your BIOS. This makes the difference between a VM running as fast as your host OS and Windows Vista on that old Pentium you found in the cellar.

Selecting your linux distribution

This one is completely up to you. Personally I tend to use a lightweight (as in UI, filesize etc.) distribution which gives me the ability to simply install anything I might need in addition, which, for me, is Xubuntu, but you could even start with a plain server installation for even more customization control.

For the sake of simplicity, I’ll assume you choose Xubuntu 12.10, Quantal Quetzal which is the latest version as of today.

Download the ISO Image for either 32bit or, if your system supports it, 64bit and store it in an easy to remember location.

Create the virtual Machine

Hit the New button and enter a new for your Virtual Machine.

If you select the name wisely, VirtualBox will preselect the correct Type and Version for you.

As long as you’re not planning to run a big IDE like Eclipse, you should be fine with the default memory settings. You can always increase the amount of RAM later, but keep in mind that the more RAM you assign to your Virtual Machine, the less RAM is left for your Host OS.

In the next step, you’ll create a virtual hard drive.

Create a dynamically sized medium which will grow over time and only use as much storage space as is required. It will never shrink again though, so think twice, before copying your complete MP3 collection to your Virtual Machine.

As said, the virtual hard drive will only take as much space as needed, so we can make the maximum size a bit bigger without having to worry.

Hit Create and you’ve just create your first Virtual Machine. Congrats!

Setup Port Forwarding

Before starting the VM the first time, it’s a good idea to set up some port forwarding rules, so we can access for example a web server running in the VM from the Host system. Click on the Network tab.

Open the Advanced flyout and click Port Forwarding

Create the following rules or whatever seems required for your needs.

Pay attention to the fact that VirtualBox will not (visibly) complain if a mapped port is not available on the Host system. The mapping will just not be applied. That’s the reason why I’m mapping the HTTP port 80 to the Host port 8888 as nowadays even Skype blocks port 80 sometimes.

Install Xubuntu

Now it’s finally time to install linux into the VM. Click on the Storage Tab

select the empty IDE controller

and insert the previously downloaded ISO Image (CD icon, then Choose a virtual CD/DVD disk file)

Now Start the VM

And follow the Xubuntu installation guide

That’s it. Reboot and welcome to your very own Xubuntu in a box.

Install Essential Applications

As we all know, the most fun part of using Linux is installing all those tools and gadgets you’ve never heard of. To get you started, we’ll just install the essentials and add everything else when we need it. First of all, we’ll need the VirtualBox Guest Additions which allow Copy & Paste between the Host and Guest system and an overall better performance.

In the menu right above your VM, select Devices and then Install Guest Additions. A new disk will be mounted and should open up automatically.

Execute the and follow the instructions. Once installed, you should reboot the VM.

Now open a terminal window

and install the following apps:

  • Basic Dependencies
    sudo apt-get update && \
    sudo apt-get install python-software-properties python g++ make
  • Git
    sudo apt-get update && \
    sudo apt-get install git
  • Google Chrome
    wget -q -O - | sudo apt-key add - && \
    sudo sh -c 'echo "deb stable main" >> /etc/apt/sources.list.d/google.list' && \
    sudo apt-get update && \
    sudo apt-get install google-chrome-stable
  • Sublime Text 2
    sudo add-apt-repository ppa:webupd8team/sublime-text-2 && \
    sudo apt-get update && \
    sudo apt-get install sublime-text
  • node.js
    sudo add-apt-repository ppa:chris-lea/node.js && \
    sudo apt-get update && \

    node.js finally found it's way into the default ubuntu sources, so you can just install it.
    sudo apt-get install nodejs npm nodejs-dev

Have Fun

That’s it for the basic installation. Now feel free to clone some git repos or write your own node.js server.

Let me know what you think and what your experiences with this kind of development process are.

Happy Hackin’
Sascha / Zynga Germany


3 Responses to “Installing and Configuring a Ubuntu Based Development Virtual Machine”

  1. John Fong Says:

    Thx! I have been longed to learn node.js for awhile.

  2. Geoff Rowland Says:

    Vagrant simplifies the process even more –

  3. Manuel Says:

    Superb!I enjoyed it.

Leave a Reply

Connect with Facebook