执行"export-image" 返回 "InvalidParameter" 提供的镜像 ID 不存在。

0

【以下的问题经过翻译处理】 为什么对于标准的Amazon Linux 2 AMI ami-03af6a70ccd8cb578(“amzn2-ami-kernel-5.10-hvm-2.0.20211201.0-x86_64-gp2”),aws ec2 describe-images --image-ids ami-03af6a70ccd8cb578 正常工作并显示:

{
    "Images": [
        {
            "Architecture": "x86_64",
            "CreationDate": "2021-12-01T20:06:29.000Z",
            "ImageId": "ami-03af6a70ccd8cb578",
            "ImageLocation": "amazon/amzn2-ami-kernel-5.10-hvm-2.0.20211201.0-x86_64-gp2",
            "ImageType": "machine",
            "Public": true,
            "OwnerId": "137112412989",
            "PlatformDetails": "Linux/UNIX",
            "UsageOperation": "RunInstances",
            "State": "available",
            "BlockDeviceMappings": [
                {
                    "DeviceName": "/dev/xvda",
                    "Ebs": {
                        "DeleteOnTermination": true,
                        "SnapshotId": "snap-0d3c07fe7b24df1b8",
                        "VolumeSize": 8,
                        "VolumeType": "gp2",
                        "Encrypted": false
                    }
                }
            ],
            "Description": "Amazon Linux 2 Kernel 5.10 AMI 2.0.20211201.0 x86_64 HVM gp2",
            "EnaSupport": true,
            "Hypervisor": "xen",
            "ImageOwnerAlias": "amazon",
            "Name": "amzn2-ami-kernel-5.10-hvm-2.0.20211201.0-x86_64-gp2",
            "RootDeviceName": "/dev/xvda",
            "RootDeviceType": "ebs",
            "SriovNetSupport": "simple",
            "VirtualizationType": "hvm"
        }
    ]
}

但执行这个操作: aws ec2 export-image --image-id 'ami-03af6a70ccd8cb578' --disk-image-format VMDK --s3-export-location S3Bucket=XXX,S3Prefix=exports/ 抛出:

An error occurred (InvalidParameter) when calling the ExportImage operation: The image ID (ami-03af6a70ccd8cb578) provided does not exist. Please make sure the ID is correct.
profile picture
专家
已提问 5 个月前51 查看次数
1 回答
0

【以下的回答经过翻译处理】 导出镜像存在几个限制,可能会导致错误。这些限制在此文档中有记录:https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport_image.html#limits-image-export

本情况适用的限制是“如果您从另一个AWS帐户中共享了Amazon EC2的镜像,则无法导出镜像”。如果您使用标准的Amazon Linux 2 AMI,并且该AMI存在于由AWS管理的另一个帐户中,则应该能够将AMI复制到您自己的帐户中,然后使用该AMI ID导出它,只要不涉及其他限制。

profile picture
专家
已回答 5 个月前

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

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

回答问题的准则