I had an interesting problem to work last week and wanted to share the knowledge here with you. My problem was to move the database for a VMM Server (Virtual Machine Manager) database from SQL Express to a remotely hosted SQL. As always, there are many ways to do this and after doing some research I picked the one that looked like it was the easiest with not much work. Being efficient is important for anyone working in information technology. And if you are using Hyper-V in your web hosting environment, this might come in handy.
To move the database you need to stop the SQL services on the existing VMM SQL Server. Grab and copy (not move) the database file and the log file for “VirtualManagerDB” – which is the default database name for Virtual Machine Manager. Attach the database on the new SQL Server and make sure that the database has an owner associated with it. Preferably this should be SA as having no owner or an owner that is not related to the VMM server could cause issues.
Now stop the VMM service (Virtual Machine Manager Service) in preparation of changing the SQL connection. Changing the SQL server information needs to be done through the registry as there is no ODBC connection. You can find the SQL connection information here:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Settings\Sql]
“CreateNewInstance”=dword:00000000
“OnRemoteServer”=dword:00000000
“InstanceName”=”MICROSOFT$VMM$”
“DatabaseName”=”VirtualManagerDB”
“ConnectionString”=”Integrated Security=SSPI;Application Name=SCVMM;Max Pool Size=500;Encrypt=true;TrustServerCertificate=true;Server=(local)\\MICROSOFT$VMM$;database=VirtualManagerDB”
Now, the remote connection looks a little bit different as it requires some additional settings to be configured.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Settings\Sql]
“CreateNewInstance”=dword:00000000
“OnRemoteServer”=dword:00000001
“InstanceName”=”"
“DatabaseName”=”VirtualManagerDB”
“ConnectionString”=”Integrated Security=SSPI;Application Name=SCVMM;Max Pool Size=500;Encrypt=true;TrustServerCertificate=true;Server=sqlhost.domain.com;database=VirtualManagerDB”
“MachineName”=”sqlhost.domain.com”
“MachineFQDN”=”sqlhost.domain.com”
Update the registry with the new information and then restart the VMM service on your Virtual Machine Manager server. Connect to the VMM as always and under normal circumstances your database connection should be working just fine. As mentioned, if your connection does not come up, check the DB ownership and set it to SA.
Microsoft has posted instructions on how to move the VMM database as well, but I found those to be too time consuming and making life way too complicated. However, if the steps above are not working for you, check out Microsoft’s instructions here. Also, very important – if you ever have to uninstall VMM and you need to keep your data, make sure to use the retain data option during the uninstall process. That way you can point back to your existing database when re-installing the Virtual Machine Manager application.
Related posts:
- How to move a large forum from Server A to Server B?
- How to move a SSL Certificate from Server to Server?
- How to move a site between servers with almost no downtime
- VMWare Vmotion Server Live Migration Explained
- When is time to move from a reseller account to a dedicated server?
- VMWare Is Driving Customers To Microsoft Virtualization
- Hyper-V for Web Hosting?


