In this article I’m going to give you a simple, step-by-step overview of how to create a Windows 2008 server image in Amazon’s Elastic Cloud Compute (EC2) infrastructure. Now I must admit I’d rather have found a good tutorial on The Internets or even in a book. Feel free to send me any I missed. My experience is they are either dated or about Linux and so on…
First, briefly why does one care about EC2? Well maybe you are buying into the whole cloud computing story which lets you cheaply out-source your computer hardware for amazingly cheap prices (staring around $0.20 / hour for a dedicated machine). That’s a great reason and Microsoft and Google have interesting plays there too.
Personally I just want a simpler way to create virtual machines. We’ll have full admin access over remote desktop to our system to install whatever we want. I’m putting Visual Studio 2010 Beta on mine to play around with that software without ‘polluting’ my real system.
Here we go. If you don’t delay I suspect this would take you about 20 minutes from start to login! Subsequent virtual machines are much faster to create and launch because the can be based on pre-configured images.
1. Create an Account
Register for an Amazon Web Services account at http://aws.amazon.com/.
2. Enable EC2 Features
Enable Elastic Compute Cloud for your AWS account at http://aws.amazon.com/ec2/.
3. Launch a New Instance
Use the AWS Management Console to launch and manage your virtual images: http://aws.amazon.com/ec2/home. As the console says, choose “Launch Instance” under the “Getting Started” section. You will be presented with a list of pre-configured images. We’ll start with a stock Amazon Windows 2008 server image.
4. Choose a Base Image
Now you’ll be presented with a list of pre-configured virtual disk images. This time we’ll setup a 64-bit Windows 2008 Server (Data Center Edition). Just choose “select” out of the list below:
5. Use the Request Instances Wizard
Use the Request Instances Wizard to configure the newly created instance which includes configuring the security, choosing an encryption key, opening ports in the firewall, and kicking off the new instance. Below you’ll see the encryption key step – be sure to download the key pair as you’ll need it for retrieving the administrator password.
Here’s what you can expect for the review screen of the Request Instances Wizard. Press launch and you’re almost there.
7. Launching… (AKA Wait 5 Minutes)
After you launch you’re instance you’ll get a confirmation screen to
show you it’s being prepared and allow you to configure durable storage
and IP addresses (both entirely optional).
8. Back to the Management Console
Now if you choose “View your instances…” you’ll see that your instance is being prepared – it has a yellow pending status. This screen doesn’t always refresh on its own so use the refresh button in the upper right of the console (rather than your browser’s refresh button).
After a few minutes your instance with the yellow icon will turn green and be in the running state. Note that at first this really means booting up so you can’t get to it right away. Give it another minute or two…
10. Login Part 1: Getting the Credentials
Now you’ll want to login. Of course, the system was created with an administrator account which has a strong password. You’ll need to retrieve that password using the “Instance Actions -> Get Windows Admin Password” option.
11. Login Part 2: A Little Hasty
You’re probably excited to get this thing running and if you try right away you’ll get another message telling you to be patient and try again in a few minutes. Just keep trying.
12. Login Part 3: Using Private Key
Eventual the new system is up and running and you can get the password. The first step here is to pass in your encryption key from the wizard step before.
13. Login Part 4: Administrator Account and Password
Pass in the encryption keys and you’ll see the username and password (don’t get excited, I already changed the password!).
14. Login Part 5: Finding the Machine Address
When your instance starts, it’ll be given an Internet visible DNS name that you can use to connect via Remote Desktop. You’ll find it in several places. One of them is highlighted below. Note that this address changes as you start and stop your instance.
Now just fire up Remote Desktop, use the Administrator account and password from step 13 to log in. Now you have full access to your Windows 2008 machine. You can do with it what you will, install software, start serving web pages, etc.
16. A Word of Caution
If your intent is to run a web server, then let it run. But if you are just using this for your own purposes and don’t need it when you’re not logged in to the machine, be sure to return to the Management Console and stop the instance. You can alternatively do that by choosing “Shutdown” instead of logging out of your Remote Desktop instance.
I hope you found this walk-through helpful. I just learned most of this myself so I figured I’d blog it and everyone can learn from it.
Thanks for the tutorial
It seems like you’re on the look out for a simple way to create virtual machines. You should test out our cloud desktops, they are built on Amazon’s EC2. It takes about 3 minutes to create a desktop. From there they are completley customizable you can add whatever apps you need. You can also administer desktops for other users by easily registering new users with your account and creating desktops for them. Feel free to give our cloud desktops a test drive there is a 7 day free trial available here https://leostreamdesktops.com/create. We signed a few big resellers this week, feedback from them has been they love the price, and they love the ease of use. Let us know what you think!
Can I create windows instance using cdnkey?
Hi Randeep. Sorry, not sure what the relationship of CDN keys and EC2 keys are.
Thanks for the post – even though it appears you wrote this in 2010, the AWS menu-options appear largely unchanged. I was able to setup my first EC2 instance and login via MS RDP without any trouble. Thanks again.
Glad to see it’s still relevant! Thanks.
I actually was basically exploring for suggestions for
my own website and discovered your own article, “Building Windows Machines in Amazon EC2
| Michael Kennedy on Technology”, would you care in case I
actually start using a number of of ur suggestions? With
Feel free. That’s what the article is there for. :)
Now, how do I get a windows 7 home edition on AWS?
AFAIK you can’t. Sorry, it would be sweet.
I have a requirement to create both .net and java work environment on amazon ec2.The purpose is to allow user to practice on new technologies to prepare themselves with upcoming technologies.
In a day there may be aorund 100 users.For Java all the softwares are open source,we dont have to worry on the licensing part.
But for .net we have MSDN bundle license purchased.Can the same be used on VMs in EC2.
Please provide a proper guidance on this.
Hi. Thanks for the comment, but I really can’t speak to Microsoft licensing other than the Windows & SQL Server licenses are included in the AWS monthly fee.
Hi. Thanks for the post, but i nedd know it´s possible install windows 7 in EC2 or virtual desktop in Amazon.
Sorry, as far as I know it’s not possible. You could make your own Win 7 VM outside of EC2 and upload, but I haven’t tried that.
Thank you, for information I I will try upload.
Best regards and thank you for information.
Were you able to upload Windows 7 template and create a machine out of it?
I think, this is what you are looking for: http://aws.amazon.com/de/ec2/vmimport/