简体   繁体   中英

Creating an AMI of an existing EC2 instance with decreased EBS storage

I have an EC2 instance running on AWS. I want to clone it without rebooting it. I am using the AWS Management Console to do it. Hence, I have done the following:

  1. select instance right-click -> image and templates -> create image
  2. In the opened dialog I have given: image name, enabled No reboot.
  3. Now in Volume Type, I can only see EBS which is 1000 GB. I have the option to reduce the size which I did to 10 GB.

I was wondering what could be the problem with doing that? Even with 10 GB AMI creation process is taking too much time, it's been 1 hr. Did anyone try this before?

I was wondering what could be the problem with doing that?

The problem is that you can't reduce EBS volume size. From docs :

Decreasing the size of an EBS volume is not supported . However, you can create a smaller volume and then migrate your data to it using an application-level tool such as rsync.

Basically, it means you can't decrease the size, only increase it. To use smaller volume, you have to migrate your data yourself to new, smaller volume.

So your AMI can't have smaller volume then the original instance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM