If the parent virtual machine or snapshot is changed in the pool settings, a new replica virtual machine is created. The previous replica becomes unused and is deleted after the recompose completes. The View composer automatically deletes the replica from vCenter Server and the Composer database.
Under certain conditions, the replica virtual machine information may exist in the Composer database and the vCenter Server Inventory after any linked clone associated with the replica is deleted. This results in an unused replica.
Please use the below set of steps to find and remove any unused replica VMs in your VMware Horizon Environment.
- Login to VMware View Composer Server and Stop the VMware View Composer Service.
- Open command prompt in Administrator Mode.
- On a Windows 32-bit server, navigate to C:\Program Files\VMware\VMware View Composer.
- On a Windows 64-bit server, navigate to C:\Program Files (x86)\VMware\VMware View Composer.
- Run the below command
- SviConfig.exe -operation=FindUnusedReplica -DsnName=DSN_Name -Username=User_Name -Password=Password
- DSN_Name is the name of the compose database DSN
- User_name is the user name of composer database owner
- Password is the password of composer database owner
- To determine the Composer DB DSN, Username and Password use the below set of steps.
- In the vCenter Server hosting the Composer service, Click Start > Programs > Administrative Tools > Data Sources (ODBC).
- Click the System DSN tab.
- Click the Composer database entry. This is the value you enter for DsnName in the sviconfig command.
- Click Edit.
- The username is visible and should match the entry in the Composer configuration in the View Manager.
- If the command finds any unused replicas, they are listed in a new file created in the current directory ( unused-replica-*.txt)
- Use the below command to unprotect the Unused replicas and move to a unique folder.Ignore any warnings which are displayed when the below command is issued.
- SviConfig.exe -operation=FindUnusedReplica -DsnName=ComposerDB -Username=sa -Password=secret -Move=true
- Open a vSphere Client and connect to vCenter Server.
- Click Inventory > VMs and Templates.
- Remove the replicas located at the UnusedViewComposerReplicaFolder.
- Start the VMware View Composer service.