new1234.jpg
Home > VMware > VMware: Migrate vCenter 4.0 database to new vCenter 4.1 server

VMware: Migrate vCenter 4.0 database to new vCenter 4.1 server

Last weekend I installed a new Windows 2008 R2 Standard server for my new planned vCenter 4.1 server. There are a few ways to migrate your old vCenter database to your new destination.

The reason I want to migrate my old database to my new vCenter server is to keep my datacenter information, cluster configuration: HA/DRS, performance stats, recourse pools and distributed switches.

Why a new server? Because my present vCenter 4.0 server is Windows 2003 R2 32-bit. vCenter Server 4.1 can only be installed on a 64-bit host.

New vCenter Server specs:

Operating System:

Windows Server 2008 R2 Standard + all Windows Updates

Hardware:

– Disk C: – : 30 GB (RAID 10) – OS

– Disk D: – : 40 GB (RAID 10) – SQL + Data

– Disk E: – : 10 GB – Swap

– Memory: 6 GB

Software:

– Microsoft SQL 2005 Enterprise; (Created empty databases: vCenter41 + VUM)

– Veeam Backup Enterprise;

ODBC DSN:

– vCenter41 – 32-bit DSN

– VUM – 64-bit DSN

Network:

– Standalone in workgroup, no domain member or something

VLAN:

– Yes, management VLAN. Can only reach ESX hosts and storage and tape library

Database backup:

Login to your present vCenter 4.0 server, stop the following services:

– VMware VirtualCenter Server

– VMware VirtualCenter Management Webservices

– VMware vCenter Update Manager Service

Mount the new VMware vCenter Server 4.1 and modules disk and copy the Datamigration folder to C:\

Open CMD:

image

Navigate to C:\Datamigration\ and run backup.bat , the script will backup all configuration settings from your recent vCenter installation and database. (Software builds, used ports, database information, server names and VUM Settings/Patches etc.).. once finished all the important data is stored in C:\Datamigration\Data\

If there are any errors while making the backup… check this and fix before you go further!

Now you need to copy the C:\Databasemigration\ folder to your new planned vCenter 4.1 server. You can do this by share, copy this on USB stick or whatever.

Migrate the database and install vCenter 4.1:

– Login to the new vCenter server;

– Mount the new VMware vCenter Server 4.1 and modules

Open CMD:

image

– Navigate to C:\Data migration\ and run install.bat. The script will check if the correct data is present..

If you used a different name for your new vCenter server press Yes.. to continue

Then you must select the vCenter 4.1 and VUM installation source. In my case the mounted ISO has driveletter F:\

image

– The configuration will be validated, correct ports numbers, vCenter serial number etc.. all good..

clip_image005

.. the vCenter setup is started

clip_image006

clip_image007

clip_image008

– I already installed a Microsoft SQL 2005 Enterprise server (local) and created a 32 bit ODBC connection, THEN select “vCenter41” DSN

clip_image009

– If needed, give the correct credentials

clip_image010

– You can modify this later, please check: http://kb.vmware.com/kb/1001046 for more information

clip_image011

clip_image012

– I changed the installation path to D:\Program Files\VMware\Infrastructure\ .. default location is C:\..\.

clip_image013

clip_image014

clip_image015

clip_image016

clip_image017

Oke, the installation was not so difficult. After clicking finish the install.bat will continue with the VMware Update Manager database migration and installation.

VMware Update Manager – Database migration and installation software:

clip_image019

– As you can see “vCenter Server migration installed completed successfully” great 🙂

The install.bat script will continue and check again if the selected VUM ports are available and if the copied data migratable is for the new VUM database location.

clip_image020

– The default installation will start..

clip_image021

clip_image022

clip_image023

image

clip_image025

– For VMware Update Manager you need to create a 64-Bit DSN. You can create this here: C:\WINDOWS\SysWOW64\odbcad32.exe .. oke, thats done.. select the VUM (already created before installation) database.

clip_image026

clip_image027

– You can modify this later, please check: http://kb.vmware.com/kb/1001046 for more information

image

clip_image029

– The installation and patch download location is by default C:\.. I prefer to install this data on a separate disk.. so I changed the installation path to D:\…\..

clip_image030

– Be sure you got enough storage available to store all the updates..

clip_image031

clip_image032

clip_image033

Now you can connect your vCenter server and manage your hosts and VM’s.. sometimes you can’t!

Tip before connect the vCenter:

– Reboot your new vCenter 4.1 server;

– On the ESX host: Restart your management services: service mgmt-vmware restart

– On the ESX host: Use a text editor to view/change the IP address inside the <serverIp>xxx.xxx.xxx.xxx</serverIp> tags the following file:/etc/opt/vmware/vpxa/vpxa.cfg

