vmware / vmware/photon

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

Open
#1,489 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
3.2k
Forks
692
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the import with the Photon OS v5 tarball and the documented aws ec2 import-image command. Inspect the extracted RAW image in relation to AWS's “Multiple different grub/menu.lst files found” error, and review whether the requested image change or an official AMI distribution is feasible. Done means the distributed image imports successfully with AWS CLI v2, or the supported limitation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.