Friday, January 7, 2011

SCVMM 2008 R2 Error (402) "Library Server is not associated with this Virtual Machine Manager Server"

I had this problem on a site during the week when a failed template deployment from SCVMM put the machine into an error state and when I tried to delete the virtual machine from SCVMM it failed with error (402) "Library Server is not associated with this Virtual Machine Manager Server".

On searching for the answer for this, I found a lot of comments on people either just leaving it as it was (probably due to the fact that it doesn't do any harm) or to just re-install SCVMM!

I found both of these 'workarounds' a bit excessive and wanted to track down an absolute reason and fix for the error.

I found a post on the Microsoft System Center forums that explained that the object for the virtual machine within the SCVMM SQL Database had an incorrect object state of '104' and this needs to be changed to a state of '1' which would then change the state in the GUI to 'Missing' and would allow me to delete the machine from SCVMM as normal.

If you're partial to a bit of SQL Database modifications, then read on, if not, then just re-install SCVMM!!

Here's what the Technet post suggests to do and I've added my own non-SQL guru way of fixing it:

  • Close any open sessions of SCVMM 2008 R2 on the desktop or from within remote sessions

  • Open up SQL Management Studio and browse to the SQL Database for the SCVMM installation

  • Expand the tables folder within the VirtualManagerDB database and browse down the list until you find the 'dbo.tbl_WLC_VObject' entry

  • Right Mouse Click on this and select the 'Edit Top 200 Rows' option

  • On the right hand side, this will bring up a list of 'ObjectID', 'ObjectType' and 'ObjectState' columns alongside another column titled 'Name'

  • If you expand the 'Name' column, you should be able to see the name that you assigned to the virtual machine template installation as you see it from within the SCVMM GUI

  • Once you find the 'Name' of the virtual machine template installation that you want to modify, you should see an 'ObjectState' entry of '104 beside it

  • Change this 'ObjectState' entry to '1' and then select the 'Execute SQL' option from the 'Query Designer' menu up the top

  • Now close down SQL Management Studio and re-open the SCVMM 2008 R2 GUI and you should now see that the virtual machine template has a status of 'Missing' beside it

  • Simply just right-mouse click on this VM now and select 'Delete' and select 'Yes' if prompted to delete the VHD's associated with it too

All done and apologies for the lack of accurate SQL Database modification etiquette!!!

Here's the link to the Technet article too:

http://social.technet.microsoft.com/Forums/en-US/virtualmachinemanager/thread/872034ba-3545-4431-b9f6-07ee8c65188b

2 comments:

  1. HI Kevin

    Thanks for posting this - it helped me through the process.

    If anyone is struggling there is my articles that is even easier to follow since it has pictures and covers the initial SQL connectivity I had Issues with.

    http://fixmyitsystem.com/2011/02/scvmm-delete-error-402-entry-form.html

    ReplyDelete
  2. No problem Etienne - thanks for the mention on your own post too - glad I could be of assistance!

    ReplyDelete