AWS:从 Ubuntu 创建 AMI 时出错 - 错误 initramfs/initrd

发布于 2025-01-15 21:19:23 字数 1537 浏览 0 评论 0原文

我在 VirtualBox 中创建了一个简单的虚拟机并安装了 Ubuntu,但是我无法将其导入 AWS 并从中生成 AMI。
操作系统:Ubuntu 20.04.4 LTS 内核:Linux 5.4.0-104-generic

我已按照文档提供的步骤进行操作并设置 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

我一直遇到错误:

{
    "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": []
        }
    ]
}

我尝试将磁盘更改为 .vdi 和 .vmdk,

我尝试禁用软盘驱动器并更新 initramfs

I've created a simple VM in VirtualBox and installed Ubuntu, however, I am unable to import this to AWS and generate an AMI from it.
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 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": []
        }
    ]
}

I've tried changing disk to and from .vdi and .vmdk

I've tried disabling floppy drive and update initramfs

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一腔孤↑勇 2025-01-22 21:19:23

我遇到了这个错误,并能够通过使用 导入快照而不是导入图像。然后,我可以使用 创建的普通方式部署快照快照中的图像

I ran into this error and was able to get around it by using import-snapshot instead of import-image. Then I could deploy the snapshot using the ordinary means of creating an image from the snapshot.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文