sábado, 29 de dezembro de 2012

Upgrading SCSM 2012 to SP1

Upgrading my System Center Service Manager 2012 Lab to 2012 SP1

Pre-requisites

Before you start anything, make sure you have at least Service Manager CU2 applied to your installation.

SP1 Preparations

http://technet.microsoft.com/en-us/library/jj900186.aspx
I have used the Microsoft original steps as a reference and added my comments when I found necessary.
--------------------------------------------------------
This topic describes how to prepare your System Center 2012 – Service Manager environment for an upgrade. To do this, perform the following procedures for upgrading the data warehouse management server:
1.List the data warehouse jobs that are running.
2. Disable the data warehouse job schedules.
3. Confirm that the data warehouse jobs have stopped running.
When the data warehouse jobs have completed, start the upgrade of the data warehouse management server.
After the data warehouse has been upgraded, perform the following procedures on the first Service Manager management server:
1. Wait 10 minutes, and then start the upgrade of the Service Manager management server.

Detailed Steps


To list the data warehouse jobs by using Windows PowerShell cmdlets
1.On the computer that hosts the data warehouse management server, click Start , click All Programs , click Microsoft System Center 2012 , and then click Service Manager Shell .
There doesn’t seem to be a Service Manager shell on the DW server. I may have not installed it, it’s been a while and I can’t be sure. However, you can open a regular Powershell console and the steps work.
2.Type the following commands, and then press ENTER after each command:
Set-ExecutionPolicy –force RemoteSigned
cd 'C:\Program Files\Microsoft System Center 2012\Service Manager'
Import-Module .\Microsoft.EnterpriseManagement.Warehouse.Cmdlets.psd1
Get-SCDWJob | ft Name, Status
(I added the “| ft Name, Status”, otherwhise you get a lot of unnecessary information).
3.A list of the data warehouse jobs appears. Use this list in the next procedure, "To disable data warehouse job schedules by using Windows PowerShell cmdlets.”
To disable data warehouse job schedules by using Windows PowerShell cmdlets
1.Type the following commands, and then press ENTER after each command:
Disable-SCDWJobSchedule –JobName Extract_<SCSM_ManagementGroupName>
Disable-SCDWJobSchedule –JobName Extract_DW_< SCSM_ManagementGroupName >
Disable-SCDWJobSchedule –JobName Transform.Common
Disable-SCDWJobSchedule –JobName Load.Common
Disable-SCDWJobSchedule –JobName DWMaintenance
Disable-SCDWJobSchedule –JobName MPSyncJob
Start-SCDWJob –JobName MPSyncJob
 
The last command to start the MPSyncJob will enable the extraction, transformation, and load (ETL) jobs to run to completion. After that, because all the schedules have been disabled, the jobs will stop. To close the Windows PowerShell window, type exit .
To confirm that the data warehouse jobs have stopped running
1.In the Service Manager console, click Data Warehouse .
2.In the Data Warehouse pane, expand Data Warehouse , and then click Data Warehouse Jobs .
3.In the Data Warehouse Jobs pane, observe the Status column for each data warehouse job. When the status for each job is listed as Not Started , proceed to the next procedure to stop the Self-Service Portal. If no Self-Service Portal exists in your environment, you can start the upgrade process in How to Upgrade to System Center 2012 SP1 - Service Manager.


Stopping the service portal
Since I couldn’t find the exact procedure, I assumed that shutting down the server completely could do the trick. We will see.

Data Warehouse Management Server

Use the following procedure to upgrade the data warehouse management server.
*Important
Make sure that you have stopped the data warehouse jobs before you continue. For more information, see How to Prepare Service Manager 2012 for Upgrade to SP1.


To upgrade the data warehouse management server



  1. Log on to the computer that will host the data warehouse management server by using an account that is a member of the Administrators group. This account must also be a local administrator.
  2. On the Service Manager installation media, double-click the Setup.exe to start the Service Manager Setup Wizard.



