How to add disks (ebs) to AWS EC2 instance on euwe2


#1

Hello,

I am using euwe2 and need to add x amount of disks to an ec2 instance. With the vmware provider I could use add_disk, but that doesn’t seem to translate to the AWS provider. Has anyone crossed this bridge before?

Thanks


#2

We have develop a custom add_disk function for aws instance that use aws sdk.


#3

Hey @LorkScorguar thanks for the reply. We did the same, after looking at doing it via Ansible which didn’t pan out.


#4

do you all have this custom add disk function up somewhere to share?


#5

Have uploaded to git


#6

Dan, did you ever try to set the initial root disk when doing initial provisioning of an AWS instance?


#7

Nope sorry, using ami with root disk.

This should work…
Stop the instance.
Detach the root EBS volume.
Attach the alternate EBS volume as the root: /dev/sda1
Start the instance