Removing a non-existent VMM Library Server

I admit, you don’t have to remove a non-existent VMM Library Server everyday, but today happened to be such a day. Let me explain what happened. In addition to a SQL Server 2012 AllwaysOn cluster for the VMM database and a VMM 2012 SP1 Failover Cluster, I wanted to also make the VMM Library Server highly available because the management foundation for a production Windows Server 2012 Hyper-V hosted cloud would soon become too big too fail.

Let me concentrate on the VMM Library cluster. I created an ordinary guest based 2-node Windows Server 2012 cluster using the new synthetic virtual Fibre Channel adapters, connected to an EMC VNX5300 storage system. After documenting the WWN’s and WWPNs for both adapters and requesting the SAN admin to create a few disks and to correctly zone the FC devices, creating the failover cluster was really a very quick deal. For some reason after installing EMC PowerPath 5.5 SP1, only one node of the cluster detected the correct Multi-Path Disk Device while the other thought it was dealing with a VRAID SCSI Disk Device.


Because uninstalling the devices or removing and reinstalling EMC PowerPath didn’t do the trick, I just went on to create a standard clustered file server role and add a share to be used for the VMM Library.


After some time we noticed that the cluster did not work as expected, so I decided to destroy the cluster and start over. In retrospect this was not the smartest thing to do. I should have removed the VMM Library server from VMM before I killed the cluster.

As you might have guessed, it was not possible to remove the VMM Library after I had destroyed the file server cluster. In fact I had used an identical cluster CNO (Cluster Name Object) and file server VCO (Virtual Cluster Object), which were of course different from the previous incarnation. I also manually removed the VMM agent from the cluster nodes and reinstalled them manually. Albeit to no effect.


One of my fellow MVP’s, Cameron Fuller, suggested to use PowerShell to try and forcefully remove the Library Server. I knew that was possible with a failed virtual machine, but I could not find a way in PowerShell to force the removal of a no longer existing Library Server. The old VCO was replaced by the new VCO as soon as I had recreated the failover cluster and the file server role.

I finally resorted to removing the record(s) from the VMM database. I found the procedure on this blog:

Warning: Do not start deleting records before you have a backup of the VMM database!

First find the LibraryID of the Library Server.


You cannot just delete the VMM Library records, because there are dependent records in related database tables. You must first delete the volumes used for the VMM share. Using the LibraryID found in the previous command, you can identify the volume records in the dbo.tbl_ADHC_HostVolume table.


After you have deleted the related records from the dbo.ADHC_HostVolume table, you can run this stored procedure to finally remove the VMM Server.

exec prc_ADHC_Library_Delete ‘ID’
(replace ID by the ID found in the previous commands)

After the VMM server was removed, I was able to add the file cluster again.



1 Comment

  1. February 6, 2013    

    Dont forget to delete the HostVolume as well!

    delete from tbl_ADHC_HostDisk
    where LibraryServerID like ‘[LibraryID]’


No Pings Yet

  1. System Center 2012 R2 Virtual Machine Manager — Удаляем из БД запись о Library Server | Блог IT-KB on January 9, 2014 at 07:28

Leave a Reply

Your email address will not be published. Required fields are marked *

Our Sponsors

Powered by