Here’s what I’ve got:
Now, what is that?!?
Found this article. It may help, but it didn’t seem to be my case:
Ok. Started over. Moved my VM to a better host and restarted the DW Server. It seems to be moving:


  1. On the Microsoft System Center 2012 page, click Upgrade Service Manager data warehouse management server .




  1. On the Prepare for upgrade page, select the two items indicating that you have read the appropriate sections in the System Center 2012 – Service Manager Upgrade Guide, and then click Next .
  2. On the Product registration page, type the appropriate information in the boxes. Read the Microsoft Software License Terms; if applicable, click I have read, understood, and agree with the terms of the license agreement ; and then click Next .
  3. On the System check results page, ensure that the prerequisite check passed or at least passed with warnings, and then click Next .

 
It’s a lab, guys! ;)

 
  1. On the Configure Analysis Service for OLAP cubes page, in the Database server box, type the computer name of the server that will host the SQL Server Analysis Services (SSAS) database, and then press the Tab key. When Default appears in the SQL Server instance box, click Next .
Well, this question didn’t show up for me. Let’s see how it goes.
*Important
If you are installing SSAS on a computer other than the computer that hosts the data warehouse management server and there is a firewall in your environment, you must make sure that the proper firewall ports are opened. For more information, see “Port Assignments for System Center 2012 - Service Manager” in the Planning Guide for System Center 2012 - Service Manager.

 
  1. On the Configure Analysis Services credential page, specify the user name, password, and domain for the account, and then click Test Credentials . After you receive a message saying “The credentials were accepted,” click Next .
  2. On the Help improve System Center page, indicate your preference for participation in the Customer Experience Improvement Program and in Error Reporting. As an option, click Tell me more about the program , and then click Next .
Nope…

 
  1. On the Use Microsoft Update to help keep your computer secure and up-to-date page, indicate your preference for using Microsoft Update to check for Service Manager updates, and then click Next
Nope....

 
  1. On the Configuration Summary page, read the information that is provided, and, if it is accurate, click Install .
  2. On The upgrade was completed successfully page, if you have already backed up the encryption key, clear the Open the Encryption Backup or Restore Wizard check box, and then click Close .
Well, surprisingly fine!
Let see how the Management Server goes:

 

Service Manager Management Server

Use the following procedure to upgrade the Service Manager management server.

To upgrade the Service Manager management server


 
  1. Log on to the computer that will host the Service Manager management server by using an account that is a member of the Administrators group.
  2. On the Service Manager installation media, double-click the Setup.exe to start the Service Manager Setup Wizard.
  3. On the Microsoft System Center 2012 page, click Upgrade Service Manager management server .
  4. On the Prepare for upgrade page, select the two items indicating that you have read the appropriate sections in the Upgrade Guide for System Center 2012 – Service Manager, and then click Next .
  5. On the Product registration page, type the appropriate information in the boxes. Read the Microsoft Software License Terms, and, if applicable, click I have read, understood, and agree with the terms of the license agreement , and then click Next .
  6. On the System check results page, ensure that the prerequisite check passed or at least passed with warnings, and then click Next .
Got this:
I was pretty sure I had this installed earlier, but let’s try to install it again.
Well, I had the 2008 objects but not the 2012 ones. So, point to the setup program!
Rebooted…
I will I could say exactly why it worked now, but there you go!

 
  1. On the Configuration Summary page, read the information that is provided, and, if it is accurate, click Install .
  2. On the The upgrade was completed successfully page, if you have already backed up the encryption key, clear the Open the Encryption Backup or Restore Wizard check box, and then click Close .

 
Success! It works.

Service Manager Console

Use the following procedure to upgrade the Service Manager console, if you have any consoles besides the one on the server.

