Tricks and Tips about Systems/Network

August 31, 2010

Amazon : Configuring software RAID 0 on Windows 2008

Filed under: admins,Amazon EC2,Windows 2008 — Liju Mathew @ 6:24 pm

One of my Amazon client demands that he wants to use the large instance (ephemeral) storage and should be boosted to get the maximum preformance on disk I/O operations.

Basically instance storage in Windows AMI can be enable only by starting the instance from the command line. Now my two of 420GB drives are joined as 840GB single drive after the stripping. Here are the screen shots to how to do that,


August 30, 2010

Enabling instance storage on Amazon Windows 2008 AMI

Filed under: admins,Amazon EC2 — Liju Mathew @ 6:54 pm

After login to the AWS console, anyone can start the AMI (either windows or Linux ) instance easily using the interface. But most of the windows 2008 AMI using EBS volume by default and the instance were stared with 30GB diskspace. The real issue is when we start the windows ami using the GUI, we can’t utilise/use the instance storage associated with that package. A small instance has 160GB instance storage (ephemeral) and large instance has 850GB. Unfortunately I didn’t get the ephemeral storage come up with Windows though GUI and client demand it to for the work.

After some goggling it has found that we can enable the instance storage for Windows AMI when it starts only from the command line. So I look forward to start the instance from CLI.

Here is the link will help you to mange the Amazon ec2 from the command line.

Here is the commands to enable ephemeral storage on Windows 2008 instance,

D:\ec2>ec2-run-instances –region us-east-1 -K pk-5SQGV63Y2CU62V4RUXUDHUKOFOSRGUH.pem -C cert-5SQGV63Y2CJU62V4RUXUDHUKOFOSRGUH.pem –block-device-mapping “/dev/sdc=ephemeral0” -block-device-mapping “/dev/sdd=ephemeral1” ami-d9e40db0 -g default -g default -t m1.large -k win-tmpl -z us-east-1c

1. –region : where the instance are running
2. -K pk-5SQGV63Y2CU62V4RUXUDHUKOFOSRGUH.pem : Private key for the SWI login
3. -C cert-5SQGV63Y2CJUdRUXUDHUKOFOSRGUH.pem : X.509 certificates
4. –block-device-mapping “/dev/sdc=ephemeral0” : I uses both ephemeral storage comes up with my large instance plan
5. ami-d9e40db0 : Windows 2008 64 bit AMI
6.-g default : Default security group
7. -t m1.large : Instance type
8. -k win-tmpl : key pair name which created for all widows instances
9. -z us-east-1c : Where EBS storage created.

Some tips,

If you want to expand the C drive volume more than 30GB, you may require to create a snapshot first and increase the volume of the snapshot later. It will create a new volume under “Volume” group and add this volume to the new instance.

You may need to stop the running instance and detached the the volume which attached currently. After that attache the new volume created by the snapshot copy. Pls choose the device name as “/dev/sda1” during the attaching time.

Pls note that choose the same region, the instance you are going to take the snapshot and the expanded volume to be attached which created from the snapshot. Otherwise you can’t attach the volume. Because both the region should be same for instance using and the volume created which is trying to attach.

How to manage Amazone EC2 from the commandline on Windows

Filed under: admins,Amazon EC2 — Liju Mathew @ 6:26 pm

After login to the AWS portal, Go through the menu Accounts—> Security Credentials–>Access Credentials

Then choose the “X.509 certificates” tab from the opend page. During the initial AWS account setup, you may ask to create a X.509 certificate along with a private key. Amazon will suppose to be created only 2 X.509 certificate at a time.
Pls see the attached window,

if you have already downloaded certificate file and private file, copied it in to a safest place. We need both these files to get in to command line login. You can also create the second “X.509 certificate’ file by clicking the ” generate new certificate” link on the same window and you will get a prompt to download certificate file and private key file.

Now you need to download the cli-api tools from here http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip. Download and copy it to “C:\EC2” folder where I wish to work. Now you need to complete the following steps.

1. Copy the certificate file (cert-5SQGV63Y2CJU62V4RUXUDHUKOFRGUH.pem ) and the private key file (pk-5SQGV63Y2CJU62V4RUXUDHUKOFOSRGUH.pem) inside the “c:\ec2″ folder
2. You also need to generate a key pair from AWS console and download it in to this ” c\ec2″ folder.
3. Install Java (jdk1.6.0_14)
4. Setting up path and environment variables.
You may need to set 4 environment variable showing as below.
a. JAVA_HOME =C:\Program Files\Java\jdk1.6.0_14
b. EC2_CERT = C:\ec2\certs\cert-filename.pem
c. EC2_HOME = C:\ec2
d. EC2_PRIVATE_KEY= D:\ec2\certs\pk-filename.pem
e. You need to add the “C:\ec2\bin” in system path list.

Now everything are in place and now you need to test it out. Open command line window and type ” ec2-describe-regions” Out put should look like this,

All are set !!

Create a free website or blog at WordPress.com.