...
You have already used ViewDBChk Removing invalid linked clone entries automatically using the ViewDBChk tool (2118050) without success. Cannot provision or recompose a linked clone desktop poolYou see the error: Desktop Composer Fault: Virtual Machine with Input Specification already exists Provisioning a linked clone desktop pool fails with the error: Virtual machine with Input Specification already exists The Connection Server shows that linked clone virtual machines are stuck in a deleting stateCannot delete a pool from the View Administrator pageUnable to delete linked clone virtual machinesWhen viewing a pools Inventory tab, the status of one or more virtual machines may be shown as missingYou have obvious remnants in Vcenter or your datastore that are not present in Horizon.
This article provides steps to manually delete linked clones or stale virtual desktop entries from the View Composer database in VMware View Manager and VMware Horizon View as a back-up option where Removing invalid linked clone entries automatically using the ViewDBChk tool (2118050) does not comprehensively clean-up.
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.
Take a complete backup of the ADAM and View Composer databases before modifying or deleting entries in either database. Disable provisioning for the pool in View Manager. For more information, see Performing an end-to-end backup and restore for VMware View Manager (1008046).
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.Warning: Before you delete entries from either database, take a complete backup of ADAM and the Composer database and disable provisioning for the pool in View Manager. For more information, see Performing an end-to-end backup and restore for VMware View Manager (1008046).To resolve database inconsistency: Remove the virtual machines from the ADAM Database on the connection server.Remove all desktop references within the View Composer database.Remove all affected computer objects from Active Directory.Remove the desktops from vCenter Server. Removing the virtual machine from the ADAM database on the connection server Important: Prior to starting these steps, using the View Administrator, disable provisioning on the pool from which you are deleting the machine.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. Connect to the View ADAM database. For more information on connecting to the ADAM database with ADSI Edit, see Connecting to the View ADAM Database (2012377). Note: If you connect to ADSI and Connection server using RDP using a user account that does not have administrator privileges, you may see the error: Operation Failed. Error code: 0x8000500d. The directory property cannot be found in the cache To prevent this issue, log in to the Connection server through RDP using a user account with administrative privileges.Locate the virtual machine(s) for removal. Right-click the Connection View ADAM Database [localhost:389], and click New > Query.Provide a query name such as VM Search.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. 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. Notes: 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 Use the SviConfig RemoveSviClone command to remove these items: The linked clone database entries from the View Composer database.The linked clone machine account from Active Directory.The linked clone virtual machine from vCenter Server. SviConfig is located on vCenter Server hosting View Composer (or standalone Composer server) at: 32-bit servers: Install_drive\Program Files\VMware\VMware View Composer64-bit servers: Install_drive\Program Files (x86)\VMware\VMware View Composer Before you remove the linked clone data, make sure that the View Composer service is running. On the View Composer machine, run the SviConfig RemoveSviClone command. The command looks similar to:SviConfig -operation=RemoveSviClone -VmName=VMname -AdminUser=TheLocalAdminUser -AdminPassword=TheLocalAdminPassword -ServerUrl=TheViewComposerServerURLWhere: 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. Notes: 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.Execute 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, 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: Open SQL Manager > Databases > View Composer database > Tables.Open the dbo.SVI_VM_NAME table and delete the entire row where the virtual machine is referenced under the NAME column.Open the dbo.SVI_COMPUTER_NAME table and delete the entire row where the virtual machine is referenced under the NAME column.Open the dbo.SVI_SIM_CLONE table, find the virtual machine reference under column VM_NAME and note the ID. If you try to delete this row, it complains about other table dependencies.Open the dbo.SVI_SC_PDISK_INFO table and delete the entire row where dbo.SVI_SIM_CLONE ID is referenced under the PARENT_ID column.Open the dbo.SVI_SC_BASE_DISK_KEYS table and delete the entire row where dbo.SVI_SIM_CLONE ID is referenced under the PARENT_ID column.If the linked clone was in the process of being deployed when a problem occurred, there may be additional references to the clone left in the dbo.SVI_TASK_STATE and dbo.SVI_REQUEST tables: Open the dbo.SVI_TASK_STATE table and find the row where dbo.SVI_SIM_CLONE ID is referenced under the SIM_CLONE_ID column. Note the REQUEST_ID in that row.Open the dbo.SVI_REQUEST table and delete the entire row where dbo.SVI_TASK_STATE REQUEST_ID is referenced.Delete the entire row from the dbo.SVI_TASK_STATE table. In the dbo.SVI_SIM_CLONE table, delete the entire row where the virtual machine is referenced. Removing the virtual machine from Active Directory To remove the virtual machine from Active Directory: Log in to the Domain Controller as Administrator.Navigate to Start > Administrative Tools > Active Directory Users and Computers.Remove the virtual machine from Computers. Note: The virtual machine may not be in the Computers OU (Organizational Unit). It may be in a different OU. Deleting the virtual machine from vCenter Server To delete the virtual machine from vCenter Server: Log in to vCenter Server using the vSphere Client.Right-click the linked clone virtual machine and click Power > Power Off.Right-click the linked clone virtual machine and click Delete from Disk.Enable provisioning on the pool.
VMware Labs created a Fling for use on VMware Horizon 6.0 and 5.3 to scan for and fix provisioning errors that cannot be addressed using View Administrator. The Fling is available at VMware Labs. Important: This is an experimental tool and should not be run on production systems. For more information, see the Fling page and the Tech Preview License file included with the download. For more information about ADSI Edit, see the Microsoft TechNet ADSI Edit page. For more information on the sviconfig command, see Removing Orphaned or Deleted Linked Clones section Setting Up Desktop and Application Pools in View guide . Note: The links in this article were correct as of September 18, 2014. If you find a link is broken, provide feedback and a VMware employee will update the link.The View virtual machine is not accessible and the View Administration console shows the virtual machine status as Already UsedPerforming an end-to-end backup and restore for VMware View ManagerManually deleting replica virtual machines in VMware Horizon View Editing an existing pool in the VMware View web admin interface fails with the error: One of required objects is not found in the VirtualCenter server <IP address/hostname>Connecting to the View ADAM DatabaseVMware View Manager および VMware Horizon View の View Composer データベースからリンク クローンまたはステールの仮想デスクトップ エントリを手動で削除する置备或重构链接克隆桌面池失败Excluindo manualmente clones vinculados ou entradas de áreas de trabalho obsoletas do banco de dados do View Composer no VMware View Manager e no Horizon ViewEliminación manual de entradas de escritorio virtual antiguas o clones vinculados de la base de datos de View Composer en VMware View Manager y Horizon ViewRemoving invalid linked clone entries automatically using the ViewDBChk tool in VMware Horizon View 5.3 and later versions