How to Create a Amazon EC2 AMI from Snapshot

If you have Amazon EC2 instances, it might be a good idea to pause and make sure you have a good backup and recovery plan.

If you create AMI from a snapshots of Amazon Linux instances, and then using them to launch new instances. You got error:

EXT3-fs: sda1: couldn't mount because of unsupported optional features (240).
EXT2-fs: sda1: couldn't mount because of unsupported optional features (244).
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)

To resolve this, the key is to make sure the Kernel ID's match up between the original instance and the new AMI Image. All of the steps below are done in the EC2 Management Console:

  • When you create snapshots, it is probably a good idea to keep the original Kernel ID and architecture (i386/x86_64) in a tag on the snapshot. From now you'll need that info.
  • To create a new instance from an existing snapshot, highlight the snapshot and select the "Create Image" button.
  • In the "Create EBS image from snapshot" pop-up, be sure to select the correct architecture first, and then select the Kernel ID. The select list of Kernel ID's depends on the architecture. Also, I selected the "EBS Volumes" Radio button on the "Block Device Mapping Section".
  • After you create the new AMI, be sure to also specify the correct Kernel ID when launching new instances of it.

Comments

Popular posts from this blog

Reduce TIME_WAIT Socket Connections