We have a Windows Server 2008 R2 machine that ends up being replicated multiple times a week for development purposes.
Each time the server is replicated, the machine name changes. This completely kills SharePoint, and since the alternate access mappings are no longer correct--fixing it is no easy task.
Is there a good way to sysprep/replicate a server that is running SharePoint without having to fix everything each time?
Thanks
Short answer: no.
SharePoint is very intollerant to host name changes. What you can do is install the binaries, service packs and language packs. As long as you don't run psconfig.exe you will be able to sysprep and clone that machine. After cloning script psconfig to ease provisioning.
I would script an unattended install of SharePoint that gets called from the answer file rather than trying to cram it into the image and work around whatever blows up. It's more scalable and agile that way.
I just did this and would like to document it for others.
If on the other hand you would like to set up a SP VM for duplication, don't run the SharePoint 2010 Products Configuration Wizard. After you clone the VM for use, run the wizard. The wizard will create the configuration database. Reference