Here's some steps I documented...
How can I migrate my VirtualCenter database from MSDE to SQL server?
This has only been tested on SQL 2000 but should work OK on SQL 2005.
Shutdown the VirtualCenter Server so it disconnects from the SQL database.
At a CMD prompt type osql E D prompt type the following, use master closes the connection to the vcdb so it can be detached, go executes the previous SQL statements.
o Use master
o Exec sp_detach_db vcdb
Copy the two database files (vcdb.mdf and vcdb.ldf) to the destination SQL server data directory.
Load SQL Enterprise Manager on the destination database server.
Select Security and then right click on Logins and select New Login. In this example we are using vpxadmin as the SQL user account.
On the General tab specify the username, if using SQL authentication make sure the password also matches and click OK.
Right click on Databases and select All Tasks and then Attach Database
Browse to the directory that you copied the database and log files to and select the MDF file for VC, select vpxadmin as the owner and click OK.
Select Security and Logins, right-click on the vpxadmin user and select Properties.
Change the Default Database from Master to VCDB
On the VC Server, edit the existing ODBC connection for VC under the System DSN tab. Change the Server from MSDE to the appropriate SQL Server and click Next.
Select the appropriate authentication method, if using SQL authentication enter the username/password that you created in the Security step above and click Next.
Click Next again, the default database should already be VCDB, click Finish and thats it.
Click the Test Datasource button to verify that it works and then OK.
On the VC server, run the VC installation program, click Next at the Welcome screen and then select Repair and click Next.
Select Use an existing database server and click Next, enter the SQL db username and password and click Next
At the Overwrite Data message select NO
At the License Server screen select the appropriate option (usually use an existing license server) and click Next
Enter the appropriate license server address (usually 27000@localhost) and click Next
Enter the appropriate port information (usually the default is fine) and click Next
Enter the appropriate Apache web server port (usually 8086) and click Next then click the Install button
Start the VC server and that should be it. If the VC Server fails to start check the log files localed in C:\Windows\Temp\VPX for the reason why.
SQL 2005 support - http://kb.vmware.com/kb/6565318
SQL 2005 support - http://www.vmware.com/community/thread.jspa?threadID=75222
Fyi if you find this post helpful, please award points using the Helpful/Correct buttons.
Visit my website: http://vmware-land.com
Is is a complete migration steps or just some steps you remember of your head. Will my hosts and VMs still running if I disconnect my virtual center database server?
Is there a guide to this migration procedure anywhere? Thank you for very helpful information.
I documented each step as I completed it. This will not effect your VM's or ESX hosts. The only features that will not work without VirtualCenter are Vmotion and DRS.
I also used this KB article to help me...
Thank you for your replied, I'll try this tomorrow and hopefully it works out well for me. Thanks to you and best wish. I'm kinda new to VMware!
1 person found this helpful
No problem, good luck with it.
fyi...don't forget to award points for helpful answers using the Helpful/Correct buttons...thanks
This worked great for me. Thanks for the detailed info.
Steps worked great, thanks.
If you move from MSDE to a SQL server because of the transaction logs filling up, be sure to bump up the space allotted to them or you will continue to have the same problem.
Goes without saying probably, but there it is anyway.
Shutdown the VirtualCenter Server so it disconnects from the SQL database. (is this shutdown the VC server or services)?
At a CMD prompt type -osql -E -D <ODBC datasource name>ie. -osql -E -D VMware VirtualCenter. This will load the osql command line SQL client for MSDE, login using the local trusted connection and connect using the VC ODBC data source. (is this perform on MSDE server or new SQL 2005 server)?
(is this perform on MSDE server or new SQL 2005 server)?
At the 1> prompt type the following, use master closes the connection to the vcdb so it can be detached, go executes the previous SQL statements.
Exec sp_detach_db vcdb
Didn't seems to make it work because the command -osql I've entered didn't do anything.
Look at your ODBC Data Sources, is yours named "VMware VirtualCenter"
You are doing a migration of an MSDE database on a remote SQL Database Server. If the MSDE is on the Virtual Center Server then you cannot shutdown the VC. Make sense?