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

Tuesday, February 11, 2014

How to do P2V Conversion of Windows 2000 Server on VMware

Problem: 
1) Getting error while converting Windows 2000 Server onto VMware ESXi server through the vCenter Converter
2) Tools not supporting to convert Windows 2000 Server OS
3) Conversion gets stuck at XX% and vCenter Converter job gets failed.
4) You are frustrated with the trials and errors with P2V Conversion Process.

Environment:
- Windows 2000 Server on old Scrappy hardware...
- VMware ESXi 5.X

Requirement : 
- vCenter Converter 4.0 ISO (coldclone.iso from VMware-convertercd-4.1.1-206170.zip)
https://feld.me/pub/VMware-convertercd-4.1.1-206170.zip
(Please let me know if link is not working)
- Make sure that you are running an ESXi server with version 5.1 (As ESXi 5.5 will give an error on the conversion)
- Make sure that the Datastore version is VMFS3.

Solution : 
 1) Write ISO to CD/DVD
2) Take downtime of the server.
3) Boot server from that CD/DVD
4) Start Conversion process.
5) Select ESXi 5.1 server and VMFS3 Datastore for destination
6) Wait for the conversion process to get complete.
7) Completed?? Congratulations !!!

Please let me know if you have any query.

Monday, February 3, 2014

Selecting a subset of the vCenter Server inventory to monitor in vCenter Operation Manager

Problem : 
- How to monitor only selected VMs in vCenter Operation Manager
- How to delete not required VMs from the vCenter Operation Manager
- How to reflect License change in the Licensing dashboard when you remove any VM from monitoring
- License count in the VMware Licensing portal does not reflect the actual VM counts which are getting monitor

Resolution : 

1) Make a Separate folder (Home --> Inventory --> VMs and Templates) where those VMs will reside which you want to monitor.

2) Refer VMware KB Article (1036195) for selecting Subset of VMs for monitoring

3) Make sure that when you are applying KB on the Hosts with the help of Point No.6 (Select Propagate to Child Objects.), you UNCHECK THE BOX so that the User does not get access to the not required VMs.

4) Refer VMware KB Article (2020638) for enabling the Removal of VMs from the center Operation Manager

5) Unregister the vCenter Operation Manager with the help of Admin Link and register it again.
https://IPAddressOfOperationManager/admin/
It will show 0 VMs are getting monitored in the Licensing portal of VMware
 
6) Wait for 1 Day  if you have mentioned deletionPeriod = 1 (Refer KB 2020638) to reflect the change in Licensing portal of VMware

Thank you for reading this article
Please feel free to ask any query related to it.

.::[ashX]::.

Wednesday, December 11, 2013

Script for File copy Older than X Days | ROBOCOPY Batch file

Hey All,

Issue :

One more challenge I faced yesterday.
Robocopy batch files which I scheduled were getting failed with error code 0x1

Observation : All robocopy schedules were getting failed with error code 0x1
One more thing I noticed is that the Task manager was showing multiple instances of Robocopy exe.

Task manager gave way to the solution

Solution :

After googling number of forums, I found switch to exit the Robocopy at the end. I added it at the end of command, but it did not work.

It gave error 0x80 :  Quitting : /QUIT Specified on Command Line.

After that I tried one more option. Defining one more line of code and specifying the /QUIT option there.

e.g.
*****************************************************************
@echo off
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a%%b)
robocopy "\\share\source" "D:\Destination" *.xml /MAXAGE:3 /LOG+:"D:\Logs\%mydate%.log" /NP
 

robocopy /QUIT
*****************************************************************
 What does above script does :
  • Copies files which are not older than 3 Days from source to destination
  • Stores the logs Datewise (You can add %mytime% if you want time also)
  • Copies only XML extension (You can specify *.* if you want to copy all files)
Its working fine now.

Hope this helps to you as well.

Tuesday, September 17, 2013

How to install Hyper-V Role on VMware ESXi Virtual Machine

Problem : 
Can not install Hyper-V Role on VMware Virtual Machine

Environment : 
VMware ESXi 5.X

Solution :

1. Go to ESXi Server Shell by using putty or similar utility.

2. Locate file config in /etc/vmware folder
# cat /etc/vmware/config
libdir = "/usr/lib/vmware"
authd.proxy.vim = "vmware-hostd:hostd-vmdb"
authd.proxy.nfc = "vmware-hostd:ha-nfc"
authd.proxy.nfcssl = "vmware-hostd:ha-nfcssl"
authd.proxy.vpxa-nfcssl = "vmware-vpxa:vpxa-nfcssl"
authd.proxy.vpxa-nfc = "vmware-vpxa:vpxa-nfc"
authd.fullpath = "/sbin/authd"
authd.soapServer = "TRUE"
vmauthd.server.alwaysProxy = "TRUE"


3. Add vhv.allow = "TRUE" entry at the end of file using VI utility, it will look like below :
# cat /etc/vmware/config
libdir = "/usr/lib/vmware"
authd.proxy.vim = "vmware-hostd:hostd-vmdb"
authd.proxy.nfc = "vmware-hostd:ha-nfc"
authd.proxy.nfcssl = "vmware-hostd:ha-nfcssl"
authd.proxy.vpxa-nfcssl = "vmware-vpxa:vpxa-nfcssl"
authd.proxy.vpxa-nfc = "vmware-vpxa:vpxa-nfc"
authd.fullpath = "/sbin/authd"
authd.soapServer = "TRUE"
vmauthd.server.alwaysProxy = "TRUE"

vhv.allow = "TRUE"

4. Power off VM, where you want to ENABLE Hyper-V Role.

5. Goto VM folder location and edit its VMX file.
# cd /vmfs/volumes/datastore7.44/WINDOWS8PC2

6. Edit WINDOWS8PC2.vmx file using VI Editor and Change the guestOS = "windown8-64" to  guestOS = "winhyperv"
# vi WINDOWS8PC2.vmx

7. Thats it... You are Done!!! Power ON the VM and you are ready to install the Hyper-V Role on it.

Friday, August 30, 2013

EMCOPY | ERROR (1722) Unable to get the domain SID info from DomainController

Scenario:

While using EMC Utility EMCOPY following errors get encountered.

Errors : 
- ERROR (1722) : Unable to get the domain SID info from DomainController
- ERROR (1722) : Unable to retrieve the primary group of the default user Domain\User from \\DomainController
- ERROR (1727) : Lookup account sid from \\SHARE failed

Resolution :
- Make sure that the Source and the Destination is pingable.
- Make sure that the DNS Server is having both Source and Destination entries.
- If you dont have permission to do the chages on DNS Server, then you can make HOST File entry of source and destination in C:\Windows\System32\Drivers\etc\Hosts file from where you are running the EMCOPY Command.

Thursday, August 29, 2013

Windows Server 2008 R2 always boots in recovery mode

If you are facing below Issues : 
- You faced the Windows Server 2008 R2 Clean boot issue
- Windows Server 2008 R2 starts in recovery mode
- After installing windows updates on Windows server 2008 R2 system goes in recovery mode after reboot
- Safe mode also doesn't work in above case and get stuck at classpnp.sys

Then this is the solution for all above:

1. Boot into Windows Recovery Mode
2. Open Command Prompt
3. Type:

sfc /SCANNOW /OFFBOOTDIR=C:\  /OFFWINDIR=C:\Windows

4. Goto following location :

C:\Windows\winsxs\
 Check out for pending.xml file.
If it is present, then DELETE it.

5. Reboot the system.

6. Select normal boot mode. 

You have done it!

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