AWS: error while creating AMI from Ubuntu - error initramfs/initrd

1

I've created a simple VM in virtualbox, installed Ubuntu on it, powered it off and generated an .ova file from it. I am unable to import this to AWS and generate an AMI from the .ova file.

Operating system: Ubuntu 20.04.4 LTS

Kernel: Linux 5.4.0-104-generic

I've followed the steps provided according to the docs and setup role-policy.json & trust-policy.json: https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-role https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html

I've tried re-import the .ova to both virtualbox and VMWare without any issues booting it.

I've tried disable floppy disk

I've tried using both .vdi and .vmdk virtual hard disk files

I keep running into the error:

{
    "ImportImageTasks": [
        {
            "Description": "My server VM",
            "ImportTaskId": "import-ami-xxx",
            "SnapshotDetails": [
                {
                    "DeviceName": "/dev/sde",
                    "DiskImageSize": 2362320896.0,
                    "Format": "VMDK",
                    "Status": "completed",
                    "Url": "s3://xxxx/simple-vm.ova",
                    "UserBucket": {
                        "S3Bucket": "xxx",
                        "S3Key": "simple-vm.ova"
                    }
                }
            ],
            "Status": "deleted",
            "StatusMessage": "ClientError: We were unable to read your import's initramfs/initrd to determine what drivers your import requires to run in EC2.",
            "Tags": []
        }
    ]
}
已提问 2 年前268 查看次数
1 回答
0

You want to make sure you meet the requirements in the (AWS VM Import/Export document](https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html) Based on information provided Ubuntu 20.04 and kernel look to be compatible. Verify that you meet the other requirements as well.

If all of the above is good, then a recommendation might be is to just import the VMDK file method instead of OVA. You can find it in Example 2 on this Import VMDK file.

profile pictureAWS
专家
Elvis_P
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则