ImageBuilder - Password was reset?

0

I'm trying to use ImageBuilder to update our Windows Server 2022 based AMI. Our image recipe runs one component (update-windows) and then we run a simple boot test. For some reason the Administrator password in the resulting image seems to have changed and so I can't RDP in. When I attach the volume to another instance, it looks correct, so it's not like it's using an unexpected snapshot somehow. What am I missing here? Thank you

  • When you say the Administrator password looks correct, are you able to RDP into the other instance with the attached volume that is using the new AMI? Is there a specific error you are getting when you attempt to RDP into the instance using the new AMI? (i.e. The Username or Password is Incorrect.)

SM
質問済み 1年前615ビュー
2回答
1
承認された回答

Hello, so this is by design when you build an Image via EC2 Image Builder as part of the final build steps AWS EC2 Image Builder runs Microsoft Sysprep this is done to generalize your image so that it can be deployed as a golden image for multiple EC2 Instances. Part of the Sysprep process by default for EC2Launch V2 which is used by Windows Server 2022 will reset the Administrator password to use the EC2 key pair that is assigned when launching a new image using the outputted AMI by EC2 Image Builder. If you are providing a custom AMI and then using the component update-windows this will run Microsoft updates but as part of the build workflow there is a step "RunSysPrepScript" that is executing sysprep that will reset the Administrator password.

To be able to connect to your Instances that are launched from the AMI that was created by Image Builder assign a key pair when creating the instance and use that to decrypt the Administrator password to login. As per this documentation. For some additional information regarding sysprep for image builder refer to this documentation and in general for creating customizable sysprep images refer to these articles

https://repost.aws/knowledge-center/sysprep-create-install-ec2-windows-amis https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/Creating_EBSbacked_WinAMI.html#ami-create-standard

AWS
Peter_B
回答済み 1年前
1

What happens if I do something like get the initial password for Windows?
https://repost.aws/knowledge-center/retrieve-windows-admin-password

profile picture
エキスパート
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