A new way to delete erroneous View Desktops using ViewDbChk

Information about View Linked Clone Desktops are stored in 3 locations: LDAP DB, View Composer DB, vCenter DB. In the past (versions 3.x, 4.x) it happens more often to get orphaned desktops or VMs that shows errors or state “missing”. In more current versions of VMware View at one hand this happens not that often any more and on the other hand it is often self repaired after trying to delete these faulty VMs a second time in GUI. But it is still possible to get an VM that shows errors and you are not able to delete this VMs in the GUI.

I will show how to delete such VMs without deleting the object in every of the 3 locations manually.

In View 6.1 there is a new way to delete faulty desktops. To be fair, this option was available before in VMware Labs here. If you are using View 5.3 or 6.0 (select the version you need to download!) you can still use this Fling to get the work done.

Using the command line tool ViewDbChk.exe you can do:

  • Show information of a pool: ViewDbChk --findDesktop --desktopName Poolname
  • Show information of a desktop: ViewDbChk --findMachine --desktopName Poolname --machineName Desktopname
    ViewDbChk queries every DB and show errors link “not found”
  • Disable a pool: ViewDbChk --disableDesktop --desktopName Poolname
  • Enable a pool: ViewDbChk --enableDesktop --desktopName Poolname
  • Remove a (faulty) desktop: ViewDbChk --removeMachine --desktopName Poolname --machineName Desktopname
    • For this task ViewDbChk asks you to disable the pool before deleting the desktop and to enable it afterwards.
    • Desktop information is deleted in every DB
Notes
  • ViewDbChk is case-sensitive. This is valid even for Poolnames and Desktopnames
  • By default a ViewDbChk task is done for just 1 VM, if you need more VMs done use parameter –limit
  • More information of manually deleting faulty desktops see here.

Leave a Reply

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