VMware Cloud Community
gparker
Enthusiast
Enthusiast

How to migrate a vCenter 4.1 server and database to a new vCenter 5.5 machine

Hi all,

I've just completed a vCenter v4.1 to v5.5 upgrade where I had to migrate the vCenter 4.1 server and its database to a new vCenter 5.5 machine. My customer wanted to retire their existing vCenter v4.1 server because it's end-of-life and doesn't have the sufficient CPU/RAM/Storage requirements that vCenter 5.5 demands, but wanted to keep all the config settings and historical performance stats that are held in the VC SQL-Express database. Here's how I did it. Please don't hesitate to make comment on my procedure:-

The following VMware KB articles were referenced for this procedure. I have customized them for this procedure. Please refer to them for full details:-

KB5850444, KB1029864, KB1029864.

1. Install a 64-bit Windows OS on a new vCenter server. Lets call this new server "vc5" and let's call the current vCenter 4.1 server "vc4". Make sure that the hostname/ip address of vc5 is properly registered in DNS - forward and reverse pointer records created and work successfully.

2. On vc4, use SQL Management Studio Express to take a backup of the vCenter database. It is desirable to shutdown the vCenter services beforehand and keep them disabled.

3. Install the SQL-2008-R2-Express software from the "redist" folder on the vCenter 5.5 DVD onto vc5. Also download and install the relevant version of SQL Management Studio Express.

4. On vc5, launch SQL Management Studio, create a "fictitious" vCenter database of the same name as the  VC 4.1 database, right-click it and restore the backup.

5. On vc5, create a 64-bit ODBC DSN using the SQL Native Client v10 driver pointing to the restored vCenter database that's still in "vCenter 4.1 format". Ensure ODBC connectivity tests are successful.

6. If the Windows OS version on vc5 and vc4 are the same, the ADAM database must also be migrated to vc5 by first backing it up as follows:-

  1. Click Start, right-click Command Prompt, then click Run as administrator to open a command prompt.
  2. Run the command: dsdbutil
  3. At the dsdbutil: prompt, run the command: activate instance VMwareVCMSDS
  4. Run this command to open the ifm prompt: ifm
  5. At the ifm: prompt, run this command for the type of installation media that you want to create: create full location

For example: create full C:\Backup\VMwareVCMSDS

You see output similar to:
ifm: create full C:\Backup\VMwareVCMSDS Creating snapshot... Snapshot set {93758b0e-0b5f-4969-a3ae-c3672b659e08} generated successfully. Snapshot {d3257ca1-cb91-4535-82c0-8aa38bc0b566} mounted as C:\$SNAP_201010251019 _VOLUMEC$\ Initiating DEFRAGMENTATION mode... Source Database: C:\$SNAP_201010251019_VOLUMEC$\Program Files\VMware\Infras tructure\VirtualCenter Server\VMwareVCMSDS\adamntds.dit Target Database: c:\Backup\VMwareVCMSDS\adamntds.dit

Defragmentation Status (% complete)0 1020 30 40 50 60 70 80 90 100|----|----|----|----|----|----|----|----|----|----|...................................................Snapshot {d3257ca1-cb91-4535-82c0-8aa38bc0b566} unmounted.IFM media created successfully in C:\Backup\VMwareVCMSDS

     6. Exit dsdbutil:

     7.At the ifm: prompt, type quit, then press Enter.

     8. At the dsdbutil: prompt, type quit, then press Enter.

7. On vc5, stop and restart the vCenter SQL Database service, then insert the vCenter 5.5 DVD and get it to do a fresh install. Do not select the Simple Install option. Install each component one at a time. When the vCenter Server component installation gets to the database part, you tell it to use the DSN created in step 5 and it will detect that it's a vCenter 4.1 database and prompt you to upgrade it.

8. If the Windows OS version on vc5 and vc4 are the same, the ADAM database must be restored as follows:-

  1. Stop these services in this order
    VMware VirtualCenter Management Webservices
    VMware VirtualCenter Server
    VMwareVCMSDS
  2. Backup the files in the folder that contains the instance data files to an alternate location. By default, the database and log files are located at %ProgramFiles%\VMware\Infrastructure\VirtualCenter Server\VMwareVCMSDS.
    Note: In Windows 2008/2008 R2, the default path is: C:\%ProgramData%\VMware\VMware VirtualCenter\VMwareVCMSDS.

     3. Run this command to copy the ADAM backup that was created using dsdbutil.exe in step 6 to the folder that contained the original ADAM database and log files:

Note: In vSphere 5.1 and vSphere 5.5, the VMwareVCMSDS folder is located:
xcopy /os backup_location\adamntds.dit "%ProgramData%\VMware\VMware VirtualCenter\VMwareVCMSDS"

Where backup_location is the folder path within which the ADAM database was backed up. For example:
xcopy /os C:\Backup\VMwareVCMSDS\adamntds.dit "c:\Program Files\VMware\Infrastructure\VirtualCenter Server\VMwareVCMSDS"

     4. Start these services in this order:

          VMware VirtualCenter Server

          VMwareVCMSDS

          VMware VirtualCenter Management Webservices

9. Check the /etc/hosts files on the ESXi servers and remove any references to vc4 if they exist. Check that the ESXi servers can ping vc5 by name and IP.

10. Using the vSphere 5.5 client, login to vCenter on vc5 as Administrator@vsphere.local. Re-connect the ESXi hosts and monitor that the new vCenter agents and HA agents get installed successfully.

11. Goto vCenter Server Settings and select Runtime Settings. Replace the hostname of vc4 with vc5 and put vc5's IP address as the Managed Server.

