I don't recommend this method for a couple reasons and suggest that you should build a dedicated development farm that matches the configuration of your production environment. One issue is the cloned machines will retain their system SIDs and it's recommended that a cloned VM be generalized with Sysprep to address this. Also, if your Farm has jobs or processes that effect other systems, for example your Profile Service writing changes to Active Directory, those jobs will attempt to run.
With that said, here are the steps to take if you'd like to still go this route:
On All Servers
- Clone your farm member servers using your hypervisor's built in methods.
- Make sure the virtual adapters on the cloned machines are not connected. This will prevent network IP and NETBIOS name conflicts when they power on.
- Assign the machines new IP addresses but still don't connect the virtual interfaces.
- Rename the host name on each farm member and reboot. This can be done in the System Properties:
On the SQL Server
- On your SQL Server instance, you'll have to change the server name setting. This can be done in Magement studio (SSMS) with the following query:
DECLARE @AddNew NVARCHAR(150) DECLARE @DropOld NVARCHAR(150) SET @DropOld = N'sp_dropserver ''' + @@SERVERNAME + N'''' SET @AddNew = N'sp_addserver ''' + HOST_NAME() + N''', ''local''' exec (@DropOld) exec (@AddNew)
- Restart the SQL Server service to allow the changes to apply.
On the SharePoint Servers
- Run the following PowerShell command:
Rename-SPServer [-Identity] <OriginalServerName> -Name <NewServerName>
Rename-SPServer -Identity "SPWFE01" -Name "DEV-SPWFE01"
- List all of the URLs in your farm with the following PowerShell Command:
- Add any domain accounts, if needed, to the web apps and Central Admin.
Recreate the User Profile Service Application
You probably will have to recreate your UPS application as it will have references to your old server names.
- Go to Central Admin > Manage Service Applications and highlight User Profile Service Application. Then click Delete in the Ribbon.
- Do NOT click the checkbox in the dialog box that pops up. Leaving this unchecked keeps the UPS data.
- Open SQL Server Management Studio (SSMS) and find the three UPS databases. They
are (your full name will vary):
- Delete the SyncDB, as it is only used by SharePoint as a staging area and does not contain useful data.
- Create a new User Profile Service Application and provide the exact names of the Sync and Social databases as they exist in SSMS.
- Once the UPS application is created, add your content search account as an administrator with the permission “Retrieve People Data for Search Crawlers”.
- Restart the UPS Synchronization service.
- In Central Admin go to Manage Services On Server.
- Start the User Profile Synchronization Service.
- Supply all needed information in the prompts.