Centos – How to make a CentOS 6 AWS AMI from a loopback

amazon ec2amazon-amiamazon-web-servicescentoscentos6

I am able to make a Centos 5.x AMI by following steps similar to those outlined here:

http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/creating-loopback-s3-linux.html

and detailed here:

http://www.philchen.com/2009/02/14/how-to-create-an-amazon-elastic-compute-cloud-ec2-machine-image-ami

However this process does not work as noted for CentOS 6 because there is no Xen kernel. Is it possible to create a CentOS 6 AMI either using an Amazon-provided kernel or some other kernel?

Best Answer

I was actually making this more complicated than it needed to be. As noted in the link that @malcolmpdx provided (http://wiki.xen.org/xenwiki/RHEL6Xen4Tutorial):

As a default RHEL6 DOES:

  • RHEL6 runs as Xen PV (paravirtual) domU using the pvops framework in the default kernel.
  • RHEL6 runs as Xen HVM (fully virtualized) guest.
  • RHEL6 ships with optimized Xen PV-on-HVM drivers for RHEL6 Xen HVM guests.

It turns out that my issues with booting from the stock kernel we due to the device names. The root partition in the grub menu.lst and fstab need to be changed to /dev/xvde1.