Skip to content

AMI export stuck at 28%, recover a snapshot in error status

0

Hello,

Yesterday I launched an export of an AMI from CloudShell, with this command:

aws ec2 export-image --image-id ami-x --disk-image-format VMDK --s3-export-location S3Bucket=x,S3Prefix=x/

The process has been stuck at 28% for more than 15 hours. Before this export I made another one with another larger AMI, and it was exported in less than an hour.

The AMI is old (from 2011), x86_64 architecture, paravirtual.

One of the block devices references a snapshot with "Snapshot status" = "Error" (but "Progress" = "Available (100%)"), I assume this is the cause of the problem. If that were the case, is there any way to recover that snapshot?

Thank you.

asked 2 years ago393 views
1 Answer
0

Hi Max,

If a snapshot is created but VM Export hangs for a long time, it might be either because the AMI has a marketplace product code. i. e. You can check if the AMI or the original AMI if this is made from an EC2 instance is obtained from AWS Marketplace as a 3rd party product, or because the volume(s) in the AMI is an encrypted one.

The VM Export official documentation [1] says:

  • You can't export an image if it contains third-party software provided by AWS. For example, VM Export cannot export Windows or SQL Server images, or any image created from an image in the AWS Marketplace.
  • You can't export an image with encrypted EBS snapshots in the block device mapping.

Please refer to the documentation for other constraints and conditions for VM Export.

References

[1] Exporting a VM directly from an Amazon Machine Image (AMI) - https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport_image.html

AWS
answered 2 years ago
  • Hi Sidney,

    The image has two EBS volumes, neither of them encrypted. I don't think it's coming from a third-party AMI either, although I don't know how I can check that.

    I have tried to create an instance from the AMI, but it is not possible due to the error status of one of the snapshots, so I suspect that the problem is the same when trying to export it.

    Anyway it's a very old AMI and probably doesn't have any relevant data, I just wanted to export it just in case.

    Thanks for your answer.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.