Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image import of Photon OS v5 AMI (RAW image) fails (using AWS-CLI v2) #1489

Open
usui-tk opened this issue Jun 24, 2023 · 0 comments
Open

Image import of Photon OS v5 AMI (RAW image) fails (using AWS-CLI v2) #1489

usui-tk opened this issue Jun 24, 2023 · 0 comments
Labels

Comments

@usui-tk
Copy link

usui-tk commented Jun 24, 2023

Describe the bug

I used the Tar.gz file available at the following URL to create an AMI for Photon OS v5.

[URL]
https://packages.vmware.com/photon/5.0/GA/ami/photon-ami-5.0-dde71ec57.x86_64.tar.gz

Image import to AWS was performed using "AWS-CLI v2".
This is because "AMI Tools" including "ec2-bundle-image command" depends on the Ruby execution environment and does not work on the latest operating systems.

[Set up the AMI tools]
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-up-ami-tools.html]

[Installing or updating the latest version of the AWS CLI]
https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

I tried to import a RAW image using "aws ec2 import-image" in AWS-CLI v2, but the following error message was displayed and the image could not be imported successfully.
*In the past, I have also tried to do this with Photon OS v4, but the import process ended abnormally with the same error message.

[error message]

# aws ec2 describe-import-image-tasks --import-task-ids import-ami-0fd6fbc2639a4274f
{
    "ImportImageTasks": [
        {
            "ImportTaskId": "import-ami-0fd6fbc2639a4274f",
            "SnapshotDetails": [
                {
                    "DeviceName": "/dev/sde",
                    "DiskImageSize": 8589934592.0,
                    "Format": "RAW",
                    "Status": "completed",
                    "UserBucket": {
                        "S3Bucket": "aws-vmimport-123456789",
                        "S3Key": "photon-ami-5.0-dde71ec57.x86_64.raw"
                    }
                }
            ],
            "Status": "deleted",
            "StatusMessage": "ClientError: Multiple different grub/menu.lst files found.",
            "Tags": []
        }
    ]
}

Therefore, we would like the image files distributed to be modified so that images can be imported with modern operating systems and AWS tools (AWS-CLI v2).
Alternatively, we would like the community to implement an official AMI distribution.

Thank you in advance.

Reproduction steps

1. Set up AWS-CLI v2 and make it available

2. Download Photon OS v5 and execute image import


mkdir /data

cd /data

wget https://packages.vmware.com/photon/5.0/GA/ami/photon-ami-5.0-dde71ec57.x86_64.tar.gz

tar -xvf photon-ami-5.0-dde71ec57.x86_64.tar.gz

aws s3 cp /data/*.raw s3://aws-vmimport-123456789
(The S3 bucket name above is a sample)

aws ec2 import-image --disk-containers Format=raw,UserBucket="{S3Bucket=aws-vmimport-123456789,S3Key=photon-ami-5.0-dde71ec57.x86_64.raw}"
(The S3 bucket name above is a sample)

3. Check the status of the import process using the "aws ec2 describe-import-image-tasks " command


aws ec2 describe-import-image-tasks --import-task-ids import-ami-123456789
(The above image import task ID is a samplee)

Expected behavior

Therefore, we would like the image files distributed to be modified so that images can be imported with modern operating systems and AWS tools (AWS-CLI v2).
Alternatively, we would like the community to implement an official AMI distribution.

Additional context

No response

@usui-tk usui-tk added the bug label Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant