AWS: error while creating AMI from a Debian12 iso - ClientError: Unsupported kernel version 6.1.0

0

What Linux Kernel Versions are Acceptable for AMI Import to AWS ?

We have a Debian12 (Bookworm) ISO and want to create an AMI using this iso. We followed the steps from AWS documentation Importing a VM as an image using VM Import/Export but getting the below error.

"ClientError: Unsupported kernel version 6.1.0-7-amd64"

Steps followed

  • Export image from VirtulBox
  • Upload the image to S3
  • Import the VM using the below command

aws ec2 import-image --description "Debian 12 (Bookwarm) AMI" --disk-containers "file://containers.json"

containers.json

[
    {
     "Description":"vm import",
     "Format":"ova",
     "UserBucket": {
        "S3Bucket": "debian12-iso",
        "S3Key": "Debian12_Bookwarm.ova"
}
}]

Check upload status

aws ec2 describe-import-image-tasks --import-task-ids import-ami-074992884b301a9e7

Error Message:

{
    "ImportImageTasks": [
        {
            "Description": "Debian 12 (Bookwarm) AMI",
            "ImportTaskId": "import-ami-074992884b301a9e7",
            "SnapshotDetails": [
                {
                    "DeviceName": "/dev/sde",
                    "DiskImageSize": 1346003968.0,
                    "Format": "VMDK",
                    "Status": "completed",
                    "UserBucket": {
                        "S3Bucket": "debian12-iso",
                        "S3Key": "Debian12_Bookwarm.ova"
                    }
                }
            ],
            "Status": "deleted",
            "StatusMessage": "ClientError: Unsupported kernel version 6.1.0-7-amd64",
            "Tags": []
        }
    ]
}
profile picture
已提問 1 年前檢視次數 454 次
2 個答案
0
已接受的答案

Unfortunately Debian12 is not supported in VM Import/Export.

Supported Debian:

VersionKernel
6.0.0–6.0.82.6.32
7.0.0–7.8.03.2
104.19.0
115.10.0

Please find the list of Linux/Unix OS (64-bit only) which can be imported to and exported from Amazon EC2 here.

You may consider using AWS Application Migration Service.

profile pictureAWS
已回答 1 年前
0

For kernels not supported by VM Import, you can do a Snapshot Import.

Snapshot import does not check kernel version. As it does not inject the necessary drivers for your OS to run on AWS, you will need to install them in your OS. These are Xen PV drivers and NVMe/ENA drivers for HVM and Nitro instance types respectively.

You can use the script at Why is my Linux instance not booting after I changed its type to a Nitro-based instance type? to ensure your OS works with Nitro instance types.

To assist with trouble-shooting after importing, you can enable Serial Console. Note that this is only supported on Nitro instance types.

AWS
專家
Mike_L
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南