none
Windows 2003 computer name keeps reverting

    Question

  • I did a bare metal backup of a Windows 2003 SP2 domain member server and recovered it to a VM for disaster recovery testing, keeping if off the network initially.  I then ran Sysprep on the recovered VM to regenerate the SID, etc.  When the VM comes back up, it runs through the minisetup and asks me to name it.  I give it a unique name.  After the minisetup, the server boots up and I check the computer name and find that it's reverted to the source computer name.  I rename it again, reboot and it still reverts to the source computer name.  I tried a second server that runs the same application and is set up the same way.  I got the same result - the server reverts to the name of the source machine.

    I have used this method before with several other servers and didn't have the same problem, so there must be something about these particular servers that is causing this odd problem.  I'm hoping that someone can give me some clue as to where I should look within Windows to find what's causing this.  There is nothing in the Event Logs at all.

    Thanks.

    Monday, July 19, 2010 9:43 PM

Answers

  • Hi Chas,

    We did some investigation on this issue here this morning, and it looks like the computer name that you're trying to use isn't being saved correctly in the registry.  Unfortunately there's no foolproof way to fix this - it's one of several things that can happen when you try to use sysprep in this way with a production system.  Issues like this are the main reason for our support policy around Sysprep:

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;828287

    The best recommendation we can give you here is to do things differently.  Since you're just trying to create an environment for testing, you could use a tool like disk2vhd to create a VM image of the machine, and then bring it up in an unconnected VM lab environment (along with any other machines that you would need).  This would allow the machines to operate in their original configuration in an isolated test environment.  In a true DR scenario, we would consider the original machines to be permanently offline, so restoring from a backup (perhaps to a "blank"VM) would be the way that we would normally go about things.


    David Beach - Microsoft Online Community Support
    • Marked as answer by ChasBoston Sunday, July 25, 2010 10:52 PM
    Friday, July 23, 2010 2:41 PM

All replies

  • Hi,

     

    Then please run “sysprep -mini -reseal –reboot”.

     

    If the issue persists, you may try to use an unattend file – sysprep.inf when syspreping the system. You can set the computer name in the unattend file to test the result.

     

    Tim Quan

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact tngfb@microsoft.com  

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.  

    Tuesday, July 20, 2010 9:40 AM
    Moderator
  • Thanks for the response.  I used all of those switches in the answer file, and I've left the computer name blank so that it prompts me for a name at minisetup.  It seems that this should work.  Despite that, I'll Sysprep again, this time including the computer name in the answer file as you suggest, to see if it makes any difference, since that should be quick and easy enough.

    Tuesday, July 20, 2010 2:44 PM
  • I placed the desired computer name in the answer file, but it made no difference.  I should mention that after Sysprep when I run the hostname command, it returns the desired computer name, and in the Event Logs, the desired computer name is listed in the Computer column, but in the System properties the source machine name is listed.

    After a reboot, the source machine name shows up everywhere (hostname command, Event Logs, etc.). 

    Also, there is something I missed in the System Event log:                                                 Source: EventLog - "The NetBIOS name and DNS host name of this machine have been changed from <targetservername> to <sourceservername>."

    Tuesday, July 20, 2010 3:27 PM
  • Hi,

     

    Thank you for the reply.

     

    This is a bit odd. I am afraid that that the computer SID was not changed during the sysprep.

     

    Please download PsTools from the following site and extract PsGetSid to the root directory of Drive C.

     

    http://technet.microsoft.com/en-us/sysinternals/bb897417.aspx

     

    Click Start, click Run, type cmd and press Enter. Type the following commands:

     

    cd\

    psgetsid

     

    Write down the SID for your computer.

     

    Then sysprep the computer with the unattend file again.

     

    After syspreping, restarting and logging on the computer, run PsGetSid again. Please check if the SID for your computer changes.

     

    Tim Quan

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact tngfb@microsoft.com  

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.  

    Wednesday, July 21, 2010 6:37 AM
    Moderator
  • Thanks, that seemed like a likely culprit, but the computer does come up with a new SID after running Sysprep.  As I said before it also comes up with a different name until the next reboot.

    I have looked for logon and shutdown scripts as well as Scheduled Tasks that may affect this, but I found nothing.  In the Event Logs, the only thing I see is the entry in the System Log that says the computer name has been changed just after the reboot.

    To recap, there are 3 servers belonging to the vendor that are set up identically to run the same application and they all have Windows 2003 Web with SP2 as the OS.  All 3 of these servers have the computer rename problem.  The vendor has one other server running Windows 2003 Standard with SP2.  That server communicates with the other 3 servers within the context of the application, but this server does not have the same problem.  Once I run Sysprep on it, the computer name changes and it does not revert to the original name.

    I appreciate the help.

     

     

    Thursday, July 22, 2010 3:35 PM
  • Hi Chas,

    We did some investigation on this issue here this morning, and it looks like the computer name that you're trying to use isn't being saved correctly in the registry.  Unfortunately there's no foolproof way to fix this - it's one of several things that can happen when you try to use sysprep in this way with a production system.  Issues like this are the main reason for our support policy around Sysprep:

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;828287

    The best recommendation we can give you here is to do things differently.  Since you're just trying to create an environment for testing, you could use a tool like disk2vhd to create a VM image of the machine, and then bring it up in an unconnected VM lab environment (along with any other machines that you would need).  This would allow the machines to operate in their original configuration in an isolated test environment.  In a true DR scenario, we would consider the original machines to be permanently offline, so restoring from a backup (perhaps to a "blank"VM) would be the way that we would normally go about things.


    David Beach - Microsoft Online Community Support
    • Marked as answer by ChasBoston Sunday, July 25, 2010 10:52 PM
    Friday, July 23, 2010 2:41 PM
  • Thanks.  You have the right idea.  Our DR testing is usually done in an isolated environment with a copy of a production DC, and I told management that this would be much different.  These servers can't be in the isolated environment because there are climate control devices on the production network that need to connect to them via IP.  (We have yet to work out how we will do this in our real DR environment.  I think the plan is to buy duplicates of all the devices or something similar.)

    That said, we also rename the DR test servers in the isolated environment.  (I inherited the proceedure, but I think it's so that nobody confuses the test servers with production ones.)  Normally renaming the servers in the isolated environment is successful and we don't even Sysprep them.  And in the current environment the server with a different configuration than the trouble ones was renamed successfully, so there is just something about these 3 servers that is causing the rename problem, which is consistent with what you are saying - The servers probably aren't clean enough to Sysprep.

    I think we are resigned to leaving things as they are.  I don't believe there is any reason the test servers need to be joined to the domain, NetBIOS is disabled on them and static DNS records have been created using the desired host name.  For this reason, the testing should work I think.  We would like to be able to join them to the domain, but it shouldn't be necessary.

    Cheers

     

     

    Friday, July 23, 2010 8:22 PM