Monday, February 24, 2014

WSUS Migration from Windows Server 2012 to Windows Server 2012 R2

Scenario :
- You have WSUS on Windows Server 2012
- You have an internal database of WSUS
- You want to make the existing hardware or VM free.
- You want to upgrade the WSUS from Windows Server 2012 to Windows Server 2012 R2 without downtime

Steps :

- Install the Windows Server 2012 R2 on New VM or Physical server

- Install Windows Update Service Role on it.

(Refer: http://mizitechinfo.wordpress.com/2013/08/19/step-by-step-installing-configuring-wsus-in-server-2012-r2/ for guidance)

- Shut down the WSUS Services on both Source and Destination Server
 
- On Destination Server, Rename "C:\Windows\WID\Data" to "C:\Windows\WID\Data_Old"

- On Destination Server, Rename "C:\Windows\WID\Log" to "C:\Windows\WID\Log_Old"

- Copy "C:\Windows\WID\Data" of Source server to "C:\Windows\WID\Data" of Destination server

- Copy "C:\Windows\WID\Log" of Source server to "C:\Windows\WID\Log" of Destination server

- As Internal database requires Binary files of Windows Server 2012 R2, we will not touch the folder C:\Windows\WID\Binn

- Copy all the updates from the Source Server to Destination. (You don't know where the updates are stored, please refer below screenshot for reference, for me it is "D:\WSUSUpdateStore")
It may take time as it may be around 83 GB (In my case)

- Major issue I faced in started the services. Then after troubleshooting I came to know that Internal Database requires special permission from a special user group.

- Grant that group(NT SERVICE\MSSQL$MICROSOFT##WID) of local system appropriate permissions(modify) on below mentioned folders :
C:\Windows\WID\Data
C:\Windows\WID\Log









- By this time, your Updates copy must have completed. (If not, please wait to get it completed)

- One more thing to check is that you have appropriate port assigned for WSUS.
In my case, I have changed the default port from 8530 to 80 (You can go through below link of my blog for port change :
http://ininformationtechnologyworld.blogspot.in/2011/08/changing-default-port-of-wsus-server.html

- Once you have changed the port, you need to update new WSUS Server IP address/URL on AD Group Policy.

- Tell Active Directory team about your New URL of WSUS (In my case :  http://WSUS:80)

  1. On the destination server, open a Windows PowerShell session with elevated user rights and run the following script:
    $updateServer = get-wsusserver
    $config = $updateServer.GetConfiguration()
    $config.ServerId = [System.Guid]::NewGuid()
    $config.Save()
  2. As soon as the server identity is changed, run the following command to generate a new encryption key:
    %ProgramFiles%\Update Services\Tools\wsusutil.exe postinstall
- Once it is done. You are ready to Go!!!

- Start the WSUS Application and check all the settings.

- Hollla... Everything is there as it is.

- Congratulations!!!


Please get back to me for any clarification.
http://technet.microsoft.com/en-us/library/hh852349.aspx

Solved : The user profile failed to attach. The process cannot access the file becase it is being used by another process

Issue :  The user profile failed to attach. Please contact Support. Status : 0x0000000B, Message: Cannot open virtual disk Error Code: 0x000...