Home > SharePoint Administration > Renaming a single-server MOSS Virtual PC

Renaming a single-server MOSS Virtual PC

Background

Virtual PCs are commonly used for SharePoint development, an organisation might create a virtual server environment and allow developers to each have a copy.   In this scenario, SharePoint will typically have been installed and essential services such as Central Administration and Shared Services configured.

 

Each virtal environment will initially have the same computer name which must be changed to prevent problems with resolving the correct server if the virtual servers are added to the network.

 

Unfortunately renaming a SharePoint server is fraught with difficulty.   

 

Renaming a single-server MOSS virtual server

What is presented below is a step-by-step guide to renaming a single-server MOSS farm, with SQL Server on the same computer, which is typical of a developer virtual environment. 

 

Note: before starting this process, ensure that the virtual machine being renamed is not connected to the network, this will prevent inadvertently accessing the wrong Central Administration site.

 

The key is to rename SharePoint before renaming the server: 

  • Start the virtual machine and login
  • Open the Central Administration site for the server
  • On the Operations page, click on the Alternative Access Mappings link and update the link for the Central Administration site to use the new server name
  • Rename the SharePoint server using STSADM.  Open a command window and type:
    • stsadm -o renameserver -newservername <new name> –oldservername <old name>
  • Rename the computer to match.  Right-click on My Computer and select Properties.  Click on the Computer Name tab and then click the Change… button.  Type in the new server name.
  • Reboot when prompted
  • Update the farm administrator credentials.  Open a command window and type:
    • stsadm –o updatefarmcredentials –userlogin <new name>\<farm admin account> –password <password>
  • Reset IIS using the command window by typing:
    • iisreset /noforce
  • Open the Central Administration site:
    • Click on the server name in the Farm Topology
    • Click on the Office SharePoint Server Search link and update the accounts to use new server name
    • Click on the Windows SharePoint Services Help Service and update the accounts to use the new server name
  • Still within Central Administration:
    • Click on the Operation link in the left-hand navigation
    • Click on the Service Accounts link
    • Update the Service Accounts for both of the Shared Services and My Site Windows SharePoint Service Web Applications to use the <new name> in place of <old name>
  • Open the Shared Services Administration site:
    • Click on the Personalization Services permissions link
    • Update the accounts listed to use the <new name> in place of <old name>
  • Check the services on the farm by typing in the following URL: http://<central admin site>/_admin/checkfarmservices.aspx?source=/default.aspx
    • If the Search Service cannot be started, click on the link within the report and ensure that the accounts use the new server name
  • Reset IIS using the Command Window by typing:
    • iisreset /noforce
  • Open the SQL Server Management Studio and connect to the database called <new server>:
    • Expand the server tree to display the contents of the Security > Logins folder
    • Open the properties window for the service account used for the SharePoint Timer Service
    • On the User Mapping tab, ensure that the Map checkbox is ticked for each SQL Server database to which the account requires access (especially the Shared Services databases)
    • Rename each of the service accounts to use the <new name> in place of <old name>; just right-click on the account and select rename 

At this point the virtual machine should be ready for connection to the network.

 

Alternative

An alternative to doing this configuration on a per-machine basis is to create a clonable environment, Paul Horsfall describes just such an approach on his site.

Advertisements
  1. January 9, 2009 at 10:19 pm

    Hi! Great post! Got a question :
    calling the stsadmin with updatefarmcredentials but I got a command line error. My command :
    stsadm.exe -o updatefarmcredentials -userlogin VMWARE-BERTUS\Administrator -password

    but no luck…
    Any ideas?

  2. oidatsmyleg
    March 13, 2009 at 10:45 am

    I’m not sure, but perhaps you could try something other than one of the built-in accounts. Try a domain account if you are on a domain or create a new local account if no domain is available.

  3. jeff
    June 7, 2009 at 12:23 am

    Thanks for the writeup!

    If you *are* doing this to clone an existing VM image… At the step “rename computer to match,” run the http://www.sysinternals.com NewSID with “rename computer” option. Otherwise, you will mess up your existing computer’s account in the domain, creating issues when logging into the domain (with the original VM).

    -j

  4. Chris
    May 25, 2010 at 3:07 pm

    Great article. I have tried this and for the most part, it works flawlessly. I did try the alternative link but it’s dead now. I sure would appreciate knowing where I can get the the article by Paul Horsfall to see if it helps at all. I’m hoping, in the meantime, that you can you clear up a couple things for me though.

    At the point where you update the farm credentials. This never seems to work for me. My VM clone sits on the same network that the orignal farm is located and doesn’t seem to make much difference anyway.

    Then when I click on the server name in the Farm Topology and select the Office SharePoint Server Search link and update the accounts to use new server name, this seems to work okay.
    However, when I click on the Windows SharePoint Services Help Service and update the accounts to use the new server name, it tells me that I can’t do this as the domain administrator is making changes to the system. Why would I be getting this error? Again, this doesn’t seem to cause any problems for me though.

    Where I do get problems is when I then try to change the other AAMs and it still has an affect on the production MOSS farm as well. I’m not sure how I can completely sever any links with the production farm. I have tried to load the VM machine into our development DMZ but I cannot access the Central Administration site anymore. I’ve tried different approaches and neither one seems to work.

  5. oidatsmyleg
    May 25, 2010 at 11:24 pm

    Chris, the article from Paul Horsfall was based upon scripting the build using psconfig and stsadm. It’s not too hard to do this approach and its what I’m doing for all my SharePoint builds.

    Try this link instead for how to do this: http://mindsharpblogs.com/ben/archive/2008/03/08/4411.html

    As for the issues you’re having, have you disconnected the copied VM from the network before making changes? You should be able to reach the Central Admin site using http://localhost:portnumber even in a different domain; or if you’re using host headers then edit the local hosts file to get to the copied VMs Central Admin.

    Sorry but it’s been over a year since I did this last and I can’t replicate copying a standalone VM at the moment. :-/

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: