Manually deleting linked clones or stale virtual desktop entries from VMware View Manager 3.x and 4.0.x


Manually deleting linked clones or stale virtual desktop entries from VMware View Manager 3.x and 4.0.x

Symptoms

  • You cannot provision 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

Cause

This issue occurs when:
 
  • a table in the database contains incorrect data. 
  • the virtual machine name has been changed in the vCenter Server manually after the pool has been created, causing View Composer and vCenter Server to refer to the same virtual machine with different names.
 
 

Resolution

This solution applies to VMware View 3.x and 4.0.x.  For View 4.5 and later, see Manually deleting linked clones or stale desktop entries from VMware View Manager 4.5 and later (2015112).
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 ADAM database and from the View Composer database so the tables regenerate properly. Then, ensure that no pool desktop names are changed through vCenter Server after the pool is created.
Perform these steps in order.  The sections are ordered in the most appropriate sequence to isolate the issue, identify the proper resolution, and minimize data loss. After each section, check to see if the issue is resolved. Work through each troubleshooting section in order and do not skip a section.
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 View Manager (1008046).

Removing the virtual machine from the ADAM database

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, see Connecting to the View ADAM Database (2012377).
  2. Locate the GUID of the virtual machine.

    To locate the GUID of the virtual machine:

    1. Right-click the Connection View ADAM Database [localhost:389], and click New > Query.
    2. Under Root of Search, click Browse.. and select the Servers organizational unit.
    3. Click OK.
    4. 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.
    5. Click OK to create the query.
    6. Click the query in the left pane. The virtual machines that match the search are be displayed in the right pane.
  3. Record the GUID in cn=.
Delete the pae-VM object from the ADAM database:
  1. Locate the OU=SERVERS container.
  2. 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.
  3. 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.

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 column NAME.
  3. Open the dbo.SVI_COMPUTER_NAME table and delete the entire row where the virtual machine is referenced under column NAME.
  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 column PARENT_ID.
  6. Open the dbo.SVI_SC_BASE_DISK_KEYS table and delete the entire row where dbo.SVI_SIM_CLONE ID is referenced under column PARENT_ID.
  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 around in the dbo.SVI_TASK_STATE table and the dbo.SVI_REQUEST table:

    1. Open the dbo.SVI_TASK_STATE table and find the row where dbo.SVI_SIM_CLONE ID is referenced under theSIM_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.
  9. Remove the virtual machine from Active Directory Users and Computers.

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 Delete from Disk.

留言

這個網誌中的熱門文章

Install vSphere 4.1 Update Management display "ODBC 32bit"

How to install open VM tools on Ubuntu 14.04

How to build PrivacyIdea HA with MySQL with master and master replication