29 July 2009

Amazon: mostly win. Windows: bleh.

Have you ever needed to run a Windows application without a suitable machine handy? Today, I wanted to install something that required Microsoft IIS. My laptop runs Windows Vista Home Premium*, which has IIS preinstalled. You can activate it by going to Control Panels->Add/Remove Programs->Add/Remove Windows Components. Unfortunately, it lacks a bunch of features that the program required, like Windows Authentication, Digest Authentication, and a bunch of others. So the installer complained and refused to install.

* I wasn't planning on running Vista very often, so I wanted to save on the Microsoft tax.

I have an ancient laptop with Windows XP Pro. Amazingly, it still booted. But I couldn't find the WinXP install CD to install IIS. (Vista keeps the files on disk, so it doesn't need a CD). The hard drive was also full and I didn't want to spend the afternoon nuking old files.

Then I remembered that Amazon's EC2 service lets you run Windows. I thought this was perfect --- I could install the app without actually having to muck around with actual computers.

This blog post
is a nice walkthrough. Things have changed a bit since then --- the part about security groups now appears to be automatic (Amazon now walks you through the setup and turns on remote desktop by default). Because Vista Home Premium doesn't have Remote Desktop, I booted into Linux to use rdesktop. (Bliss!)

Things more-or-less worked as expected after that. Some pitfalls to avoid:
  • The EC2 virtual machine takes forever to boot. I believe there was a 20 minute interval between when Amazon started billing me and when the machine finally went from "pending" to ready, and then from ready to actually ready (ready enough that it would give me the password).
  • Internet Explorer is set to fascist mode by default. It won't let you download much of anything. Somehow, Firefox became infested with these settings, too, so Firefox won't let you download anything either. All the downloads came up "cancelled". You can switch these settings off by going to Add/Remove Windows Components and turning off Internet Explorer Enhanced Security Configuration.
  • EC2 blows away your image when you shut down. If you want to keep it, you can use the menu option "Bundle Windows AMI" to save it to S3. (Yeah, that's really obvious.) It will prompt you for an S3 bucket. Note that you have to create buckets in advance and the bucket name has to be globally unique across all S3 users. The EC2 managment console won't tell you that you screwed up until it finishes the agonizingly long "bundling" process, at which point it will say "failed" with the helpful error string "AccessDenied(403)- Access Denied" if your bucket collided with someone else's. You can use a tool like s3fox to create a bucket.
  • The English in s3fox (example: "IT MAY SO HAPPEN THAT THIS EXTENSION MAY BE DISCONTINUED AT ANY POINT. I WON'T BE HELD RESPONSIBLE FOR THAT.") does not exactly inspire confidence. I do hope that it doesn't send my secret key to Elbonia so that I can wake up to a $5 billion AWS bill next month. That said, S3fox was remarkably easy to use, once I realized that by "folder", it meant "bucket."
Aside from those issues, EC2 was pretty much all win. I didn't have to dig up a WinXP CD, or buy a more outlandish version of Windows, or fiddle with my registry settings, or edit my bootloader, or turn my computer upside-down and strain crushed tomatoes through it. I think the total bill for the month will be about a dollar. Highly recommended.

No comments:

Post a Comment

Blog Archive

About Me

blog at barillari dot org Older posts at http://barillari.org/blog