4

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!

1
  • Make sure to run SELECT @@SERVERNAME after you deploy the cloned image to check the SQl Server name. If the old name is still reflected you'll need to run sp_dropserver and sp_addserver to change the name.
    – joeqwerty
    Dec 18, 2014 at 16:59

2 Answers 2

7

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).

7
  • Note that sysprepping a system may break some software. Or course, so may changing the computer name.
    – Grant
    Dec 18, 2014 at 13:10
  • Yes ESXI changes the MAC address. I can confirm that from cloning a bunch of machines. However I'm not entirely convinced sysprep is as important, see my answer.
    – Reaces
    Dec 18, 2014 at 13:11
  • @Grant True, I see that as a given though. In particular I'm not sure how well team foundation server will behave with a changed name...but hey, it's testing, right?
    – Nathan C
    Dec 18, 2014 at 13:11
  • @Reaces While your reasoning is right, using sysprep is the recommended way to do a clone. Granted, the best way to clone is to use a freshly patched install and syspreping that.
    – Nathan C
    Dec 18, 2014 at 13:12
  • 1
    It's possibly worth noting that, if this is to be repeated multiple times, then the above steps could be marginally altered to include selecting 'shutdown' from the options in sysprep.exe, then taking a snapshot of the resultant machine whilst shut down - creating a 'ready to configure' VM image which can then be cloned and named in the future to mitigate repetition of some of the above steps.
    – BE77Y
    Dec 18, 2014 at 15:27
2

Adding to Nathan C's answer.

The proper supported way of cloning an AD joined computer is by using sysprep.
While normally you can safely say that your new machine will get a new RID, microsoft recommends using sysprep. So unless you can be absolutely sure you won't cause any unforeseen issues it's generally better to follow the recommendations.

However it has since been established and tested quite a few times and the SID is not as important as all that so your procedure will work, and if you utilize it only for testing then you should be fine.

Affected services are:

  1. WSUS
  2. System Center
  3. KMS

If you use any of these 3 utilities, you will get problems from your current approach that you would not get when sysprepping.
These problems normally only affect the newly added machine though, so the answer to:

Does this procedure affect the original server

Is: generally no, it shouldn't.

Keep in mind though, you're avoiding microsoft best practices for an easy fix.
Which generally does not end well, and definitely isn't long-term sustainable.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .