Finding and Removing Unused VMware Horizon View Replica Virtual Machines

vmware-vr-1

Purpose

This article provides steps to find one or more unused replicas in the datastore and to safely remove them.

Resolution

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.

Finding and removing unused replicas

To find and remove unused replicas:
  1. In vCenter Server or the server where the composer is installed, stop the VMware View Composer service.Note: When this service is down, no recompose, refresh, or provisioning operations occur. Use a convenient maintenance window.
  2. Click Start, type Services, and Press Enter.
  3. Click VMware View Composer Service.
  4. Click Stop.
  5. Click Start > Run, type cmd, and click OK. The command prompt opens.
Note: In the Windows Server 2008 machines, the command prompt must be run as an Administrator.
To run the command prompt as an Administrator:
  1. Click Start > Run, type cmd, and click OK. The command prompt opens.
  2. Hold Ctrl + Shift, and press Enter.
  3. Navigate to the View Composer install directory.
    • 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.
  4. Run the sviconfig.exe command with the FindUnusedReplica operation:

    SviConfig.exe -operation=FindUnusedReplica -DsnName=DSN_Name -Username=User_Name -Password=Password

    Where:

    • 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 ownerFor example:SviConfig.exe -operation=FindUnusedReplica -DsnName=ComposerDB -Username=sa -Password=secretNotes:
    • If the DsnName contains spaces, use quotes around the value.
    • If there are two composer databases on the server due to an older database, and the command is run against the incorrect database, the currently used replicas is moved to the unused folder as the old database does not recognize them.

    To determine the Composer DB DSN, user and password:

    1. In the vCenter Server hosting the Composer service, Click Start > Programs > Administrative Tools > Data Sources (ODBC).
    2. Click the System DSN tab.
    3. Click the Composer database entry. This is the value you enter for DsnName in the sviconfig command.
    4. Click Edit.
    5. The username is visible and should match the entry in the Composer configuration in the View Manager.
  5. If the command finds any unused replicas, they are listed in a new file created in the current directory ( unused-replica-*.txt).
  6. Unused replicas can be unprotected and moved to a unique folder with the parameter:-move=trueFor example:SviConfig.exe -operation=FindUnusedReplica -DsnName=ComposerDB -Username=sa -Password=secret -Move=trueNotes:
    • When using the move=true option, you receive warning pop-ups. These are safe to ignore.
    • Note the UnusedViewComposerReplicaFolder is created automatically if it does not exist, and unused replicas are moved to this folder.
  7. Open a vSphere Client and connect to vCenter Server.
  8. Click Inventory > VMs and Templates.
  9. Remove the replicas located at the UnusedViewComposerReplicaFolder.
  10. Start the VMware View Composer service.
Note: To view the help file for findUnusedReplicas:
  1. Click Start > Run, type cmd, and click OK. The command prompt opens and navigate to the View Composer install directory.
  2. Run this command:SviConfig.exe -operation=findUnusedReplica

Additional Information

See Also

Please like & share:

PCoIP connections to VMware Horizon View 5.1.x / 6.1 Desktops With Multiple Network Adapters Fail

PCoIP connections to VMware Horizon View 5.1.x / 6.1 desktops with multiple network adapters fail (2062604)

Symptoms

  • Attempting to connect to Horizon View desktops with multiple network adapters fail.
  • You see errors similar to:
    • Unable to launch from Pool <pool> for user <domain/user>: There were no machines available that reported protocol [PCoIP] as ready
    • The Display Protocol For this Desktop is currently not available
    • The connection to the remote computer ended
Note: The issue can also be observed when connecting to View desktops having single network adapter.

Resolution

To resolve this issue, configure the subnet that the View Agent uses by setting the value for the subnet mask registry in Parent Virtual Machine.
Warning: This procedure modifies the Windows registry. Before making any registry modifications, ensure that you have a current and valid backup of the registry and the virtual machine. For more information, see Microsoft KB article 136393.
Note: The preceding link was correct as of June 17, 2015. If you find a link is broken, provide a feedback and a VMware employee will update the link.
To open the Windows Registry:
  1. Click Start > Run, type regedit, and click OK.
  2. Go to the registry key – HKEY_LOCAL_MACHINE\software\vmware inc\vmware vdm\node manager\subnet.

    For View 6.1 – Go to the registry key HKEY_LOCAL_MACHINE\software\vmware inc\vmware vdm \IpPrefix
  3. Set the value to n.n.n.n/m (REG_SZ). Note: where n.n.n.n is the TCP/IP subnet and m represents the number of bits in the subnet mask.
For more information:

Source: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2062604

Please like & share: