I was under the impression that migrating vCenter to a new host was a difficult and risky process. That is, until I spoke with some nice folks at VMworld who said it was no big deal and only required moving the SQL database. Excited to get rid of 2012, I took on the task of migrating our vCenter on to a new 2012 R2 VM. While I discovered it was more than a simple SQL migration, it was actually pretty easy.
1. Backup your old vCenter files
Make a copy of your “C:\ProgramData\VMware\VMware Virtual Center\SSL” folder.
The installer does a good job of reminding you if you forget.
Make a copy of your “C:\ProgramData\VMware\VMware Update Manager\Data\hostupdate” folder.
Not always necessary, but I had a few offline bundles that I uploaded to VUM and ran into some “unknown errors” scanning hosts after the upgrade because of this.
SSO @vsphere.local accounts
Since I only had six @vsphere.local service accounts and all the passwords were documented, I just re-created these after the migration. Follow the steps documented in KB2057353 if you would like to migrate your SSO accounts.
The VCDB SQL database
VUM and vCenter share the same database in our environment. If you’re unsure how to perform a full SQL backup then check this MSDN article or ask a fellow admin.
Shut down the old vCenter
We retained the same host name and IP address from the old to the new server so the old one must be powered off. Hang on to it until you’re confident you don’t need it anymore.
2. Prepare the new host
Build out the new OS and join the VM to your domain. Install SQL 2012/2014 and prepare your instance.
Restore the VCDB database
Simple procedure documented here.
Create the DSN’s
We’ll need to create two DSN’s. A 64-bit DSN for vCenter, and a 32-bit DSN for VUM.
- Open control panel and type ODBC in the search bar. Click on “Set up ODBC data sources (64-bit).”
- Open the System DSN tab and click Add.
- Select SQL Server Native Client 11.0 (this version is the same for SQL Server 2012 and 2014).
- Our instance name is vCenter. The “.” in the server field just means the instance is local.
- Enter the credentials for your vpxuser account. This was documented when you stood up the original DB, right? If not, launch SQL Server Management Studio and change it. Make sure the password does not contain special characters!
- Accept the default values.
- Click Finish.
- Test your data source and click ok!
- Now we have to create a 32 bit DSN for VUM. No big deal. Repeat the above steps but this time click “Set up ODBC data sources (32-bit).”
Copy the vCenter Certs
- Create a “C:\ProgramData\VMware\VMware VirtualCenter\SSL” Folder and copy the certs you backed up here…
Unfortunately these are not the certs for the web client, but rather used for communication with the hosts.
Install vCenter Server
Server 2012 R2 is supported in vCenter 5.5 update 1, but I installed the latest, update 2.
- Launch the vCenter Installer and perform a simple install. In most cases the defaults are fine.
- When you get to the Database Upgrade Warning select Upgrade existing vCenter Server database.
- If you receive the following error during the install, you will need to make sure your vpxuser SQL account does not contain special/non-alphanumeric characters.
- Complete the vCenter simple install.
Copy the VUM hostupdate files
This is only necessary if you have offline bundles that you uploaded, or plan to change your download sources.
- Simply copy the files you backed up to “C:\ProgramData\VMware\VMware Update Manager\Data\hostupdate\”
Recreate SSO accounts
Since I decided not to back up my SSO files, I recreated my @vsphere.local accounts as well as configuring our AD accounts.
That’s it! You’ve successfully migrated your vCenter!