I got it in my head that I want to play around with node.js but it doesn’t run on Windows. So, the answer was to setup an Ubuntu virtual machine. I’ve used VMWare player in the past pretty happily on vm’s that others have created. But I don’t want to shell out the money for VMWare Workstation (and I’d really like to have snapshotting capability). Enter VirtualBox…
It seems to be as rich in features as VMWare Workstation, but it’s free. I like free, so I downloaded VirtualBox 4.0.2 for my Windows 7 64bit host and it installed in a snap.
Next, I started looking for a pre-built Ubuntu Server image. It was surprisingly hard to find one that looked good (especially since I’m used to the VMWare “virtual appliance” marketplace). So I decided to roll my own. I thought this would be painful… it wasn’t.
I downloaded Ubuntu Server 10.04 64-bit (I’m a bit short on disk space and memory, else I would’ve probably chosen Desktop).
While that was downloading, I created a new virtual machine in VirtualBox:

I named the machine Development and set the OS Type to Linux and the Version to Ubuntu (64 bit).

Set my memory to 1GB (you can always change it later).

Let it create a new boot hard disk.

Which started up a Create New Virtual Disk wizard. I chose dynamically expanding storage (this disk will start out small and grow up to the maximum size you specify next).

I set it’s location to a directory in my home folder (use the little folder icon with a green arrow to change the location) and its maximum size to 20GB:

I hit Finish on both wizards, and voila, there’s my new “bare metal” virtual machine:

Hit Start to power it on, and you’ll get a nice First Run Wizard. Hit Next and you’ll see Select Installation Media screen:

Hopefully your Ubuntu download has finished by now. Because you’re going to hit the little folder-with-arrow icon and chose the Ubuntu .iso file you downloaded. (Pretty cool that VirtualBox can just treat your .iso file like an actual DVD).
Press Finish and watch the virtual machine boot the Ubuntu DVD. You can permanently dismiss the warning about 32-bit color and you’ll see the start of the Ubuntu installer:

The installer is keyboard driven, and if’ you’re in the US, you can just go through accepting all the defaults and you should be fine. I literally hit enter on every screen except for the hostname screen, where I just gave my computer a name and the Partition Disks screen where I chose “Guided – use entire disk” and not “Guided – use entire disk and set up LVM”. I don’t know much about LVM but I was worried it would not interact nicely with my Virtualbox “dynamically expanding storage”. Anyone know if I was just being paranoid?

And for safety, the installer makes you actually select “Yes” on this screen:

I grabbed some tea while the installer did its thing. I came back and told it my full name, username, and password. I told it not to encrypt my home directory, and I don’t need a proxy to access the outside world, so I left that blank:

I chose “No automatic updates”… we’ll see how I used a tool called APT to manually perform updates. And I “cheated” and made my life easier by having the Ubuntu installer setup Apache/MySQL/PHP for me (LAMP server) and OpenSSH:

If you do so, you’ll have to setup a MySQL “root” password.
For all the bootloader, you can just accept the default:

and when you’re done, you’ll see this:

To “remove the CD”, you can right-click on the little CD-looking icon on the bottom of the window and choose “Remove disk from virtual drive”:

Hit continue and after a minute you’ll see a text login prompt. Login and tada:

You’ll see notes about package updates and security updates. To get your system up to date, use the apt command:
sudo apt-get update
sudo apt-get upgrade
After that you will have a slick, new, up-to-date, (virtual) Ubuntu server. In an upcoming post, we’ll take a look at networking configuration, setting up VirtualBox Guest Additions on Ubuntu Server (so we can share folders between our host machine and the guest virtual machine) and getting PuTTY and Xming running.