While browsing the VMM 2012 SP1 library, I found an obsolete VHD, and I wanted to delete it from there. But, when I tried to delete this obsolete VHD, VMM was complaining with following error message:
In order to delete this VHD from VMM library I have opened table tbl_WLC_VHDConfig from VM database using SQL Management Studio. In this table there is a column named "SourceLocation". In this column we can find the ID of the offending VHD. But how to find the ID of VHD ? Using Get-VirtualHardDisk cmdlet you can list all the VHDs with their IDs:
Note: Make a backup of the VM database before changing (deleting) rows from database, and this operation is not recommended by Microsoft, so perform at your own risk.
The library object (Name of the VHD) cannot be removed because following objects are dependent on it:
Virtual Hard Disk deployment configuration
Get-VirtualHardDisk | ft name,idNow when we have the ID of the VHD, we can create new query from SQL Management Studio to delete the row containing VHD ID in SourceLocation column:
Delete From dbo.tbl_WLC_VHDConfig Where SourceLocation = 'VHD ID'
Note: Make a backup of the VM database before changing (deleting) rows from database, and this operation is not recommended by Microsoft, so perform at your own risk.
I truly appreciate that you've posted an nice article. Much obliged to you for sharing this good post. Likewise visit our website.
ReplyDelete123.hp.com || 123.hp.com/setup || 123HP Setup || hp.com/setup || hp.com/123 || 123.hp.com setup || 123 HP Printer Setup || 123 HP Printer Support || 123 HP Setup and Install || 123hpcom || 123 HP Printer Install || 123hpcomsetup || 123 HP Wireless Setup || 123 HP Install || hpcom/123 || 123hpcominstall || 123HP Setup || 123 HP Smart App || Install 123 HP Printer || HP 123 Setup Scanner