Finally result:

image

Successful migration of vCenter 4.0 to new 4.1 server

More information:

VMware KB

VMware KB

VMware KB

sanderdaems

Sander Daems is founder and author of this blog and working as a Sr. Infrastructure Consultant by IT-Value. Sander has over 10 years experience in IT, primary focus: virtualization, storage and SBC

More Posts - Website

Follow Me:
TwitterLinkedIn

  1. Mike
    August 30th, 2010  (Quote) at 23:54  (Quote) | #1

    In the initial section describing the “new” vCenter Server specs, under the “ODBC DSN” section, I think you need to swap the locations of 64-bit and 32-bit.

  2. Jérome
    November 17th, 2010  (Quote) at 10:40  (Quote) | #2

    Hello,

    Which version of SQL Server 2005 did you use ? 32bit or 64bit ?

  3. November 17th, 2010  (Quote) at 10:48  (Quote) | #3

    Jérome :

    Hello,

    Which version of SQL Server 2005 did you use ? 32bit or 64bit ?

    Hello Jérome,

    For this environment I used MS SQL Server 2005 Ent. 64-bit

  4. Jérome
    November 17th, 2010  (Quote) at 11:09  (Quote) | #4

    @sanderdaems
    Ok, thank you Sanderdae.

  5. November 17th, 2010  (Quote) at 11:12  (Quote) | #5

    I’ve you have some problems please let me know.. maybe I can help /search for solutions

  6. Jérome
    November 17th, 2010  (Quote) at 11:42  (Quote) | #6

    @sanderdaems

    I have a SQL 2005 32bit from my previous Vcenter (4.0) and i would like to upgrade my Vcenter to 4.1 but i think i can’t with this version of SQL server.

  7. Simon
    November 18th, 2010  (Quote) at 16:50  (Quote) | #7

    Jérome :

    @sanderdaems
    I have a SQL 2005 32bit from my previous Vcenter (4.0) and i would like to upgrade my Vcenter to 4.1 but i think i can’t with this version of SQL server.

    I have the same problem… Only MS SQL Express are supported with the Migration Tool 🙁

    I’m looking to find other solution…

  8. Simon
  9. November 18th, 2010  (Quote) at 19:48  (Quote) | #9

    Simon :

    Jérome :

    @sanderdaems
    I have a SQL 2005 32bit from my previous Vcenter (4.0) and i would like to upgrade my Vcenter to 4.1 but i think i can’t with this version of SQL server.

    I have the same problem… Only MS SQL Express are supported with the Migration Tool :(

    I’m looking to find other solution…

    Thats wierd, I migrated from MS SQL2005 Enterprise to MS SQL2005 Enterprise

    Oke.. but you can also backup and restore to your new SQL server. Maybe I can help you with a remote session?

  10. Simon
    November 18th, 2010  (Quote) at 20:12  (Quote) | #10

    @Sanderdae:

    Hello !

    I do not test the migration tool. But I can see this note @ VMware (that’s why I dot not use the migration tool):

    Note: The Data Migration Tool can only be used to migrate the SQL Express database that comes bundled with vCenter Server. Any other databases, such as Microsoft SQL 2005 Standard Edition are not supported. This information is detailed in the article above.

    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1021635

    So!

  11. Simon
    November 18th, 2010  (Quote) at 20:40  (Quote) | #11

    @Sanderdae:

    also, can you put the older server setting like you put the new server setting ???

  12. Mike_Stewart
    December 3rd, 2010  (Quote) at 15:04  (Quote) | #12

    Thanks,
    Everything went OK in migration.
    Cenario:
    Original -> vCenter 4.0 x86 with an external SQL Database (SQL Server 2008) with two ODBC (vCenter and UM)
    Migration -> vCenter 4.1 x64 with the same external Database (i created two ODBC for x86 and x64 bits).

  13. Amin
    December 5th, 2010  (Quote) at 09:48  (Quote) | #13

    hello.where can i download vCenter 4.1 ? or find any link about that ? i mean with crack or serial number .
    any help would be appreciated .

  14. December 5th, 2010  (Quote) at 17:54  (Quote) | #14

    Amin :

    hello.where can i download vCenter 4.1 ? or find any link about that ? i mean with crack or serial number .
    any help would be appreciated .

    Hello Amin, sorry we don’t provide illegal serials or cracks. You can download VMware products from the original VMware website with a 90 day trial, create a account and download the software you need:

    http://downloads.vmware.com/d/info/datacenter_downloads/vmware_vsphere_4/4

  15. Matt
    February 23rd, 2011  (Quote) at 23:46  (Quote) | #15

    From your screenshots, the DB’s were not backed up and not restored using the datamigration script. It says so right in the screenshots.

    However, to get around this, you can just detach the database and attach it to the new server. It’s that easy. When you get to the Database portion of the install, point it to the database you attached and say YES to upgrade and click you do have a backup. Make sure you have a backup. A copy of the detached files will work.

    Also, you have an error at the top. The Virtual Center DB requires the 64bit DSN and the Update Manager requires the 32bit DSN. You have it opposite.

  16. Steve
    March 1st, 2011  (Quote) at 19:18  (Quote) | #16

    Cheers, good information

  17. Robert
    March 11th, 2011  (Quote) at 17:07  (Quote) | #17

    Hi, Thanks for this guide. Made for a smooth transition for me today. Worked a treat and saved me a big headache. Thanks.

  18. Andy
    April 28th, 2011  (Quote) at 15:34  (Quote) | #18

    A very helpful guide thanks. We already have an operational vcenter 4.1. Can I just migrate the update manager data from our old verstion 4 database and not the vcenter data?

    Just by editing the install file maybe? Or is there a better method?

  19. Mick Russom
    July 19th, 2011  (Quote) at 23:35  (Quote) | #19

    vCenter DB – VIM_VCDB uses a 64-bit System DSN in 4.1

    VUM DB – VIM_UMDB uses a 32-bit System DSN in 4.1.

    This is confusing, but odbcad32 in %SYSTEMROOT%\system32 is a 64 bit program on 64-bit windows.

    odbcad32 in %SYSTEMROOT%\SysWOW64 is a 32 bit program on 64 bit windows.

    WOW means windows on windows, and WOW as always been the name for the layer of windows that emulates the previous windows architecture. (Wow used to emulate 16 bit for 32-bit windows)

    Either architecture can used for the database. (I’ve upgraded 32-bit databases from 2005 express to 2008 r2 express 32 to 2008 r2 enterprise 32 and had no issues using 64 bit windows or 64-bit and 32-bit DSNs with the 32-bit SQL instance). (note its really hard to change a sql instance from 32 to 64 bit for some reason, upgrades and edition upgrade seem painless)

    Shame on VMware for not making vcenter a virtual appliance (The SLES Linux based one sucks in vcenter 5 as it only supports DB2 and oracle db), shame on them for not supporting postgresql, and shame on them for not making the installer smart enough to sure all the issues that leaves all this a mess. VMware is really perfect, but the backoffice stuff is sloppy and a pain, thankfully it works most of the time. Fixing it is a pain.

  20. Gurvinder
    October 25th, 2011  (Quote) at 21:43  (Quote) | #20

    I have to upgrade my database for VMware 4.1, currently it is residing on SQL SERVER 2005
    standard edition and I want to move it to SQL SERVER 2008 R2 Enterprise edition.
    Does anyone have an experience doing this or does anyone know how to do it.
    I dont want to touch VMware but only database.

  21. October 26th, 2011  (Quote) at 09:22  (Quote) | #21

    Gurvinder :

    I have to upgrade my database for VMware 4.1, currently it is residing on SQL SERVER 2005
    standard edition and I want to move it to SQL SERVER 2008 R2 Enterprise edition.
    Does anyone have an experience doing this or does anyone know how to do it.
    I dont want to touch VMware but only database.

    Allways create a backup
    Detach database from SQL2005
    Attach database in SQL2008
    Copy the DB Jobs and import in SQL2008
    Change/recreate the ODBC to new destination

  22. Gurvinder
    October 27th, 2011  (Quote) at 16:46  (Quote) | #22

    @sanderdaems
    Thanks for reply.

    I am planning to do a back up and restore instead of detach and attach, do u see any issues with it.

  23. Amar
    November 8th, 2011  (Quote) at 16:41  (Quote) | #23

    @sanderdaems

    Gurvinder, did you manage to upgrade to the 64bit SQL2008 server?

  24. Amar
    November 8th, 2011  (Quote) at 16:43  (Quote) | #24

    We are looking to migrate from ESX 4.0 on 32bit SQL 2005 to ESXi 4.1 on 64bit SQL 2008. I thought installing a complete new environment would be easy but I can’t see an easy way to migrate VMs from the old enviornment to the new enviroment. if anyone has experience with this then please do share!

    @Sanderdae, thank you for sharing! 🙂

  25. Handby Jeff
    January 30th, 2015  (Quote) at 15:02  (Quote) | #25

    Very nice, used this script multiple times

  1. at | #1
  2. at | #2
  3. at | #3
  4. at | #4
  5. at | #5
  6. at | #6
  7. at | #7