Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Cannot remove source and replica virtual machines associated with View Composer desktop pools

Symptoms

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

Resolution

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

Caution: If a replica folder is unprotected, it cannot be protected again. Use the UnprotectEntity command as a last-resort troubleshooting procedure and exercise caution when running this command.

Run these commands from a command prompt on the vCenter Server from the View Composer directory:
  • 32-bit servers: C:\Program Files\VMware\VMware View Composer
  • 64-bit servers: 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 will then confirm the escalated permissions, and you will be running cmd.exe as an Administrator.

sviconfig -operation=unprotectentity -VcUrl=https://<VirtualCenter address>/sdk -Username=<VirtualCenter account name> -Password=<VirtualCenter account password> -InventoryPath=/<Datacenter name>/[vm|host]/<folder name> -Recursive=[true|false]

Notes:
  • The sviconfig command parameters are case sensitive.
  • 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.
For example:
  • To unprotect a replica in the VMwareViewComposerReplicaFolder folder, run the command:

    sviconfig -operation=unprotectentity -VcUrl=https://my.vc/sdk -Username=User1 -Password=123 -InventoryPath="/<Datacenter_name>/vm/VMwareViewComposerReplicaFolder/<replica_name>" -Recursive=true

  • To unprotect the replica folder VMwareViewComposerReplicaFolder and all the linked clone related objects it contains, run the command:

    sviconfig -operation=unprotectentity -VcUrl=https://my.vc/sdk -Username=User1 -Password=123 -InventoryPath="/<Datacenter_name>/vm/VMwareViewComposerReplicaFolder" -Recursive=True

  • To unprotect the folder Dev hosts (created under host folder), run the command:

    sviconfig -operation=unprotectentity -VcUrl=https://my.vc/sdk -Username=User1 -Password=123 -InventoryPath="/<Datacenter_name>/host/Dev hosts
The SviConfig utility does not check if a replica is currently is 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:

Code
Description
0
The operation ended successfully
2
Invalid VirtualCenter administrator credentials were provided
9
An invalid VirtualCenter URL was provided
10
VirtualCenter was unavailable or could not be accessed
11
The specified entity was not found
12
Unknown entity type. Recognized entities are VM and Folder
13
The release operation failed
 
Note: If you receive Error code 11 when you run the command and your replicas are in a folder and not directly under the Datacenter. The path should be manually substituted in place of VMwareViewComposerReplicaFolder.

Additional Information

Tags

view-replica-vm  remove-fails

See Also

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


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