Site icon mulcas

Connecting to the View ADAM Database + Deleting a stuck VM

ADAM database
In This Article:

What:

When you deploy linked clone desktops pools with VMware Horizon, the information for these machines are stored in the ADAM database and not with the vCenter database. The ADAM database is described in the following VMware KB:
“The Active Directory Application Mode (ADAM) database is used as a replicated storage facility for vCenter Servers running in Linked mode.

ADAM is used to store:
• The list of vCenter instances participating in the group. For a standalone instance, this still exists, but there is only one entry in the list.
• The definitions of authorization Roles. These are common in the group and are no longer stored in the vCenter SQL database.
• The definitions of available licenses and license assignments for the Linked Mode group. One-stop shopping for checking on and updating license usage across all vCenters in the group.

ADAM is required to run vCenter Server in Linked Mode. If you do not want to run vCenter Server in Linked Mode, close ADAM ports, RPC ports and port 389 and port 636 in the firewall. These ports are only used by the local VMware VirtualCenter Management Webservices and VMware VirtualCenter Server services.
Note: ADAM is also utilized by standalone vCenter Servers for storing licensing information.”

Sometimes will be necessary to connect to the ADAM database for troubleshooting, when a pool or VM is stuck in View Administrator inventory and cannot be deleted, this pool or VM need to be deleted from the ADAM database.

How:

In my case, I have VMware Horizon connection server running on a Windows 2012 R2, the one I am using for the creation of the virtual machines in my VDI tested environment.

  1. Go to StartAdministrativeTools > ADSI Edit
  1. From the console window, right-click ADSI Edit and click Connect to…
  1. In the new window, type any name in Name field: ADAM Database, for example.
  2. In Connection Point, Select Select or type a Distinguished Name or Naming Context
  3. In the field below, type: dc=vdi,dc=vmware,dc=int
  4. In computer, select Select or type a domain or server: (Server | Domain [:port])
  5. In the field below, type [localhost] or the server name (with domain), in my case is VDIConnection.vdi.local
  6. Click OK to connect, if the connection cannot be established, verify the user credentials. If the connection is OK, skip to number 11.
  1. Specify credentials. Here I am using the domain controller credentials I created for the VDI environment.
  1. Enter again credential in the new window.
  1. Right-click ADAM Database [Server name] >New Query…
  1. In the new window, type any name in Name field (Ex. Test), in Root of Search click Browse… 
  1. Select Server Organizational Unit and click OK
  1. In Query Stringfield, type (&(objectClass=pae-VM)(pae-displayname=VM)), where VM is the name of the virtual machine you want to find and delete. You can use * to match multiple virtual machines. In my case is VM074, click OK to create the query.
  1. Click in the new query created on the left panel and delete the record.
  1. If multiples virtual machines are in the query (wildcard *), get the IDs in CN=<ID>, then locate the OU=SERVERS and match the records you want to delete in the right panel.

By connecting to the ADAM database on the View Connection Server, we were able to delete the VM(s) stuck in the View Administrator inventory.

Exit mobile version