Search the VMware Knowledge Base (KB)
View by Article ID

Provisioning or recomposing a linked clone desktop pool fails (2015112)

  • 49 Ratings
Language Editions

Symptoms

  • Cannot provision or recompose a linked clone desktop pool
  • You 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 state
  • Cannot delete a pool from the View Administrator page
  • Unable to delete linked clone virtual machines
  • When viewing a pools Inventory tab, the status of one or more virtual machines may be shown as missing

Purpose

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.

Cause

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.

Resolution





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:
  1. Remove the virtual machines from the ADAM Database on the connection server.
  2. Remove all desktop references within the View Composer database.
  3. Remove all affected computer objects from Active Directory.
  4. Remove the desktops from vCenter Server.

If your are using VMware Horizon View 6.1 and later versions, see Removing invalid linked clone entries automatically using the ViewDBChk tool in VMware Horizon View 5.3 and later versions (2118050).

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.
  1. 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.

  2. Locate the virtual machine(s) for removal.

    1. Right-click the Connection View ADAM Database [localhost:389], and click New > Query.
    2. Provide a query name such as VM Search.
    3. Under Root of Search, click Browse and select the Servers organizational unit.
    4. Click OK.
    5. 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.

    6. Click OK to create the query.
    7. Click the query in the left pane. The virtual machines that match the search are displayed in the right pane.

  3. 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

Note: This section is for VMware View Manager 4.5 or later. If you are using an earlier version of VMware View Manager, skip this section and proceed to Removing the linked clone references from the View Composer database.

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 Composer
  • 64-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=TheViewComposerServerURL

Where:
  • 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.
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.

  1. Copy the virtual machine names to a text file and save it as desktops.txt to the same directory in which SviConfig is located.
  2. 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.

  3. Save the text file as RemoveDesktops.bat.
  4. 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.

  5. 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.
  6. 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:
  1. Open SQL Manager > Databases > View Composer database > Tables.
  2. Open the dbo.SVI_VM_NAME table and delete the entire row where the virtual machine is referenced under the NAME column.
  3. Open the dbo.SVI_COMPUTER_NAME table and delete the entire row where the virtual machine is referenced under the NAME column.
  4. 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.
  5. 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.
  6. 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.
  7. 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:

    1. 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.
    2. Open the dbo.SVI_REQUEST table and delete the entire row where dbo.SVI_TASK_STATE REQUEST_ID is referenced.
    3. Delete the entire row from the dbo.SVI_TASK_STATE table.

  8. 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:
  1. Log in to the Domain Controller as Administrator.
  2. Navigate to Start > Administrative Tools > Active Directory Users and Computers.
  3. 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:
  1. Log in to vCenter Server using the vSphere Client.
  2. Right-click the linked clone virtual machine and click Power > Power Off.
  3. Right-click the linked clone virtual machine and click Delete from Disk.
  4. Enable provisioning on the pool.

Impact/Risks

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).

Additional Information

  • 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.

Tags

vmware view deleting missing,view pool stuck deleting,vmware view pool stuck deleting,vmware view manually delete linked clones,failed to remove vm from the view composer inventory,vmware view stuck deleting,horizon view deleting missing,vmware view pool deleting,vmware view error missing

See Also

This Article Replaces

1008658, 2036601

Update History

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

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 49 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 49 Ratings
Actions
KB: