Reconfiguring Factory Shipped CMS

advertisement
White paper
Reconfiguring Factory
Shipped CMS
White paper | Reconfiguring Factory Shipped CMS
Table of contents
CMS reconfiguration scripts: Overview ......................................................................................... 3
Goal ................................................................................................................................................... 3
CMS-Reconfig.ps1 ........................................................................................................................... 3
Scope ................................................................................................................................................ 3
Pre-requisites .................................................................................................................................. 3
Manual Steps Needed .................................................................................................................... 3
HostName-IP-Change.ps1 ............................................................................................................. 3
Scope ................................................................................................................................................ 3
Pre-requisites .................................................................................................................................. 3
Automated Steps ............................................................................................................................ 4
Manual Steps Needed .................................................................................................................... 4
Local-Acct-CMSreconfig.ps1 ......................................................................................................... 4
Scope ................................................................................................................................................ 4
Pre-requisites .................................................................................................................................. 4
Automated Steps ............................................................................................................................ 4
Manual Steps Needed .................................................................................................................... 4
Pwd-Change-CMSreconfig.ps1 ..................................................................................................... 5
Scope ................................................................................................................................................ 5
Pre-requisites .................................................................................................................................. 5
Automated Steps ............................................................................................................................ 5
Manual Steps Needed .................................................................................................................... 5
Domain-Acct-CMSreconfig.ps1 ..................................................................................................... 5
Scope ................................................................................................................................................ 5
Pre-requisites .................................................................................................................................. 5
Automated Steps ............................................................................................................................ 5
Manual Steps Needed .................................................................................................................... 6
DB-Change-CMSreconfig.ps1 ........................................................................................................ 6
Scope ................................................................................................................................................ 6
Pre-requisites .................................................................................................................................. 6
Automated Steps ............................................................................................................................ 6
Manual Steps Needed .................................................................................................................... 6
Appendix A: Editing PXE Boot Images ......................................................................................... 7
2 | April 16, 2013
White paper | Reconfiguring Factory Shipped CMS
CMS reconfiguration scripts: Overview
This document describes the CMS (central management server) reconfiguration scripts that are
used to reconfigure the factory shipped CMS. It describes the goal, scope, pre-requisites, usage,
and CMS reconfiguration steps.
Note
The scripts are written specific to achieve
the goal and therefore must not be
executed on an in-production CMS. These
scripts must not be executed more than
once on a CMS, where you perform the
reconfiguration.
Goal
The goal of the scripts is to take an initial standard, self-contained (local RDP and SQL server)
server installation and to customize the CMS for its ultimate environment.
The scripts cover the reconfiguration use cases and use case combinations. The use case
combinations should be executed in the following order:
1.
2.
3.
4.
5.
6.
7.
Change the hostname/IP addresses
Change the local service account (user name and password)
Change the local service account password
Change the hostname/IP – Change the local service account password
Change the hostname/IP – Change the local service account (user name and password)
Change the hostname/IP – Change to a domain service account
Change the hostname/IP – Move the databases to remote SQL server (this
includes/requires changing to a domain service account)
CMS-Reconfig.ps1
Scope
The CMS-Reconfig.ps1 script is the main wrapper script for executing the CMS reconfiguration use
cases addressed in the other scripts.
Note
The CMS-Reconfig.ps1 is the only script
that must be executed by the user.
Pre-requisites
Ensure that the local or domain username/hostname does not contain the character $.
Automated Steps
1. Ensures that all reconfiguration scripts are present in the directory
2. Backs up all existing configuration files
3. Presents a menu of reconfiguration choices to the user
4. Executes the appropriate reconfiguration script based on the user’s choice
Manual Steps Needed
None
HostName-IP-Change.ps1
Scope
The HostName-IP-Change.ps1 script is used only for the initial reconfiguration, as it depends on
the values in the software-settings.xml file.
Pre-requisites

New CMS host name must be manually set

