What Linux Kernel Versions are Acceptable for AMI Import to Amazon Web Services?
Solution 1
Go to this Importing a VM into Amazon EC2 as an Image
And dig deeper, you will see this VM Import/Export Prerequisites. Although it doesn't mentioned Ubuntu 16.04 in there, you should file a ticket to AWS to ask them whether they accept 16.04 .
You can try to meet ALL the VM creation before submitting the image.
There is a Ubuntu 16.04 AMI found here means somehow they approve it. So please check with AWS .
Solution 2
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!
Related videos on Youtube
TomSchober
Updated on September 18, 2022Comments
-
TomSchober almost 2 years
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
-
Jukka about 8 yearsSpawn an instance from the official Ubuntu 16.04 AMI and see which kernel it is running. See cloud-images.ubuntu.com/locator/ec2
-
-
TomSchober about 8 yearsAfter some trial and error I find this is the only way. Basically, use the default kernel versions that come with what the documentation tells you they accept. Unfortunately, even though Canonical has somehow gotten 16.04 as an AMI, creating my own and leaving the default kernel, is not approved by the importer. I wish they kept a running, updated list of explicit kernel versions. DO NOT blindly
sudo apt-get upgrade
before importing. -
MarnixKlooster ReinstateMonica almost 7 yearsI think the most recent URL for VM Import/Export Prerequisites is docs.aws.amazon.com/vm-import/latest/userguide/… Also, note that that page says, "Imported Linux VMs must use 64-bit images. Importing 32-bit Linux images is not supported." And "Imported Linux VMs should use default kernels for best results. VMs that use custom Linux kernels might not import successfully."
-
mitchus about 4 years@TomSchober it is quite bad support that they don't publish a list of supported kernel versions, have you managed to import any kernel-5.x ?
-
pbrunnen over 3 yearsYour link to idvelopment is to a auth protected website.