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:
– Windows Server 2008 R2 Standard + all Windows Updates
– Disk C: – : 30 GB (RAID 10) – OS
– Disk D: – : 40 GB (RAID 10) – SQL + Data
– Disk E: – : 10 GB – Swap
– Memory: 6 GB
– Microsoft SQL 2005 Enterprise; (Created empty databases: vCenter41 + VUM)
– Veeam Backup Enterprise;
– vCenter41 – 32-bit DSN
– VUM – 64-bit DSN
– Standalone in workgroup, no domain member or something
– Yes, management VLAN. Can only reach ESX hosts and storage and tape library
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:\
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
– 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:\
– The configuration will be validated, correct ports numbers, vCenter serial number etc.. all good..
.. the vCenter setup is started
– I already installed a Microsoft SQL 2005 Enterprise server (local) and created a 32 bit ODBC connection, THEN select “vCenter41” DSN
– If needed, give the correct credentials
– You can modify this later, please check: http://kb.vmware.com/kb/1001046 for more information
– I changed the installation path to D:\Program Files\VMware\Infrastructure\ .. default location is C:\..\.
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:
– 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.
– The default installation will start..
– 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.
– You can modify this later, please check: http://kb.vmware.com/kb/1001046 for more information
– 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:\…\..
– Be sure you got enough storage available to store all the updates..
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
Successful migration of vCenter 4.0 to new 4.1 server
32 thoughts on “VMware: Migrate vCenter 4.0 database to new vCenter 4.1 server”
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.
Which version of SQL Server 2005 did you use ? 32bit or 64bit ?
For this environment I used MS SQL Server 2005 Ent. 64-bit
Ok, thank you Sanderdae.
I’ve you have some problems please let me know.. maybe I can help /search for solutions
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…
Check this: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=5850444
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?
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.
also, can you put the older server setting like you put the new server setting ???
Everything went OK in migration.
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).
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:
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.
Cheers, good information
Hi, Thanks for this guide. Made for a smooth transition for me today. Worked a treat and saved me a big headache. Thanks.
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?
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.
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
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.
Gurvinder, did you manage to upgrade to the 64bit SQL2008 server?
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! 🙂
Very nice, used this script multiple times