Are the SID, admin tokens, etc. created on the first boot after SysPrep, before going through setup?

I have a virtual machine running in hyper-v that I would like to clone a dozen times. I ran sysprep, shutdown and then duplicated the VHD, assigning it to the other servers already setup in Hyper-V.

Before I copied/assigned the VHD to all the servers, I did "test" it by assigning it to one and then booting into windows. I did NOT go through setup, just made sure Windows booted to the choose your language screen.

All VMs are Gen 1 Hyper-V Machines running Windows Server 2012.

Now I'm getting Domain Trust errors and all machines have the same SID.

Did I mess up by booting once after running sysprep, or is the machine's SID assigned after you do the first boot setup?

Follow-up: Just ran sysprep again on each vm as an easy fix.


Solution 1:

Yeah, you borked it. The specialize configuration pass runs as soon as the image is booted and this configuration pass is responsible fro generating the machine SID.

Lesson learned: Once your sysprep image shuts down do not start it and then use it as your template.

As Jesus mentioned in his answer, duplicate machine SIDS aren't a problem in and of themselves, but if you're wondering why they exist it's because you booted the image and then used it as your template. If this concerns you then create a new template image.

Solution 2:

It's not the SID that causes you issues - having duplicate machines SIDS actually won't cause a problem. However SysPrep does reset a lot of other machine specific settings - some which you may have triggered if you boot into the machine before you deployed the duplicates.

Before starting from scratch I would simply remove the machines to a work group and rejoin them to the domain.