To upgrade the Service Manager Console


 
  1. Log on to the computer that will host the Service Manager console by using an account that is a member of the Administrators group.
  2. On the Service Manager installation media, double-click the Setup.exe to start the Service Manager Setup Wizard.
  3. On the Microsoft System Center 2012 page, click Upgrade Service Manager console .
  4. On the Prepare for upgrade page, select the two items indicating that you have read the appropriate sections in the Upgrade Guide for System Center 2012 – Service Manager, and then click Next .
  5. On the Product registration page, read the Microsoft Software License Terms, and, if applicable, click I have read, understood, and agree with the terms of the license agreement , and then click Next .
  6. On the System check results page, ensure that the prerequisite check passed or at least passed with warnings, and then click Next .
    1. Make sure you have the SQL Server 2012 Analysis Management Objects installed and the machine is rebooted after you install it, otherwise the setup won’t recognize it.
  7. On the Configuration Summary page, read the information that is provided, and, if it is accurate, click Install .
  8. On The upgrade was completed successfully page, click Close .

Upgrading the Self-Service Portal


Although I couldn’t find an upgrade document from MS right now, I thought it would make sense to upgrade the Self-Service portal as well. Here’s how I did it:
  1. Log on to the computer that will host the Service Manager Self-Service Portal by using an account that is a member of the Administrators group.
  2. On the Service Manager installation media, double-click the Setup.exe to start the Service Manager Setup Wizard.
  3. On the Microsoft System Center 2012 page, click Upgrade Service Manager console .
  4. On the Prepare for upgrade page, select the two items indicating that you have read the appropriate sections in the Upgrade Guide for System Center 2012 – Service Manager, and then click Next .
  5. On the Product registration page, read the Microsoft Software License Terms, and, if applicable, click I have read, understood, and agree with the terms of the license agreement , and then click Next .
  6. On the System check results page, ensure that the prerequisite check passed or at least passed with warnings, and then click Next .
  7. On the Configuration Summary page, read the information that is provided, and, if it is accurate, click Install .



 
  1. On The upgrade was completed successfully page, click Close ..
No big issues with the upgrade!
Hope it helps!


Addendum:
Noticed a few side effects: I've left the machine with unlimited memory (1TB, although I only have 48 on my HV host). After 24 hours, the SC msmdsrv.exe service is taking 15 Gb of memory, although there is basically no activity. It seems to be going up and up, nonstop. Memory leak?

After a reboot and limiting the memory on the machine, it seems things are normal. However, the services failed to start initially. I had to do some exercise in starting the data access and restarting the Management and configuration management services, otherwise the Lfx service would refuse to start properly.







sábado, 22 de dezembro de 2012

Failed RMS promotion

