Sometimes, the status of a VM in SCVMM gets stuck although that status is faulty.
In my case, it got stuck to “failed” and when viewing the job in SCVMM, I saw a nice little error:
Library server is not associated with this Virtual Machine Server.
Refreshing the status of the virtual machine, rebooting the SCVMM Server… nothing seemed to change the status to the correct value.
So, I started doing something most people are afraid to do… I dove in the SCVMM database.
By doing some research at TechNet and a bunch of for a I found that by removing all the entries from the table named “dbo.tbl_WLC_VObject” will force the SCVMM server to contact the Hyper-V hosts to update its database.
Now, removing all the entries will have a serious impact… and that’s not what I wanted since it was a production environment.
When you go to the SQL Management Studio, expand the SCVMM database, expand the tables and select “Edit top 200 Rows” by right-clicking on the “dbo.tbl_WLC_VObject”.
Find all the entries with your VM name it in and delete them.
* If you have more than 200 entries in there, change the default number of rows to show by following this article and start over.
Now, reboot the SCVMM server and check if the list of virtual machines is repopulated (may take a little time) and most importantly… check if the status of your virtual machine is changed to the correct value
Big fat note: Making manual changes in the SCVMM database is not supported. When you decide to do it anyway, please make sure you have a recent backup before you start making changes!!!