views:

65

answers:

1

I'm trying to setup and configure some AMIs on Amazon EC2 for some batch processing work we need to undertake. Having played around, I know that the default Windows Server AMIs with EBS backed storage are 30GB. However, I'd like to have the initial volume at 150GB. I've read around numerous articles (including this one), but it's not working as described. When I try to create a new instance with the larger root partition, I'm getting:

WARNING: Ignoring extra parameters(s): [ :150:false ]

Invalid argument for option '-b, --block-device-mapping MAPPING': '/dev/sda1' (-h for usage)

To confirm, I've included the full command I'm running, minus my keys and other private details:

ec2-run-instances ami-b5517bc1 -b "/dev/sda1=:150:false" --region eu-west-1 -K pk-XXXXXXXXXXXXXXXXXXXXXX.pem -C cert-XXXXXXXXXXXXXXXXXXXXXXXXXXXX.pem -g quick-start-1 -t m1.large -k XXXXXXXXX --disable-api-termination --instance-initiated-shutdown-behavior stop -z eu-west-1b

Can someone suggest where I might be going wrong, or is it simply that this AMI isn't allowing me to create it with a larger root partition. If so, does anyone have any alternative suggestions for how to do this. The primary reason I need this is that I want to image this AMI and create a number of instances of it to kick of some batch processes that run on a very large DB. This is much easier than duplicating multiple EBS volumes and attaching each one to a different instance, etc, etc. Any help would be greatly appreciated.

Thanks.

A: 

You have missed the snapshot id in "/dev/sda1=:150:false".

The --block-device-mapping option takes a value in the following format: device-name=snapshot-id[:volume-size[:deleteOnTermination]]

http://developer.amazonwebservices.com/connect/message.jspa?messageID=157133

skimnetster
But the snapshot ID is optional. If you don't specify a snapshot it should create a new volume based on the AMI, with the size specified. Or is my understanding of this incorrect? Also, I have actually tried with a snapshot just in case, and this failed with similar results.
Chops
You are right, it should create one for you. Based on the error message the other things to take care of would be to use the latest version of ec2 command line tools; and if you not on windows dos prompt, quotes around parameters might not be required.
skimnetster
I'm actually stumbled across the issue after a day of trying. It seems to be Powershell. I was using Powershell 2.0. Switching to Command Prompt fixed it. No variation of with or without quotes seemed to work with PS. Which seems really bizarre but true. Am running latest version of the tools.
Chops