New IPs must be configured
o Primary Management interface IP address
o RDP interface IP address

If applicable, the CMS must be joined to the domain

User must be logged in as initial installation account

Federated mode must be disabled for non-domain installation.

The local or domain username/hostname must not contain the character $
3 | April 16, 2013
White paper | Reconfiguring Factory Shipped CMS
Automated Steps
1. Retrieves the old host name from SQL server – “select @@servername”
2. Retrieves the old CMSip and RDPip from the software-settings.xml file
3. Retrieves the list of current IPs assigned to CMS
4. Prompts the user to select the current IPs for RDP interface.
5. Makes the following configuration changes for RDP
a. Name and IP changes in RDP configuration files
b. ODBC entry for eXpress database
c. Mxnodesecurity entry for dsc_rdp protocol
6. Executes the mxreconfig sqlredirect command
7. Executes the mxreconfig relocateUnusedCMS
8. Changes the host name in SQL server
Manual Steps Needed
1. Re-start the SQLServer database service.
2. Run the following command in Windows PowerShell:
a. SQLCMD.EXE –Q “SELECT SUSER_SNAME(OWNER_SID) from sys.databases”
b. If the query result does not have the new host name as part of the DB owner
name, then execute the following command, else go to step 3
c. SQLCMD.EXE –Q “ALTER LOGIN [OldHostName\USER] with name =
[NewHostname\USER]”
3. Edit and regenerate the PXE boot images for RDP.
Local-Acct-CMSreconfig.ps1
Scope
The Local-Acct-CMSreconfig.ps1 script is used only for the initial reconfiguration, as it depends on
the values in the software-settings.xml file.
Pre-requisites

Host name/IP change must be completed (if applicable).

User must be logged in as initial installation account

The local or domain username/hostname must not contain the character $
Automated Steps
1. Prompts the user for new local account credentials
2. Creates the new local account
3. Adds the new account to administrators and HPIO administrator’s group
4. Launches the OO administrator via Internet Explorer to change OO administrator
password
5. Adds the new account logon to SQL -server as dbo for ID databases
6. Changes the service accounts of the new user
7. Updates the RDP configuration files
8. Executes the mxreconfig sqlredirect command for the new user
mxreconfig -m sqlredirect -s $cmsName -b $db -a $fullName -p 1433 -v >> $env:logfile
2>&1
9. Updates the mxnodesecurity entry for the dsc_rdp protocol
Manual Steps Needed
1. Edit and regenerate the PXE boot images for RDP.
2. Verify if all the services are up and running. If not, restart the database services.
4 | April 16, 2013
White paper | Reconfiguring Factory Shipped CMS
Pwd-Change-CMSreconfig.ps1
Scope
The Pwd-Change-CMSreconfig.ps1 script is used to change the initial installer account password.
This script is used only for the initial reconfiguration, as it depends on the values in the softwaresettings.xml file.
Pre-requisites

Host name/IP change must be completed (if applicable).

User must be logged in as initial installation account
Automated Steps
1. Launches the OO administrator via Internet Explorer to change OO administrator
password
2. Prompts the user for new password
3. Changes the user’s password in Windows
4. Changes the password on the service account
5. Executes the mxreconfig –m password
6. Updates the mxnodesecurity entry for the dsc_rdp protocol with new password
7. Reboots the CMS
Manual Steps Needed
1. Edit and regenerate the PXE boot images for RDP.
Domain-Acct-CMSreconfig.ps1
Scope
The Domain-Acct-CMSreconfig.ps1 script is used only for the initial reconfiguration, as it depends
on the values in the software-settings.xml file.
Pre-requisites

CMS must be joined to the domain.

New user account must be created on the domain.

Host name/IP change must be completed.

User must be logged in with a domain account with local administrator privileges.

The local or domain username/hostname must not contain the character $.

