Can I change the root EBS device of my amazon EC2 instance?

前端 未结 6 405
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-12 12:43

I have an EBS backed Amazon EC2 instance. I would like to change the root device on this instance. Can you please advise the best way to go about this?

I only find do

6条回答
  •  北荒
    北荒 (楼主)
    2020-12-12 13:23

    Yep, it's dead easy:

    1. Stop the instance.
    2. Detach the root EBS volume.
    3. Attach the alternate EBS volume as the root: /dev/sda1
    4. Start the instance.

    This presupposes that your alternate EBS volume is bootable, of course - it has to contain the bootable OS image.

提交回复
热议问题