Thursday, January 3, 2013

Manually deleting linked clones or stale virtual desktop entries from VMware View Manager 3.x and 4.0.x

Removing the virtual machine from the ADAM database

Note: Before removing entries from the ADAM database, note the virtual machine name of the desktops that are being removed for reference when editing the Composer Database.

  1. Connect to the View ADAM Database. For more information, see Connecting to the View ADAM Database (2012377).
  2. Windows Server 2008 R2 (vCenter Server)

    To connect to the View ADAM database:
    1. Log in to one of the View Connection Servers as Domain Administrator.
    2. Click Start > Administrative Tools > ADSI Edit.
    3. In the console window, right-click ADSI Edit and Click Connect to.
    4. In the Name field type:

      View ADAM Database
    5. Select Select or type a Distinguished Name or Naming Context.
    6. In the field below Select or type a Distinguished Name or Naming Context, type:

       dc=vdi,dc=vmware,dc=int
    7. Select Select or type a domain or server.
    8. In the field below Select or type a domain or server, type:

       localhost:389

    9. Click OK.
    10. Click View ADAM Database [localhost:389] to expand.
    11. Click DC=vdi,dc=vmware,dc=int to expand.
    Note: If you are unable to connect using dc=vdi,dc=vmware,dc=int, try using dc=vdi;dc=vmware;dc=int.
  3. Locate the GUID of the virtual machine.

    To locate the GUID of the virtual machine:

    1. Right-click the Connection View ADAM Database [localhost:389], 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.
  4. Record the GUID in cn=<GUID>.
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.
Notes:
  • Check if there are entries under OU=Desktops and OU=Applications in the ADAM database.
  • A broken pool that does not contain any desktops can be removed from View Manager by removing the pool entry from both the Server Groups and Applications organizational units. However, 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.

No comments:

Post a Comment