ec2 import image is stuck and never finishes

0

Hello, we're trying to import a custom image (windows 11), which should be a no-brainer according to this https://aws.amazon.com/blogs/modernizing-with-aws/bringing-your-windows-11-image-to-aws-with-vm-import-export/

the process of uploading the vhd file, then importing it with aws ec2 import-image is clear (and works fine with windows 10).

the import starts, and seems to work (conversion, first boot, etc), but then it never finishes.

when asking for status details with aws ec2 describe-import-image-tasks, the system gives this status message:

{ "Architecture": "x86_64", "Description": "Windows 11 04", "ImportTaskId": "import-ami-cut", "LicenseType": "BYOL", "Platform": "Windows", "Progress": "58", "SnapshotDetails": [ { "Description": "Windows 11 UEFI 20240404", "DeviceName": "/dev/sda1", "DiskImageSize": 12990046208.0, "Format": "VHD", "SnapshotId": "snap-cut", "Status": "completed", "UserBucket": { "S3Bucket": "cut", "S3Key": "win11.vhd" } } ], "Status": "active", "StatusMessage": "preparing ami", "Tags": [], "BootMode": "uefi" }

it is stuck in this state already for over 12 hours. we can't cancel the import with "aws ec2 cancel-import-task" as the command executes without an error message, but nothing changes.

we recreated and reuploaded the base image already 3 times, with slight variations each time, and tried again, but same situation. the import always gets stuck at progress:58 / preparing ami.

how can we cancel the pending tasks? what can we do to make the import work?

asked 25 days ago410 views
1 Answer
0

Despite following the process outlined in the provided documentation. While the process works smoothly for Windows 10 images, you're experiencing a hang-up during the import process for Windows 11.

Based on the status message you received from aws ec2 describe-import-image-tasks, it seems the import task is stuck at the "preparing ami" stage, with a progress status of 58. Despite attempting to cancel the import task using aws ec2 cancel-import-task, the command executes without any changes to the situation.

  • Review Import Requirements: Double-check that your custom Windows 11 image meets all the necessary requirements outlined in the documentation. Ensure compatibility with the import process and verify that there are no issues with the image itself that could be causing the import to fail.
  • Check Resource Limits: Ensure that you haven't exceeded any resource limits or quotas that could be affecting the import process. This includes limits on EC2 instances, EBS volumes, and other related resources.
  • Retry with Different Configurations: Since you've already tried recreating and reuploading the base image multiple times with slight variations, consider experimenting with different configurations or settings to see if any changes improve the import process.
  • Monitor System Resources: Monitor the system resources during the import process to ensure that there are no bottlenecks or resource constraints causing the import to stall. This includes monitoring CPU, memory, and network usage
profile picture
EXPERT
answered 25 days ago
  • requirements: are met as documented resource limits: none that i am aware of, this is a tiny image (<12GB) different configurations: this is a freshly installed image from microsoft original iso, nothing was modified except adding the ec2config installer. what additional modification would you suggest? monitor system resources: how do you monitor consumed resources of the import process?

    i just imported a win10 image following the exact same process, it worked flawlessly, and then in-place upgraded the win10 image to win11, which then also works perfectly fine. i doubt there is anything wrong with the image i'm trying to import or with the process (i am copy-pasting commands from the aws documentation).

    how can i get rid of the lingering import tasks? the cancel command has no effect at all and it's now over 20 hours they are stuck in this state.

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.

Guidelines for Answering Questions