6

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
0

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 .

  • 1
    After 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. – TomSchober May 18 '16 at 15:02
  • I 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." – MarnixKlooster ReinstateMonica Jul 27 '17 at 4:28
  • @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 ? – mitchus Jul 3 '20 at 15:19
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!

0

For those looking for solution, you can use ec2-bundle-image which is included in ec2-ami-tools. Here is some recipe:

http://www.idevelopment.info/data/AWS/AWS_Tips/AWS_Management/AWS_10.shtml#Upload%20the%20AMI%20to%20Amazon%20S3

You must create X.509 certs first:

http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ec2-cli-managing-certs.html

  • Your link to idvelopment is to a auth protected website. – pbrunnen Dec 7 '20 at 20:02
0

After much trying, I finally could upload an Ubuntu 14.04.5 LTS LTS machine from Virtualbox with the 3.13.0-031300-generic kernel that you can get here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.