Tuesday, April 5, 2011

AWS - Steps to create AMI from a non EBS instance.


  1. Copy pk-MX7IVEMMKXYAMPDYTZK2LXQH45N2YI44.pem under /mnt folder.
  2. Copy cert-MX7IVEMMKXYAMPDYTZK2LXQH45N2YI44.pem under /mnt folder.
  3. Make directory /home/ec2 if not already present. If already present, skip step (4) & (5) below.
  4. Download Amazon ec2 ami tools from:  wget http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools.zip
to /home/ec2 folder.
  1. Download Amazon ec2 api tools from: wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip
to /home/ec2 folder.
            You will see two folders under /home/ec2.
                        (a) ec2-ami-tools-1.3-34544
                        (b) ec2-api-tools-1.3-42584

        6. Run below command:
            export EC2_HOME=/home/ec2/ec2-api-tools-1.3-42584
            export PATH=$PATH:$EC2_HOME/bin
ec2-bundle-vol -e /home/ec2 -d /mnt -k /mnt/pk-MX7IVEMMKXYAMPDYTZK2LXQH45N2YI44.pem -c   /mnt/cert-MX7IVEMMKXYAMPDYTZK2LXQH45N2YI44.pem  -u 462277401603 -r x86_64 -p perftest_170709


9. Upload your bundle to AWS S3 Storage.
ec2-upload-bundle -b itfundas/64bit_AMI -m /mnt/perftest_170709.manifest.xml -a 0X9F5NQGXJFAYDRK5S82 -s ZAlPy2GhwUBn1UO38aRRRdOEqQlp64yzzje3+ojd


ec2reg -C /mnt/cert-MX7IVEMMKXYAMPDYTZK2LXQH45N2YI44.pem -K /mnt/pk-MX7IVEMMKXYAMPDYTZK2LXQH45N2YI44.pem itfundas/64bit_AMI/perftest_170709.manifest.xml

1 comment:

  1. While registering, ec2reg , sometimes you will get the like the following.

    "org.codehaus.xfire.fault.XFireFault: Unexpected close tag ".

    If you got this error, plz check the api tools version. (ec2-api-tools). You need to update the api tools.

    ReplyDelete

Error: Too many open files

Couple days ago, I ran into this error on CentOS 5.2.  To my understanding this error can occur on all flavors of l...