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

Manually deleting replica virtual machines in VMware Horizon View (1008704)

  • 46 Ratings


  • You cannot remove replica virtual machines associated with desktop pools in View Composer
  • Removing source and replica virtual machines associated with desktop pools in View Composer fails


This article provides information on the unprotected entity operation in sviconfig, which allows you to unprotect replica virtual machines for deletion from VirtualCenter or vCenter Server.


Note: If you are trying to find or remove an unused replica virtual machine, see Finding and removing unused replica virtual machines in VMware View (2009844).

The View Connection Server creates, manages, and deletes linked clones during the View Composer operations. If the Connection Server functions are interrupted, the linked clones create orphaned folders, protected folders and virtual machine objects remaining in vCenter Server.
To resolve this issue, run the unprotectentity command to remove the protection from linked clone objects.

Run these commands from the command prompt on the View Composer Server:

C:\Program Files (x86)\VMware\VMware View Composer

Note: In Windows Server 2008 machines, the command prompt must be run as an Administrator or you will receive an error. To accomplish this, Click Start, and type cmd. Hold Ctrl + Shift, and press Enter. User Account Control then confirms the escalated permissions, and you will be running cmd.exe as an Administrator.

Unprotecting a replica in the VMwareViewComposerReplicaFolder folder

  • For View Composer 2.7 and earlier (View 5 and earlier), run this command:

sviconfig -operation=UnprotectEntity -VcUrl=https://VirtualCenter_address/sdk -Username=VirtualCenter_account_name -Password=VirtualCenter_account_password -InventoryPath=/Datacenter_name/vm/VMwareViewComposerReplicaFolder/Replica_Name -Recursive=true

  • For View Composer 3.0 (View 5.1), run this command:
sviconfig -operation=UnprotectEntity -DsnName=name_of_DSN -DbUsername=Composer_DSN_User_Name -DbPassword=Composer_DSN_Password -VcUrl=https://vCenter_Server_address/sdk -VcUsername=Domain\User_of_vCenter_Server_account_name -VcPassword=vCenter_Server_account_password -InventoryPath=/Datacenter_name/vm/VMwareViewComposerReplicaFolder/Replica_Name -Recursive=true

  • The sviconfig command parameters are case sensitive.
  • Values in italics are variables and must be replaced with your environmental values.
  • Values with spaces must be surrounded by double quotes.

    For example:

    -InventoryPath= "/View Repository/vm/VMwareViewComposerReplicaFolder"

  • The VMwareViewComposerReplicaFolder is a special container. The replica virtual machines are not visibly part of this container and the path to the virtual machine for sviconfig will always be /Datacenter_Name/vm/VMwareViewComposerReplicaFolder/replica-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, regardless of which Resource Pools or Folders contain the virtual machine.
  • If the Datacenter object is not the top level object and is inside a folder, the path must reflect this. For example, /folderName/Datacenter_Name/vm/VMwareViewComposerReplicaFolder/replica-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
  • In some cases the sviconfig command to unprotect the replica may fail. If this occurs,  unprotect the folder containing the replica using the procedure below to unprotecting the replica folder and its contents, and remove the replica. Afterwards use the protectEntity operation to re-protect the folder once you have deleted the orphaned object.
Note: For more information on removing replica in View 5.2 and later, see Finding and removing unused replica virtual machines in the VMware Horizon View (2009844).

Unprotecting the replica folder, VMwareViewComposerReplicaFolder and all the linked clone related objects it contains

  • For View Composer 2.7 and earlier (View 5 and earlier), run this command:

    sviconfig -operation=UnprotectEntity -VcUrl= -Username=User1 -Password=123 -InventoryPath=/Datacenter_name/vm/VMwareViewComposerReplicaFolder -Recursive=True

  • For View Composer 3.0 (View 5.1 and later), run this command:

    sviconfig -operation=UnprotectEntity -DsnName=name_of_DSN -DbUsername=Composer_DSN_User_Name -DbPassword=Composer_DSN_Password -VcUrl=https://vCenter_Server_address/sdk -VcUsername=Domain\User_of_vCenter_Server_account_name -VcPassword=vCenter_Server_account_password -InventoryPath=/Datacenter_name/vm/VMwareViewComposerReplicaFolder -Recursive=true

  • In View Composer 2.5 and later, you can re-protect the VMwareViewComposerReplicaFolder using -operation=ProtectEntity
The SviConfig utility does not check if a replica is currently in use by other linked clones. If a replica is in use, the linked clones cannot be powered on, refreshed, or recomposed after the replica is unprotected or deleted. You have to manually delete these unusable linked clones. Provisioning new linked clones from the same desktop pool creates new provisioned linked clones for these clones.

Note: The inventory path is case sensitive. If any part of the path entered in the command line differs from the inventory path, you can receive an Error 11.
Possible error codes from the SviConfig utility
This table lists possible error codes from the SviConfig utility:
successful execution
The supplied DSN name can not be found
The supplied credentials are invalid
3 Unsupported driver for the provided database
4 Unexpected problem arisen
An invalid VirtualCenter URL was provided
VirtualCenter was unavailable or could not be accessed
The specified entity was not found
Unknown entity type. Recognized entities are VM and Folder
Failed to unprotect replica
14 Unsupported database schema version is found
15 Other application is using required resources. Stop it and retry the operation
18 Unable to connect to database server
26 There are some errors during the operation
27 The replica folder name cannot be found in VC inventory
28 Failed to create unused replica folder
29 Failed to move VM into a VC folder
34 invalid VC certificate
Note: If you receive Error code 11 when you run the command and your replicas are in a folder and not directly under the Data center, the path should be manually substituted in place of  VMwareViewComposerReplicaFolder.

Additional Information


view-replica-vm  remove-fails Deleting (missing)

See Also

Update History

06/12/2012 - Added new syntax for View Composer 3.0 01/11/2013 - Added link to article 2009844 and added the View version associated with composer versions mentioned in the Resolution section. 06/28/2013 - Added error code 1 to the table containing the error codes for the sviconfig command. 01/21/2014 - Edited title for current terminology.

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.


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