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": []
        }
    ]
}
asked 2 years ago261 views
1 Answer
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
EXPERT
Elvis_P
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions