Image Builder windows sysprep settings

0

I've noticed some things are not retained (e.g. nvidia drivers, desktop shortcut) when I build a custom windows image via image builder vs running my install script manually and then doing EC2Launch v2 > shutdown with sysprep and manually imaging in the aws console. It is as if the CopyProfile and PersistAllDeviceInstalls flags are not being used. But it could also be due to some other unknown-to-me differences in the image builder environment.

Is there any documentation re: how sysprep is called by image builder? (I tried copying the ec2Launch v2 version of unattend.xml into C:\Windows\Panther\ but this did not seem to correct the behavior.)

asked 3 months ago143 views
1 Answer
1
Accepted Answer

One possible issue is that AWS Image Builder might not be using the same unattend.xml settings you're familiar with, including the CopyProfile and PersistAllDeviceInstalls flags. Although AWS Image Builder automates the sysprep process, it may have its own custom configurations that differ from your manual approach. Unfortunately, there isn't always direct documentation about how sysprep is invoked specifically in Image Builder, but I would recommend checking the latest AWS Image Builder docs, especially for customization options like using custom components, as well as reviewing log files (such as those in the Panther directory) for more clues about what's being applied. It might also be worth exploring Image Builder pipelines to ensure the unattend.xml is correctly utilized.

profile picture
answered 3 months ago
profile picture
EXPERT
reviewed 3 months ago
  • Thank you. I was able to find in the sysprep logs that it was being called with same unattend file as the ec2launch v2 method. However, by putting some log print statements in my build components, I was able to see that the build user is not Administrator, like I had assumed, but rather the system default user. So whoami = nt authority\system, and Home directory = C:\Windows\system32\config\systemprofile. This does pose some quirks, but at least knowing this I should be able to work around them. (The nvidia driver issue was separate and simply due to the fact that the build instance also needs to have a gpu or the driver won't install.)

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