Vame
Vame

Reputation: 2053

EC2 instance - attach ephemeral drives on launch

I am trying to attach the ephemeral partitions on my ec2 instances using boto.

I have tried that with AWS tools and worked:

./ec2-run-instances ami-018c9568 --instance-type m2.4xlarge --availability-zone us-east-1a -n 1 -k my_keypair -g sg-11111111 -b "/dev/xvdb=ephemeral0" -b "/dev/xvdc=ephemeral1" -b "/dev/xvdd=ephemeral2" -b "/dev/xvde=ephemeral3"

When I try it with boto it doesn't work:

mapping = BlockDeviceMapping() eph0 = BlockDeviceType() eph1 = BlockDeviceType() eph2 = BlockDeviceType() eph3 = BlockDeviceType() eph0.ephemeral_name = 'ephemeral0' eph1.ephemeral_name = 'ephemeral1' eph2.ephemeral_name = 'ephemeral2' eph3.ephemeral_name = 'ephemeral3' mapping['/dev/xvdb'] = eph0 mapping['/dev/xvdc'] = eph1 mapping['/dev/xvdd'] = eph2 mapping['/dev/xvde'] = eph3

Upvotes: 0

Views: 176

Answers (1)

Vame
Vame

Reputation: 2053

It is correct. I was experimenting with instance type with a single ephemeral (I thought it had two). Hope it helps other people.

Upvotes: 1

Related Questions