How to make an EBS volume in bootable AMI? (Created an instance from a public instance. Now I want to make it mine ...)

I created an Amazon instance from a public AMI with EBS support.

I installed it and made my changes.

Now I want to take this EBS volume with my changes and do it in boot AMI. How to do it?

From the Amazon web console, she has no way to take an arbitrary snapshot or volume of EBS and load from it ... It must be a special "AMI" volume. How can I bless an EBS volume to make it an AMI?

+4
source share
1 answer

The process of creating your own AMI from an EBS-supported Amazon EC2 instance is currently straightforward; there are two options:

Amazon EC2 API Tools

How to achieve this using the Amazon EC2 API Tools is described in Creating AMI with Amazon EBS Support :

You can create an AMI that uses the Amazon EBS volume as its device root with Windows or Linux / UNIX operating systems.

[...] You start with AMI supported by Amazon EBS (for example, one of the public AMIs that Amazon provides) and modify it to suit your specific needs. [...]

If you have a working instance in the correct state, use ec2-create-image or CreateImage and specify the instance ID. Amazon EC2 disconnects the instance, accepts images of any volumes that were attached, creates and registers AMI, and then reloads the example. [...]

Detailed instructions (few and simple) for this from the command line are also described on this page.

AWS Management Console

How to achieve this using the AWS Management Console is described in Creating an Image from a Running Instance :

In this section, you will learn how to create an AMI with Amazon EBS support for a running instance of Amazon EBS. If you do not have a working instance that uses the Amazon EBS volume for the root device, you must start it (see the instructions for starting, stopping, and starting for instructions).

This is even easier than running the command line, but has the disadvantage that the instance must be disabled, while this is not necessary (although by default) when using the command line approach above:

Tip
As part of the process of creating your new AMI, we will disconnect the instance and reboot it. If you prefer the instance not to restart, you can use the Amazon EC2 command-line tools to create instead of the AWS management console. The image ec2-create-image command has the -no-reboot option. When you use this option, the file system integrity in the created image cannot be guaranteed. [...]

0
source

All Articles