Domain – How to clone, disjoin & rename a Windows 2008 R2 VM offline, then rejoin domain online

active-directoryclonedomainrenamewindows-server-2008-r2

I have a Windows 2008 R2 domain joined server, which should be cloned as test server in the same domain!
There is an MSSQL 2012 instance and Team Foundation Server 2013 installed, but this shouldn't have any impact on this plan.

My plan is the following.

  1. Clone the VMware machine.
  2. Boot without network connection (unplug the cable)
  3. Disjoin the domain with local admin, reboot
  4. Rename the servername and change the ip address, reboot
  5. Connect the network connection
  6. Join the domain (and change the @@servername in MSSQL).

My questions:
Does this procedure affect the original server (domain computer account) in any way?
What would you be your advice to do this?

Thank you in advance for your help!

Best Answer

With all servers that are domain-joined, you need to sysprep them first. Revise your steps to the following:

1) Clone the machine using VMWare tools.
2) Boot without network connection.
3) Run C:\windows\System32\sysprep\sysprep.exe and tick "Generalize". Allow it to reboot.
4) Name the machine and connect it to the network and join as normal.

The sysprep is absolutely required to ensure the servers don't have conflicting SIDs. Be sure to regenerate the MAC address of the network adapter when you do the clone as well (I believe ESXi does this for you anyway).