HOWTO: Convert an OVA to an AMI
Prerequisites
- Java 1.7
- yum install java-1.7.0-openjdk
- AWS and EC2 CLI Tools
- Access to an AWS account
- Environment variables
- JAVA_HOME
- /usr/lib/jvm/jre-1.7.0-openjdk.x86_64 on CentOS
- AWS_ACCESS_KEY
- AWS_SECRET_KEY
- EC2_HOME
- Where you’ve uncompressed the EC2 CLI archive.
- Add /usr/local/ec2/bin to your PATH
Procedure
- Name the ova something like <original ova>.ova.tgz
- Untar the OVA
- tar xvf <original ova>.ova.tgz
- Create an S3 bucket to use for image storage during conversion
- This name of this bucket is passed to the ec2-import-image on the -b switch.
- Use ec2-import-image
- ec2-import-instance cloudbolt-5.0.0.4-disk1.vmdk \
-f VMDK \
-t t2.medium \
-p Linux \
-a x86_64 \
-b demo-amis \
-o $AWS_ACCESS_KEY \
-w $AWS_SECRET_KEY
- Watch conversion status with:
- ec2-describe-conversion-tasks
- It takes a while, but eventually an instance shows up configured with the contents of the VMDK.
- Note: it takes a while even after the conversion process has completed.
Rick Kilcoyne
-
Have more questions?
Submit a request
0 Comments