This issue occurs if a table in the database contains incorrect data or if the virtual machine name is manually modified in vCenter Server after the pool is created, causing View Composer and vCenter Server to refer to the same virtual machine with different names.
If the virtual machine was renamed through the vSphere Client after the pool was provisioned, you can resolve the issue by renaming the virtual machine to its original deployed name.
To resolve database inconsistency, you must delete the virtual machine references from the View Composer database and from the ADAM database so the tables regenerate properly. Then, ensure that no pool desktop names are changed through vCenter Server after the pool is created.
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.
Check the properties of the items returned by the query to confirm the correct virtual machine(s) were found, and delete the pae-VM object(s) to remove them from the database.
Check if there are entries under OU=Server Groups 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.
Using SviConfig to remove linked clone references from the View Composer database, Active Directory, and vCenter Server
VMname is the name of the virtual machine to remove.
TheLocalAdminUser is the name of the user who is part of the local administrator group. The default value is Administrator.
TheLocalAdminPassword is the password of the administrator used to connect to the View Composer server.
TheViewComposerServerUrl is the View Composer server URL. The default value is https://localhost:18443/SviService/v2_0.
For VMware View Manager 5.1 and later, TheViewComposerServerUrl is the View Composer server URL. The default value is https://localhost:18443/SviService/v3_0.
For VMware View Manager 6.0, TheViewComposerServerUrl is the View Composer server URL. The default value is https://localhost:18443/SviService/v3_5.
The VmName and AdminPassword switches are required.
Ensure you are using an administrative command prompt by launching cmd using Run as Administrator option. Without administrative permission, an Access is denied message is returned. For more information, see the Microsoft Technet article, Start a Command Prompt as an Administrator.
If you need to remove a large number of virtual machines, you can create a text file with each virtual machine's name and a batch file to execute the SviConfig command against each.
Copy the virtual machine names to a text file and save it as desktops.txt to the same directory in which SviConfig is located.
Copy this line to a new text document:
FOR /F %%A in (desktops.txt) DO sviconfig -operation=removesviclone -vmname=%%A -adminuser=username -adminpassword=password -ServerUrl=TheViewComposerServerURL
Where username is the name of the user who is part of the local administrator group and password is the password of the administrator.
Note: The ServerUrl parameter is optional as there is a default value.
Save the text file as RemoveDesktops.bat.
Note: If the .vmx file of the linked clone is damaged or missing, vCenter Server cannot delete the virtual machine. In this case, right-click the virtual machine in vCenter Server and click Remove from Inventory.
After running the SviConfig command and verifying that the virtual machine is deleted from vCenter Server, click the virtual machine in the View Administration console and click Remove.
Enable provisioning on the pool.
Important:If the preceding steps do not resolve the issue or if you are using a version prior to 4.5, perform the steps in the given sections.
Removing the linked clone references from the View Composer database
To remove the linked clone references from the View Composer database:
04/23/2013 - Added info about serverurl to the Additional Information section 06/25/2013 - Added note that ServerUrl is optional 07/11/2013 - Added VMware Horizon View 5.2 to Product Versions 09/26/2014 - Added Note under step 1 under the Resolution section 11/07/2013 - Added steps to resolve database inconsistency in Resolution section 12/16/2013 - Added Horizon View 5.3.x to Product Versions 09/18/2014 - Add Fling info 10/03/2020 -Links repaired and back in public view.