12. Still in vCenter Server Settings, select Advanced Settings and carefully change all URL entries to point to the new vc5 server's name.

13. Reboot vc5. Login to vCenter using the vSphere Client and from the Home screen, select vCenter Service Status. Check that all services have big green ticks. If there are any red crosses:-

Follow the instructions in VMware KB 2006132 and NOTE in step 6, replace "cleanup.bat com.vmware.converter" with "cleanup.bat com.vmware.xxxxx", where xxxxx is the name of the service with the red cross.

6 Replies
vThinkBeyondVM
VMware Employee
VMware Employee

Thanks a lot for such detailed steps. It is going to help others on community from your experience.


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

Reply
0 Kudos
gparker
Enthusiast
Enthusiast

My pleasure. I look forward to others trying this procedure and providing their feedback.

George.

Reply
0 Kudos
King_Robert
Hot Shot
Hot Shot

vCenter Server has inter-dependencies with other services. Care must be taken to not break any of these inter-dependencies. As with any major change in your infrastructure, good backups are essential in providing smooth, limited downtime changes.

To move your vCenter Server and SQL database:


  1. Verify and ensure that the Lockdown mode is disabled on hosts. To verify this, navigate to Host > Configuration > Security Profile > LockDown Mode.

  2. Shutdown the VMware VirtualCenter Server service.

  3. Take a backup of the SQL database.

  4. If the SQL database is also being moved, create a second instance of your database and use the vendor's tools to migrate the data.

    Note:
    If you are using an Oracle database, create a second instance of your database and migrate the Oracle database schema, vpxadmin. For more information regarding migrating oracle databases, contact your software vendor.

  5. If you are migrating a vCenter Server 4.x/5.x database, you must also migrate the ADAM database. You can migrate this database if the Windows versions in the source and the destination is the same. If not, vCenter might not operate properly and/or the client might fail during connection.

  6. Create the appropriate System DSN connections on the new vCenter Server host.

  7. If the new VirtualCenter server uses the same hostname and IP address, the SSL certificates can be copied to the new server to eliminate the need to reconnect the ESXi/ESX hosts.
To copy the VirtualCenter Server SSL certificates:
  1. Create the this folder structure on the new server:
C:\ProgramData\VMware\VirtualCenter Server\SSL
    1. Copy the the these files from the original VirtualCenter server to the new server, preserving the folder structure:
      • C:\ProgramData\VMware\VMware VirtualCenter Server\SSL\rui.key
      • C:\ProgramData\VMware\VMware VirtualCenter Server\SSL\rui.pfx
      • C:\ProgramData\VMware\VMware VirtualCenter Server\SSL\rui.crt
  1. Begin the installation of the vCenter Server software on the new server. If you are installing vCenter Server in a virtual machine, see the vCenter Server and the vSphere Client Hardware Requirements section of the ESXi Installable and vCenter Server Setup Guide and Technical Resource Center for guidelines to deploy vCenter Server in a virtual machine, including sizing, installation, functionality, and configuration of VMware High Availability (HA).

  2. When prompted, select Use existing database, and provide the correct credentials to that database.

  3. When prompted, select to not re-initialize the database to preserve all of your inventory data.

  4. Reboot the machine after the installation completes.

  5. When you first start the vCenter Server Client, it may ask for licenses. Configure the licenses as you had previously in your environment. For more information about licensing for ESX hosts, see the Installation Guide for your version of ESX. For more information about licensing for ESXi hosts, see the Setup Guide for your version of ESXi. You are now able to see the same settings and configuration details.

  6. If the IP address of the new vCenter Server has changed, your ESX hosts must be made aware of that change, otherwise the ESX hosts will continue to send their heartbeats to the original IP address of vCenter Server and appear as Not Responding or Disconnected.

  7. Confirm that your SQL Agent rollup jobs are present. Detaching/attaching, importing, or restoring a database to a newer SQL server does not recreate these jobs. If these jobs are not present, there are problems viewing performance data and the database begins increasing in size.

  8. If vCenter Server is moved to another server with a fresh installation, the SSL certificates change and the ESX hosts show as disconnected within vSphere Client connected to vCenter Server. Right-click the disconnected hosts, click Connect, provide the root login credentials, and follow the prompts.
Reply
0 Kudos
gparker
Enthusiast
Enthusiast

Hi Robert,

What you wrote sounds very much like one of the four VMware KB articles that I made reference to in my post. As I mentioned at the top of my post, my procedure is heavily based on a number of VMware KBs I used. I collated all the important things from the KBs in putting together my step-by-step guide. I recommend anyone wanting to follow my guide to read all KBs I made references to and then follow my guide. My guide includes tips & tricks that are not mentioned in the KBs. For example, my step No 7 says "On vc5, stop and restart the vCenter SQL Database service, then insert the vCenter 5.5 DVD and get it to do a fresh install. Do not select the Simple Install option. Install each component one at a time..". This tip isn't mentioned in any of the KBs. Also, my steps 11 to 13 aren't mentioned in any of the VMware KBs.

Many thanks,

George.

Reply
0 Kudos
VRBitman
Hot Shot
Hot Shot

Hi gparker,

I just found your thread by random chance.

Very useful information, thank you for your informative post.

-- VR Bitman | http://virtualis.info | vSphere 5.5 Guide: http://goo.gl/QUqTH7 VMware professional, virtualization & FOSS evangelist, informatician, geek VCA-Cloud, VCA-WM, VCA-DCV, VCP-DCV
Reply
0 Kudos
gparker
Enthusiast
Enthusiast

My pleasure Smiley Happy

Please provide any feedback, I'm happy to tweak my procedure.

Reply
0 Kudos