First, at some point in this post (towards the bottom) I will be talking bout my adventures in Virtualization this weekend. I'll be covering things I learned just this morning from Wikipedia and Ars Technica as retroactively applied to a 5 hour head-ache and hard fought victory on Friday night.
Second, I'm a little disappointed with myself for how much I HAVEN'T kept up on this project. I kind-of-sort-of promise to pick it back up. Here are the things that I have had on perpetual tap for the past few months and haven't had the time/drive to get fully written:
- Any CPU P/Invoke C# 'Unions' That Actually Work On Any CPU
- .Net Thread Synchronization With Events (Or How The Way We Did It Before Could Be Considered A Worst Practice)
I want to make a promise to you, right here and now, that the "Any CPU" will be posted by the end of the next two week period, it is mostly written I just need to fill out the code samples and make sure they are of a better quality than traditionally makes it into our version control in the main development trunk.
The Meat Of The Post
Today I will discuss a project I worked on this weekend: Getting a virtual Ubuntu machine running on my Vista Home Premium Sp 1 personal machine so I could develop a web site using PHP and MySQL for the non profit that my fiancé works for. I spent a while searching for a tool to do the virtualization, at work we use VMWare Infrastructure Server (canon to kill a fly in this case, not free); and I know that Microsoft has the free Virtual PC 2007 (free, though very much not agreeable with Ubunutu according to the Internet and not supportive of Vista Home Premium according to the installer). I was searching for a free tool and could not find one other than the Microsoft one. Here is the answer for Internet posterity which, of course, Ars posted on Monday morning.
Free Virtualization Options for Microsoft Vista Home Premium:
- VMWare Server (This is their free product that I couldn't find on Friday).
- Microsoft Virtual PC 2007 (It yells at you about OS version but actually installs fine. Does not work with Ubunutu 7xxx with out some serious forum bombing and Internet wheat/chaff separation.)
- Sun VirtualBox (I haven't used it, didn't find it until this morning, I think that if it works this is my favorite tool. It is big company managed, has an open source version, and is compared to Parallels Workstation.)
The only affordable commercial product I found was Parallels Workstation for $50. I am not into the idea of spending any amount of money on this project though, so it was immediately disqualified. Oh yeah, that and the fact that I didn't find this until Monday (I knew of Parallels but didn't think to go to their web site because I knew it was commercial software and the only product I was aware of is for Mac OS X). A huge list of all virtualization products known to man can be found here, at Wikipedia. This information is mostly courtesy of Ars Technica, here.
I ended up using Virtual PC 2007, it was Friday night, I had spent too much time looking already and I thought I had found a reasonable walk-through over there. I think I would like to repeat the experiment using VirtualBox sometime when I have nothing to do and am feeling like an evening of self-abuse. The two changes I had to make to get this guys directions to work involved Virtual Machine settings in the VPC console. Before you start your Virtual Machine the first time (after you have walked through the VPC setup that Arcane Code links to in their install walk through) open up the settings for the Virtual Machine. First, go to the sound settings and disable the sound card, this caused no end of problems with not being able to boot into the Live Installer or Ubuntu in general.
Furthermore, you are a developer on a computer that is capable of running Virtual PC and you are probably running a system that is capable of playing audio on it's own, why do you need audio on your VPC? If you do, it is outside the scope of what I'm doing here, sorry.
Next go to the Hardware Virtualization section and enable that if you have it. The newer, higher-end Intel Core 2 Duo's with lower wattage specs generally have the Intel virtualization instruction set enabled, this option will be disabled and grayed out if you don't qualify.
Finally, in the display section, make sure nothing is checked. You want your guest OS to display in whatever resolution it is comfortable displaying in and I think this is part of the reason that the Live Installer needs to be started in Safe Graphics Mode (thanks again Arcane Code).
The computer I wrote this entry on thinks the default is that way but it sure wasn't on my personal computer.
These are the only things I had to do to get Ubuntu installed and working on my VPC. I think it prevented a lot of the command line and boot loader switch voodoo that is mentioned in the walk-through and comments. It's now talking to my Subversion server, has a working instance of MySQL, and has a tested PHP page up while we go through the design phase of the project.
Comments
Incidentally, I also sometimes use VMware Player (free). This means you have to download a VM image that someone else has already created. Player is faster than Server, which is why I use it. Plus, downloading a pre-built image is easier than building one yourself. (Although, I do like installing and configuring Linux distributions myself.)