Execute sysprep on first boot

Our windows builds are coming up with the same Device ID which is causing conflicts with an agent that is installed later on after the build is completed.

We’ve determined that because the images all have the same device id our master node sees all of our agent nodes as one unit.

I can confirm we run sysprep.exe /oobe /generalize when building the image that get’s uploaded to MaaS.

Just wondering if we’re doing something wrong during image build or if we should be executing sysprep a 2nd time when we deploy the images via MaaS ? If so, would this be done using a run once script via cloudinitbase ?


We’re not really experts on Windows and have not run into this issue ourselves as we don’t deploy Windows regularly. However, looking at sysprep documentation, it seems to suggest that using generalize should be the last step followed immediately by a shutdown - is this something that happens in your image building scripts?

You could try running sysprep the 2nd time on a deployed machine, and indeed the run once script would be the right place to try it. Sysprep seems to have a limit counter so it should not be run too many times on the same image.

Thanks, it does indeed run as the last step before we shut down to capture the image. I’ve monitored the process in hyper-v.

I will try sysprep in the run once and report back.