SQL service must be manually started if they are not up and running just after the
reboot.
Automated Steps
1. Checks that the logged in user is a domain account with local administrator rights
2. Prompts the user for the new domain account credentials
3. Validates to ensure that the credentials exist in the domain
4. Adds the new account to the local administrators and HPIO administrators group
5. Reboots and auto login set for original installer account
6. Adds the new login to HPSIM (script copies current account settings)
7. Launches OO administrator via Internet Explorer to change OO administrator password
8. Sets the new account and password on the CMS services
9. Updates the RDP configuration files
10. Sets the mxnodesecurity for dsc_rdp protocol
11. Adds the domain account logon to local SQL server as system administrator
12. Checks if scripts are called in conjunction with the DB-Change script
a. If YES, Launch DB-Change-CMSreconfig.ps1
b. If NO, the script does the following:
i. Execute mxreconfig sqlredirect command
ii. Update IO and OO configuration files
5 | April 16, 2013
White paper | Reconfiguring Factory Shipped CMS
Manual Steps Needed
1. Edit and regenerate the PXE boot images for RDP.
DB-Change-CMSreconfig.ps1
Scope
The DB-change-CMSreconfig.ps1 script is executed from within the Domain Acct change script. If
the databases are to be moved the DB change option must be executed from the CMS-reconfig
wrapper script which includes the Domain Acct change.
Pre-requisites

CMS must be joined to the domain

New user account must be created on the domain

SQL server exists in the same or trusted domain as CMS

The CMS resolves the DNS name of the remote SQL Server

New user account must be added to remote SQL-Server

Host name/IP change must be been completed (if applicable).

User must be logged in with a domain account with local administrator’s privileges

Execute the below command in PowerShell from the directory where DB-ChangeCMSreconfig.ps1 script is present before you execute option-5
(Get-Content DB-Change-CMSreconfig.ps1) | ForEach-Object { $_ -replace
[Regex]::Escape('$newDBUser = $shortName + "\\" + $domain'), '$newDBUser = $domain
+ "\\" + $shortName' } | Set-Content DB-Change-CMSreconfig.ps1
Automated Steps
1. Executes the first 12 steps of the Domain-Acc-CMSreconfig script
2. Prompts the user for the remote SQL Server parameters
3. Verifies the connectivity to the remote SQL Server
4. Stops the CMS services
5. Updates the database parameters in the RDP configuration files.
6. Updates the ODBC connections
7. Detaches the databases from the local SQL server on the CMS
8. Outputs the data file path and filenames to a .txt document
9. Presents the text document to the user.
10. Opens an Explorer window to view the data files
11. Pauses for manual move of databases
12. MANUAL STEPS FOR DATABASE MOVE
a. Copy the database data and log files to the remote SQL Server
b. Attach the databases on the remote SQL Server
c. Map the domain user account to dbo of the CMS databases
13. Attempts a connection to each moved database and outputs results to log
14. Executes the mxreconfig sqlredirect command
15. Do not re-start the SIM services after sqlredirect. Select N when it asks for re-starting
the services.
16. Updates the IO and OO configuration files for the remote databases
Manual Steps Needed
1. Edit and regenerate the PXE boot images for RDP.
2. Reboot the CMS.
6 | April 16, 2013
White paper | Reconfiguring Factory Shipped CMS
Appendix A: Editing PXE Boot Images
Step 1: Launch the PXE Configuration Utility from the Insight Server Deployment console.
Step 2: Choose the boot option (Linux or WinPE) and click Edit.
7 | April 16, 2013
White paper | Reconfiguring Factory Shipped CMS
Step 3: Click Edit Boot Image.
Step 4: Select Edit button from the Boot Disk Creator window and follow the wizard to change IP
and/or user parameters.
8 | April 16, 2013
White paper | Reconfiguring Factory Shipped CMS
Learn more at
http://www.hp.com/go/insightmanagement/sim/docs
Sign up for updates
hp.com/go/getupdated
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for HP products
and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional
warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.
733675-001, April 2013
Download