Last week, at a customer site, I needed to promote an MS server to RMS, in order to reuse the old RMS and the main SCOM 2012 server.
It is supposed to be a simple procedure, but, famous last words... (Oh, boy, I'm so glad all that RMS/MS went away with 2012).
The customer had the RMS, 3 MS and 3 gateway servers. The environment, although complex enough, is not being used too heavily, but I still took all the needed precautionary actions: DB backups, MP backups, etc.
 
So, here we go for the actual command:
C:\Program Files\System Center Operations Manager 2007>ManagementServerConfigTool.exe PromoteRMS /DeleteExistingRMS:True
 
Everything going ok, till:
Adjusting DW old RMS: ROOTMANAGEMENTSERVER.domain.tld new RMS: MANAGEMENTSERVER.domain.tld
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index.

Well, after recovering from the shock, I start to check the current state of things.
The old MS (RMS to be ) be shows as being the RMS now. Ok.
Services in the new RMS, not all started. Services at the old RMS, all started. Not good.
Since this environment is not fully operational and not heavily used (and I was not feeling like restoring the DB), I decided to dig a bit more.
So, I first fixed the services. Stopped and the services in the old RMS and started them in the new RMS. Looking good.
Then I noticed the 2 other management servers were grayed out. Not good. Why? They were still trying to talk to the old RMS. I then went straight to the registry and changed some keys (basically looked up the old RMS name). No luck after the restart.. Then I've found up the article on how to change the gateway server primary server and followed the same procedure (http://blogs.technet.com/b/operationsmgr/archive/2009/05/22/opsmgr-2007-how-to-configure-a-gateway-to-communicate-with-a-different-management-server-without-moving-agents.aspx), not exactly expecting it would work, since one would think that an MS would be more complicated than a gateway. Well, it did the trick. After I renamed the Health Service State  the MS went back to green and so did its agents.
The gateways themselves had to be fixed, but that was expected.
After that, I've configured what was left to be configured (Reporting) according to this article and I'm back in business. http://scomskills.com/blog/?p=59
I think that if this was a heavily used (real) production environment, I wouldn't proceed exactly like this, but it was good learning.
Hope it helps,
 
Jose Fehse

terça-feira, 6 de novembro de 2012

SCOM 2012 Extended Agent Info


SCOM 2012 Extended Agent Info - a SCOM 2012 migration companion MP
I don’t know about you, but I have been performing migrations of several SCOM 2007 R2 environments to SCOM 2012 and I could sure use some help. Since I don’t believe in in place migrations, I have decided to do all of them side by side. It has its issues, but I believe the resulting environment is cleaner.

I have started with the excellent post from Andreas Zuckerhut and from there I have developed my own methodology. I first started by automating some processes, like adding and removing management groups from the console: http://scomandplus.blogspot.ca/2012/07/adding-scom-agent-task-to-update.html. I have also added a task on the console to show the Management group info, but I always thought that it could be nicer. Then I decided to get serious, put the kids to sleep and wrote this little piece of SCOM authoring: a management pack that connects both the old and the new SCOM worlds.

A little background: when you do the side-by-side approach, the agents get a double personality disorder: they report to both SCOM MGs and one side doesn’t know about the other. So, during the process, you need to know:

                - Which agent has received the new management group configuration;

                - The agent version (that is available already, but not in the same view)

You’ll also need a tool to remove the old MG info from the console and a view to observe the results.

Say no more! Here it is! That’s what the MP does!

Now for some documentation:

Management Pack Elements

Discovery

It has a discovery, which creates the new extended agent class. It is based on the Windows Computer class and adds two properties:

                - Management Group Info

                                This field shows:  MGName;Primary Server;TCP Port##

                                In case you have more than one MG, it will show something like this:

                                MGName;Primary Server;TCP Port## MGName;Primary Server;TCP Port##

                - AgentVersion

Agent Tasks

We also have now three agent tasks, targeted to the Extended agent class:

                Remove MG info from Agent – it will require an override (the MG name) and will remove the MG info and restart the HealthService service.
Make sure you run the task as a Domain Admin or a local administrator on the server, otherwise the service may stop but may not start back, and you'll have a dead agent. Be careful with DMZ or servers in other domains. This tasks restarts the scom agent after it is finished. I have notes that around 15% of the agents won't start after the restart. This is due the way the agent works, since it is call a restart to itself. That's why I have added a version of the same task that won't restart the agent:
              Remove MG info (No Restart) - same as above, but no agent restart. You can use SC or psexec to restart the agents afterwards.
              Add MG info to agent - it can be used to fix a mistake or from any MP, add a second MG reference.

View

Extended Agents View - > All Agents - where you’ll be able to see the agents and their management group info.

Installation

                To install the MP, simply import the file through the SCOM console. To remove it, simply remove the management pack from the console. Make sure you install it in the NEW environment (2012).

Known issues

                The discovery runs on all windows computers. So, you may want to disable it and override it just for some computers. Another consequence of that is that it will run also on management servers and the script will potentially fail, generating some warnings, which can be safely ignored. The MG shouldn’t be there forever, so, as soon as you remove it, the warnings will disappear.

Download the MP here and please let me know of any problems you face.
 
Thank you! 

 

 

segunda-feira, 10 de setembro de 2012

Syncing only non-disabled users with Service Manager 2012 Active Directory Connector

Syncing only non-disabled users with Service Manager 2012 Active Directory Connector


Today at a customer implementation, we started importing users from AD into the Service Manager 2012 CMDB.
After the first sync, we noticed all users, including disabled ones, were synched.

After some digging, it seems the LDAP query below does the trick:
 
 
Only the enabled users were imported.