What Linux Kernel Versions are Acceptable for AMI Import to Amazon Web Services?
I have a stock image of Ubuntu Server 16.04
exported as an OVA from VirtualBox. After the proper permissions are set up to import that OVA into AWS EC2 as an image, and it's loaded into S3, the process haults during the import with a status of:
deleted ClientError: Unsupported kernel version 4.4.0-21-generic
My first reaction is to search the AWS documentation for what kernel versions they WOULD accept. That eludes me.
What versions are acceptable for import, and where is the documentation on that in AWS?
Import
aws ec2 import-image --description "Ubuntu Server 16.04 LTS" --disk-containers file://ubuntuContainer.json
ubuntuContainer.json
[{
"Description": "Import Task",
"Format": "ova",
"UserBucket": {
"S3Bucket": "myBucket",
"S3Key": "somePath/UbuntuServer16.04LTS.ova"
}
}]
Check status
aws ec2 describe-import-image-tasks --cli-input-json "{ \"ImportTaskIds\": [\"import-ami-abcd1234\"]}"
Results
IMPORTIMAGETASKS Shindig Ubuntu Server 16.04 LTS import-ami-abcd1234 deleted ClientError: Unsupported kernel version 4.4.0-21-generic
SNAPSHOTDETAILS 1006215680.0 VMDK
USERBUCKET myBucket somePath/UbuntuServer16.04LTS.ova
I had the same problem with my kernel version not being supported. In August of 2019, the kernel-5.0.0 on my Ubuntu-18.04.2 was not accepted. To compare what Amazon's AMIs were using, I launched their Ubuntu-18.04.2 and found that it was using kernel-4.4.0. So I ended up using an Lubuntu-16.04.3.VMDK that I had locally with kernel-4.10.0-28-generic, converted it to .OVA (OVF version 2.0) using VirtualBox, uploaded it to S3, and was able to successfully get it to import to .AMI using the "aws ec2 import-image" command. So based on my tests, it seems that as of now, AWS is accepting kernel-4, but not kernel-5. Hope this helps!