please_recycle_by_fast_eddie.jpgTime for a new problem in the VMware Horizon View series. After running into problems which forced me to ‘Manually delete protected Horizon View replicas‘ and ‘Link a VMware View desktop to its replica‘, now I encountered an orphaned desktop pool which could not be deleted. First, What got me into this mess. As I told you last week I was testing a Nvidia Quadro K5000 graphics card when my ESXi whitebox died on me. This also corrupted the one hard drive which contained all my Horizon View desktops. Fortunately the golden images resided on my NFS storage so no harm done, just delete the pools, recreate them and we’re up and running again. Wrong! Because the VDI virtual machines were no longer present, I ended up with an orphaned desktop pool. Similar like you would get when deleting View virtual machines directly from the vCenter client. When I tried to delete the desktop pools in the Horizon View Administrator I got an error stating internal problems with the Composer server or service. Composer error.JPG It’s not much to go on but I checked the View Composer service, Composer logs, Windows domain membership and I even reconfigured Composer in the Horizon View Administrator Server settings. No success. Then I remembered manually deleting the protected Horizon View replicas and I searched for orphaned desktops pools. I found this VMware KB article: Manually deleting linked clones or stale virtual desktop entries from VMware View Manager and Horizon View (1008658) This confirmed my suspicion that this had nothing to do with the Composer service but that it was caused by the disappearance of the View virtual machines due to the hard disk corruption. Much like you would get when deleting View virtual machines directly from the vCenter client instead of the proper way, in the Horizon View Administrator console. To solve this problem and remove the bad entries to be able to delete the desktop pool I had to do the following:
  1. Open up vSphere and connect to vCenter.
  2. Open up the console for the Horizon View Connection Server.
  3. Connect to the Horizon View ADAM database:
    1. Click [Start > Administrative Tools > ADSI Edit].
    2. In the console window, right-click ADSI Edit and click [Connect to].
    3. In the Name field type: [View ADAM Database].
    4. Select [Select or type a Distinguished Name or Naming Context].
    5. In the field below, type [dc=vdi,dc=vmware,dc=int]. (do not try to be smart and change these to match your own AD domain like I did. This is the distinguished name of the Horizon View ADAM database)
    6. Select [Select or type a domain or server].
    7. In the field below, type [localhost].
    8. Click [OK].
    9. Click [View ADAM Database] to expand.
    10. Click [DC=vdi,dc=vmware,dc=int] to expand.
  4. Locate the GUID of the virtual machine. To locate the GUID of the virtual machine:
    1. Right-click the Connection [View ADAM Database], and click [New > Query].
    2. Under Root of Search, click [Browse] and select the [Servers] organizational unit.
    3. Click [OK].
    4. In the Query String, paste this search string: (&(objectClass=pae-VM)(pae-displayname=VirtualMachineName)) Where VirtualMachineName is the name of the virtual machine for which you are trying to locate the GUID. You may use * or ? as wildcards to match multiple desktops.
    5. Click [OK] to create the query.
    6. Click the query in the left pane. The virtual machines that match the search are displayed in the right pane.
    7. Record the [GUID] in cn=<GUID>.
  5. Delete the [pae-VM object] from the ADAM database:
    1. Locate the [OU=SERVERS] container.
    2. Locate the corresponding virtual machine’s GUID (from above) in the list which can be sorted in ascending or descending order, choose [Properties] and check the pae-DisplayName attribute to verify the corresponding linked clone virtual machine object.
    3. Delete the pae-VM object.
  6. Check if there are entries under OU=Desktops and OU=Applications in the ADAM database.
  7. Check for entries in both the [OU=Server Groups] and [OU=Applications] and remove both. Removing one entry and not the other from the ADAM database results in the java.lang.nullpointerexception error when attempting to view the pools or desktops inventory in View Manager.

ViewADAM.png

This did the trick. After deleting all references to the old VDI virtual machines and desktop pools, I’ve got a fresh and clean Horizon View Connection Server.