VMware: Migrate vCenter 4.0 database to new vCenter 4.1 server

32

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

About Author

32 thoughts on “VMware: Migrate vCenter 4.0 database to new vCenter 4.1 server

  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 :

    @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…

  3. 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?

  4. @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!

  5. 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).

  6. 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 .

  7. 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

  8. 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.

  9. 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?

  10. 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.

  11. 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.

  12. 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

  13. 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! 🙂

  14. Pingback: Jasper

Leave a Reply

Your email address will not be published. Required fields are marked *