Removing the virtual machine from the ADAM database
These steps are only applicable if the virtual machine has not been deleted from vCenter Server:
Find the virtual machine's GUID stored in ADAM:
- Log in to the culprit virtual machine using the vSphere Client Console or directly using Windows Remote Desktop Protocol (RDP).
- Open the Windows registry, and go to HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware VDM\Node Manager\Server DN.
- Record the cn=
.
If the virtual machine has already been deleted from vCenter Server:
- Log in to the machine hosting your VMware View Connection Server through the VMware Infrastructure Client or Microsoft RDP.
- Open the ADAM Active Directory Service Interfaces Editor.
- In a Windows 2003 Server, click Start > Programs > ADAM > ADAM ADSI Edit.
- In a Windows 2008 Server, click Start > All Programs >Administrator Tools > ADSI Edit.
- Right-click ADAM ADSI Edit and click Connect to.
- Ensure that the Select or type a domain or server option is selected and the destination points to localhost.
- Select Distinguished Name (DN) or naming context and type dc=vdi, dc=vmware, dc=int.
- Run a query against OU=Servers, DC=vdi, DC=vmware, DC=int with the this string:
(&(objectClass=pae-VM)(pae-displayname=))
- Record the cn=
.
Take a complete backup of ADAM and Composer database.
For more information, see Performing an end-to-end backup and restore for View Manager 3.x/4.x (1008046).
Delete the pae-VM object from the ADAM database:
- Open the ADAM Active Directory Service Interfaces Editor.
- In a Windows 2003 Server, click Start > Programs > ADAM > ADAM ADSI Edit.
- In a Windows 2008 Server, click Start > All Programs >Administrator Tools > ADSI Edit.
- Right-click ADAM ADSI Edit and click Connect to.
- Choose Distinguished name (DN) or naming context and type dc=vdi, dc=vmware, dc=int.
- 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.
Note: Check if there are entries under OU=Desktops and OU=Applications in the ADAM database.
Removing the linked clone references from the View Composer database
In View 4.5 and later, 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
Before you remove the linked clone data, make sure that the View Composer service is running. On the View Composer computer, run the SviConfig RemoveSviClone command.
For example:
SviConfig -operation=RemoveSviClone -VmName=VM name -AdminUser=the local admin user -AdminPassword=the local admin password -ServerUrl=the View Composer server URLWhere:
VmName - The name of the virtual machine to remove.AdminUser - The name of the user who is part of the local administrator group. The default value is Administrator.AdminPassword - The password of the administrator used to connect to the View Composer server.ServerUrl - The View Composer server URL. The default value ishttps://localhost:18443/SviService/v2_0
The VmName and AdminPassword parameters are required. AdminUser and ServerUrl are optional.Note: The location of SviConfig is:
- In 32-bit servers –
\Program Files\VMware\VMware View Composer - In 64-bit servers –
\Program Files (x86)\VMware\VMware View Composer
In View 4.0.x and earlier, you must manually delete linked-clone data 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 dbo.SVI_VM_NAME table and delete the entire row where the virtual machine is referenced under column NAME.
- Open dbo.SVI_COMPUTER_NAME table and delete the entire row where the virtual machine is referenced under column NAME.
- Open 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 dbo.SVI_SC_PDISK_INFO table and delete the entire row where dbo.SVI_SIM_CLONE ID is referenced under column PARENT_ID.
- Open dbo.SVI_SC_BASE_DISK_KEYS table and delete the entire row where dbo.SVI_SIM_CLONE ID is referenced under column PARENT_ID.
- 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 dbo.SVI_REQUEST table:
- Open dbo.SVI_TASK_STATE table and find the row where dbo.SVI_SIM_CLONE ID is referenced under column SIM_CLONE_ID. Note the REQUEST_ID in that row.
- Open dbo.SVI_REQUEST table and delete the entire row where dbo.SVI_TASK_STATE REQUEST_ID is referenced ID.
- Delete the entire row from dbo.SVI_TASK_STATE table
- In dbo.SVI_SIM_CLONE table, delete the entire row where the virtual machine is referenced.
- Remove the virtual machine from Active Directory Users and Computers.
Deleting the virtual machine from vCenter Server
Note: If you run the SviConfig RemoveSviClone command to remove linked clone data, the virtual machine is removed from vCenter Server. You can skip this task.
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 Delete from Disk.
No comments:
Post a Comment