SCVMM – Failed Objects are not manageable nor can I delete them… Please Help!

SCVMM – Failed Objects are not manageable nor can I delete them… Please Help!

  • Comments 1
  • Likes

In various situations, SCVMM might store data that is “stale” or “tomb-stoned” as I outlined in an earlier blog post.  There are situations where objects re-appear after you’ve followed my instructions of how to delete them in SQL Management Studio.  I’ve not dug deeply into this to really determine the root cause of this re-appearance of the VM objects however my initial research seems to lead to the fact you’ve deleted an object in the database that has links because of checkpoints, of course, managed by VMM.  In these cases, VMM restores the object since it is a parent of a chain as to avoid data inaccuracies.  The objects also, in this case, do not exist on the servers as they’ve been removed and/or deleted.  <<< HIGHLY CAUTION – THIS IS THEORY AND NOT PROVEN NOR FACT AND CAN BE EASILY OVERTURNED WITH MORE TIME.

The fact remains that you have objects that you’ve can correctly delete for one reason or another.  You would like to remove them since they are stale objects and clog up what is mostly your harmonious view of your virtual world.

Step 1:  Find the object in the dbo.tbl_wlc_vobject table in the VirtualManagerDB

The first step, especially if you have a big SCVMM environment, is to locate these stale objects using Query Analyzer so that you can easily manipulate them.  To do this, you execute the following SQL query on the VirtualManagerDB in SQL Management Studio -

 
Select Name from dbo.tbl_WLC_VObject where Name='{Name of VM in SCVMM}'

 

After you’ve located the records, you can easily determine the objects that need to be deleted.  It is possible that you have more than one due to failures or checkpoints.

ObjectState_FailedVM

Step 2:  Delete the records from VirtualManagerDB

There is a reason that doing this approach is not recommended or supported by Microsoft.  For my typical caveat, I recommend that you backup your VMM database prior to moving forward.  For instructions, please see this post.  Let’s get on with it…

You can select to edit the top 200 rows if you like to see a graphical view but for ease I typically just use a query to simplify things.  To clean up the objects, do the following in order on the VMM Server:

  1. Stop the SCVMM service
    net stop vmmserver
  2. Do the following command when connected to the DB server via SQL Management Studio -
    Delete from dbo.tbl_WLC_VObject where Name='{Name of VM in SCVMM}'
  3. Restart the SCVMM service
    net start vmmservice

 

Step 3: Verify Objects are no longer existent in the Virtual Machine Manager console

The last step is to verify that your objects have, in fact, been removed from VMM.  To do this just open the VMM console and verify that all objects have been deleted.

Summary

The first thing you might ask is how is this different from your earlier post.  This is very observant and you are right, they are very similar posts.  I chose not to update that blog because this technique I outlined earlier simply didn’t work on a few stale objects and I felt it necessary to share this guidance because it took me some work to get it done.  Like I said, I didn’t have the time to deeply understand why this “auto-discovery” occurred but nonetheless the fact was that the objects were not deleting.  The primary change in this post is outlined in the step where you have to stop the SCVMM service in order to issue the SQL command to rid yourself of these objects.  Up until this point, each delete attempt led to VMM to reconcile and re-discover them creating even more objects than I desired.

After making this slight change, all objects that were driving us crazy seized to exist making us all a bit happier.

Enjoy,

-Chris



Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment