This problem occurs when you’re trying to delete a VM, but it doesn’t delete in the VDI client. This problem is exasperated by the fact that you may end up deleting the VM through vSphere, but instead of removing the entry, VMware View will report the machine as (Deleting) instead, likely even placing it under “Problem Desktops”. Combine this with it being the last machine needed to be deleted in a VDI pool you’ll have an entire pool that’s stuck in the deleting state. Obviously we don’t want to leave it like that so follow these steps to delete the bad entry and remove the VM as well as the stuck pool.
- Open up vSphere and connect to vcenter
- Open up the console for the connection manager
- If the ADAM database is already connected, skip to number 4
- Click Start > Administrative Tools > ADSI Edit.
- In the console window, right-click ADSI Edit and click Connect to.
- In the Name field type: View ADAM Database
- Select Select or type a Distinguished Name or Naming Context.
- In the field below, type dc=vdi,dc=vmware,dc=int
- Select Select or type a domain or server.
- In the field below, type localhost
- Click OK.
- Click View ADAM Database [localhost] to expand.
- Click DC=vdi,dc=vmware,dc=int to expand.
- Locate the GUID of the virtual machine. To locate the GUID of the virtual machine:
- Right-click the Connection View ADAM Database [localhost:389], and click New > Query.
- Under Root of Search, click Browse.. and select the Servers organizational unit.
- Click OK.
- 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.
- Click OK to create the query.
- Click the query in the left pane. The virtual machines that match the search are displayed in the right pane.
- Record the GUID in cn=<GUID>.
- Delete the pae-VM object from the ADAM database:
- Locate the OU=SERVERS container.
- 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.
- 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.
See Also: Connecting to the View ADAM Database, Manually Deleting VMs
Comments