29 March 2011

SCVMM display a status or error inconsistent with Hyper-V Manager

SCVMM is great for being able to manage all your VMs  from various hosts.  One thing I find very frustrating though is that sometimes it gets stuck on an error stat for a VM that is simply not true. Here is a typical example. Other issues I had is that it report that the checkpoint creation has failed or that it is corrupted.  Checking it out in Hyper-V manager however you can see that everything is just fine.

This is because the SCVMM works from a database.  This is not always refreshed to show the updates status of the VMs that it manages. 

In http://fixmyitsystem.com/2011/02/scvmm-delete-error-402-entry-form.html we covered how to connect to the database and where to look for the offending entries.

I have found that by removing all the entries for a VM form the dbo.tbl_WLC_VObject table in VirtualManagerDB database will force SCVMM to update it's database from the Hyper-V manager and therefore reflect the correct Virtual Machine state.


  • Check that the VM is indeed in a working start form the Hyper-V manager console.
  • Stop the Virtual Machine Manager service on SCVMM server

Finding the entries

  • From a connect SQl management studio 
  • Expand the VirtualManagerDB
  • Expand Tables
  • Right click dbo.tbl_WLC_VObject and click Select Top 1000 Rows

This will open the Query window and the result.  To make it easier to find the entries you are looking for add order by [name] to the end of the last line and execute the query again.

In the results pane you will see that some machines have more than one entry, this is typically for check points. Keep a note of how many entries you have for that VM name.

Removing the Entries

  • Right click dbo.tbl_WLC_VObject and click Edit top 200 rows
  • This will open a table that you can actually edit.
  • Scroll through until you find an entry that maches the VM name. 
  • Select the line 
  • Right Click and delete.
  • After this you need to execute SQL
  • Repeat this for the number of rows you found in the query.

If there are more than 200 rows you can edit the command to list more rows.

  • In the Management console select Tool - Options.  
  • Expand SQL server Object Explorer
  • Select Commands
  • Change the Value for Edit top <n> rows command to your desired number. 0 will return all rows.
This will now allow you to edit more rows.

Finishing up
Start the Virtual Machine Manager service on SCVMM server
Connect to the SCVMM console and check that the VM is repopulated and it should now show the updated correct status.

No comments:

Post a Comment