Issue importing an image as an AMI

0

I am trying to import an image as an AMI and I keep getting the message below. I am using RHEL7. I have converted the file to raw. I have put the file in the S3 bucket.

When I type the command below

aws ec2 describe-import-image-tasks --import-task-ids import-ami-(number)

I get the following error.

"Status": "deleted", "StatusMessage": "ClientError: No valid partitions. Not a valid volume.",

I am running the following command to import the image as an AMI.

aws ec2 import-image --description "Image Name" --license-type BYOL --disk-containers file://containers.json

My containers.json file looks like

[ { "Description": "Image Name", "Format": "raw", "UserBucket": { "S3Bucket": "my-import-bucket-name", "S3Key": "imagename.raw" } } ]

Please advise. Note: When I posted this on here the formatting got messed up.

Bryan
질문됨 일 년 전1192회 조회
1개 답변
0

Hi THere

You mentioned that you converted the file format to raw. What do you mean by that? What environment are you exporting your VM from? Can you try one of the other formats listed here? https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#export-vm-image

profile pictureAWS
전문가
Matt-B
답변함 일 년 전
  • I used following command to create raw image : "qemu-img convert -O raw input_image.qcow2 output_image.raw". I think currently its a permission problem I am just not able to issue aws ec2 import-snapshot command due to some permission/role issues. The vmimport policy i added doesn't seem to work. Appreciate your prompt reply. Thanks much.

  • The disk is in raw format. It is supported as mentioned in the docs: When importing a VM as an image, you can import disks in the following formats: Open Virtualization Archive (OVA), Virtual Machine Disk (VMDK), Virtual Hard Disk (VHD/VHDX), and raw

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