Fixing SCVMM error 1604 with VMMTrace

SCVMM drives me nuts sometimes, albeit likely self-induced. The SCVMM instance in our dev lab was very slow. Being that it originally started as something to test on and eventually became something we used everyday, we decided to migrate the SCVMM instance to a more powerful host. Following this TechNet article I successfully moved our database and got a new instance running.  Being not very observant, I installed the beta application tier and pointed it at our database. It was flaky at best, but nothing stopped me from doing this. Once I realized I no longer had dynamic memory support I attempted to uninstall the app tier. It failed stating it couldn’t find the License.rtf file and wouldn’t let the install continue. I eventually had to reconstruct a new server but the beta version had messed up the database. I had to run the “VMM 2008 R2 SP1 RC to RTM Upgrade Tool” to fix up the database. Then I installed the SCVMM R2 SP1 app tier and pointed at the fixed database. The install succeeded but now I received a really annoying error when attempting to run the administrator console:

You cannot access Virtual Machine Manager server <servername>. Contact the Virtual Machine Manager administrator to verify that your account is a member of a valid user role and then try the operation again. (1604)

There were no errors in the event log and the VMM service seemed to be running fine. Eventually I ran into VMMTrace. This command line tool is used to diagnose issues in SCVMM using DbgView. What a life saver!

What I noticed about the log was that the error code was not present. Instead I found an exception stack trace that led me right to the problem:

00011253 46.52916336 [2724] 0AA4.04F8::06/09-01:33:19.404#04:Catalog.cs(755): !!! System.Data.SqlClient.SqlException: The database owner SID recorded in the master database differs from the database owner SID recorded in database ‘VirtualMachineDB’. You should correct this situation by resetting the owner of database ‘VirtualMachineDB’ using the ALTER AUTHORIZATION statement. 00011254 46.52916336 [2724]    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) 00011255 46.52916336 [2724]    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) 00011256 46.52916336 [2724]    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) 00011257 46.52916336 [2724]    at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() 00011258 46.52916336 [2724]    at System.Data.SqlClient.SqlDataReader.get_MetaData() 00011259 46.52916336 [2724]    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) 00011260 46.52916336 [2724]    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) 00011261 46.52916336 [2724]    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) 00011262 46.52916336 [2724]    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) 00011263 46.52916336 [2724]    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) 00011264 46.52916336 [2724]    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) 00011265 46.52916336 [2724]    at Microsoft.VirtualManager.DB.SqlRetryCommand.InternalExecuteReader()00011266 46.52916336 [2724]  Error = 33009

The first line had exactly what I needed to fix my SCVMM instance. Everything has been working flawlessly since. If you are experiencing any issues with SCVMM I would recommend checking out VMMTrace.

Before doing anything make sure you backup your database!

You can leave a response, or trackback from your own site.

Leave a Reply

In an effort to prevent automatic filling, you should perform a task displayed below.