No Mapping Between Account Names and Security IDs – SQL Server Install and SysPrep Generalize

Recently, a colleague and I were working on creating a set of virtual machines to be used in a SharePoint play-pit environment hosted by Hyper-V. 

After creating a base Windows Server 2008 R2 VM, we used SysPrep to clone the base image and start building our the servers. We built a nice DC and added service accounts for SQL services and then started building SQL Server 2008 VM.

During the SQL Server installation, after entering details of the relevant service accounts, the setup failed to progress to the next step, displaying the message: ‘The credentials you supplied for the xxx service are invalid…’

Screenshot of SQL Server Install Error #1

After double checking the service account details numerous times, I was stumped.  We went to numerous lengths to try and resolve the issue – including rebuilding the DC and SQL VMs a couple of times.

I tried adding the service accounts to the Local Administrators groups (I don’t know why as I knew the service accounts didn’t require these permission levels, but by this time it was getting frantic).  Then I noticed that after the account was confirmed as joining the group, it disappeared from it!

Going back to the SQL Server installation, I tried browsing to the account name rather than type it in, and although the account was found, a different error was generated after attempting to confirm the account – “..No mapping between account names and security IDs was done.”

image

After some fishing around, I linked this error message back to the way we had sysprep’d (cloned) our Base VM!

Casting our minds back to the cloning of the base VM we were presented with this dialog:

image

By default, the ‘Generalize’ option is un-ticked. This is ABSOLUTELY KEY as, only when selected, will it regenerate security IDs (SIDs).  Leaving it blank (as we did) means that all our cloned VMs were using duplicate SIDs, and hence the peculiar behaviour and failed SQL Install!.

We cloned our original base VM once more with SysPrep, but this time remembering to click the box, and rebuilt our DC and SQL Server successfully!

I hope this comes in useful for someone.

p.s. Big thanks to Sam Wainwright who patiently re-built the VMs and reinstalled SQL countless times on my command and was patient to the end!