Create New EC2 Instance with Custom ISO
Overview:
- Check pre-requisites
- Install your ISO onto VMware vSphere then export as VMDK
- Upload your VMDK to an S3 bucket on the same AWS account
- Install and configure AWS command line interface (CLI)
- Setup a VM Import Service Role
- Use the CLI to import the VM from S3 into an Amazon Machine Instance (AMI)
This is a lengthy process, so it's worth reading through the pre-requisites. Pay particular attention to the supported operating systems / Linux distributions and versions.
They clearly state "Note that you can only import VMDK files into Amazon EC2 that were created through the OVF export process in VMware."
For example, you can get a VMDK using VirtualBox, but if you try to import this you might see the following error, when checking the status:
aws ec2 describe-import-image-tasks --import-task-ids import-ami-someid
"StatusMessage": "ClientError: Disk validation failed [Unsupported VMDK File Format]"
However, there is some Oracle documentation on exporting a virtual machine in the Open Virtualization Format (OVF).
If all goes well, you can launch the newly imported AMI as usual.
From this ISO, you can create either a VMware or VirtualBox image. Form there, you may convert this image into an EC2 AMI image and go from there.
Just make sure you are using the same arch (32 v. 64) and proper kernel.
That being said, you might get into more operations then simply fire up an existing vanilla AMI available from the community. There might be one that closely match your OS requirements.