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
질문됨 일 년 전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

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

profile picture
전문가
답변함 일 년 전

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

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

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

관련 콘텐츠