Upgrading and Migrating Virtual Center 4.0 to vCenter 5.0 to a x64Bit platform

I have been planning to put together an article on Upgrading and Moving Virtual Center 4.0 to vCenter 5.0 since a long time and here it goes today.

What we have in Lab?
I have prepared 2 ESX named as ESX4-A and ESX4-B. (we will be upgrading this to ESXi 5 in next article)
Also, I have setup a MS-SQL 2005 Enterprise server on Windows 2003 R2 Enterprise SP2 x86 which  is serving as a separate database server for Virtual Center server. This server is named as SQL2005
A Virtual Center 4.0 server on Windows 2003 R2 Enterprise SP2 x86, named as vcenter4
XP Pro workstation from where virtual center will be managed using vSphere Client.

A SQL2008R2 x64 server on Windows 2008 R2 x64 OS, which will serve as Database server for vCenter 5
A Windows 2008 R2 x64 Server which will host our new vCenter Server 5.0

From XP Client I have connected to Virtual Center server via vSphere Client.
image

On SQL2005 Server, The database is using a SQL User account “VCDBUser” (it is not a local user account)
image
SCRN-CAP-0011
image

On Virtual Center server a 32-Bit ODBC DSN is created to connect to database VC_DB on SQL2005, using VCDBUser account that is created on SQL Server.
image
image
Now, Lets prepare the SQL2008R2 server and install SQL2008 R2 database server. I have also enabled .Net 3.5 feature of windows 2008 R2.
Here is the feature selection page for SQL2008 R2.
SCRN-CAP-0015
Using default instance name.
image
Using system account for all the services that will be installed. (not as per the best practice)
image
Default Collation settings Latin1_General.
image
Used Mixed Mode authentication, as we will be again using SQL user account for database.
image
image
Once the setup is complete, set the memory consumption settings under Server properties / Memory. I set it to use 640MB as I am using only 1GB for this server.
image.

Lets move to vCenter5 server, very 1st we will enable .Net 3.5 feature and Install SQL 2008 R2 Native Client x64 so what we can create a x64 bit DSN to connect to database on SQL2008R2, which is a requirement to connect vCenter to SQL.
image
If you check the ODBC / System DSN and create a new DSN you will not find the Native Client, for that you need to install it.
image
image
image

We will create the ODBC DSN later.
So, we have checked what we have got in hand..

 

Lets Move the Database now!!

At present virtual center database is served by a SQL 2005 server which is on x86 platform. We need to move it on SQL 2008 R2 x64 on x64 platform.

Let us go to SQL2005 server and detach the database.
image
Note: When you try to detach, you will see the Database is still in use. Check the Message column, it says “12 Active Connections”
This means the virtual center server is using the database, hence we need to stop the virtual center services before we move ahead.
image
image
image
Once the database is detached, it will not appear under databases section in left panel.

Now, browse to the location where the database files were located.
The default installation will save the files under C:\program files\Microsoft SQL server\MSSQL.1\MSSQL\Data
From here we need to copy VC_DB.mdf and VC_DB_log.ldf files to SQL 2008 R2 server.
image
On SQL2008R2 server, I copied the files to default location.
image

Open SQL Server Management studio on SQL2008R2 server and Attach the copied database.
image
image
image
As you can see, VC_DB database is attached.
If we check the Users folder we find user “VCDBUser” associated with the database, but it is not available under “Logins” folder.
Delete the User VCDBUser which is associated with database.
I will create the user VCDBUser with same password as I had before.

image
User “VCDBUser” with SQL Authentication and Default database set to VC_DB.
image
image
image
Now, we will create a ODBC DSN on vCenter5 Server.
image
image
Here you can see the Database that is selected by default is showing “VC_DB” coz we have associated the VCDBUser with this database, which is correct.
image
image
We have successfully moved the database from SQL 2005 to SQL2008 R2.


 

Virtual Center Server Configuration Backup

On Virtual Center server (vCenter4) insert vCenter DVD.
Create a directory named “DataMigration” on C Drive.
Browse the DVD and extract the content of datamigration.zip found under D:\datamigration folder.
image
image
Start the Command Prompt with administrator rights and run Backup.bat.
image
If you get the error similar to this, that means the Command Prompt did not start with Full Administrator privilege.
SCRN-CAP-0050
Make sure to Right Click CMD and select Run As… and UNCHECKRun this program with restricted access
SCRN-CAP-0052
Now run Backup.bat again.
image
The backup is created successfully.
image
The Configuration backup is done!.

vCenter Server 5 Installation


Now, Copy DataMigration folder from Virtual Center server to vCenter5 server, put it on C drive.
On vCenter5 Server, run Command Prompt with administrator rights.
Put vCenter 5 DVD.

From CMD go to directory C:\DataMigration and run “Install.bat
image
It will prompt that the name of system is different than the original. type Y to continue.
image
It will prompt to enter the Path for media. Type D:\
image
Installation of vCenter will start.
image
Continue the setup, it will ask for ODBC DSN. Select the DSN from dropdown that we created before.
image
Enter the password for the username VCDBUser
image
Select “Upgrade existing vCenter server database
image
image
In production, you should put the Service Account username and password that you have created for vCenter service.
image
Continue with the setup. This takes time so be patience.
image
image
The Installation will continue with “vCenter Inventory Service”
image
image
image
Upgrade vSphere Client on XP/Win7 workstation using vCenter server 5.0 media.
image
That’s it. Smile.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s